svn update: 51469 (latest:51480)
authorJeahwan Kim <jae.hwan.kim@samsung.com>
Wed, 8 Sep 2010 00:03:23 +0000 (09:03 +0900)
committerJeahwan Kim <jae.hwan.kim@samsung.com>
Wed, 8 Sep 2010 00:03:23 +0000 (09:03 +0900)
120 files changed:
AUTHORS
COPYING
Makefile.am
config/illume/profile.desktop
config/standard/profile.desktop
configure.ac
data/images/Makefile.am
data/images/mystrale.jpg [new file with mode: 0644]
data/images/mystrale_2.jpg [new file with mode: 0644]
data/themes/Makefile.am
data/themes/arrow_left.png [new file with mode: 0644]
data/themes/black.png [new file with mode: 0644]
data/themes/default.edc
data/themes/map_item.png [new file with mode: 0644]
data/themes/map_item_1.png [new file with mode: 0644]
data/themes/map_item_2.png [new file with mode: 0644]
data/themes/shadow.png [new file with mode: 0644]
debian/SVN_REV
elementary.pc.in
src/bin/Makefile.am
src/bin/config.c
src/bin/test.c
src/bin/test_anim.c
src/bin/test_flip.c
src/bin/test_floating.c
src/bin/test_genlist.c
src/bin/test_icon_desktops.c
src/bin/test_menu.c
src/bin/test_notify.c
src/bin/test_pager.c
src/bin/test_panes.c [new file with mode: 0644]
src/bin/test_photo.c
src/bin/test_progressbar.c
src/bin/test_slideshow.c
src/bin/test_thumb.c
src/edje_externals/Makefile.am
src/edje_externals/elm.c
src/edje_externals/elm_anchorblock.c
src/edje_externals/elm_anchorview.c
src/edje_externals/elm_bubble.c
src/edje_externals/elm_button.c
src/edje_externals/elm_check.c
src/edje_externals/elm_clock.c
src/edje_externals/elm_fileselector.c
src/edje_externals/elm_fileselector_button.c
src/edje_externals/elm_genlist.c
src/edje_externals/elm_hoversel.c
src/edje_externals/elm_list.c
src/edje_externals/elm_map.c
src/edje_externals/elm_notepad.c
src/edje_externals/elm_notify.c [new file with mode: 0644]
src/edje_externals/elm_panes.c [new file with mode: 0644]
src/edje_externals/elm_photocam.c
src/edje_externals/elm_progressbar.c
src/edje_externals/elm_radio.c
src/edje_externals/elm_scrolled_entry.c
src/edje_externals/elm_slider.c
src/edje_externals/elm_slideshow.c
src/edje_externals/elm_spinner.c
src/edje_externals/elm_thumb.c
src/edje_externals/elm_toggle.c
src/edje_externals/elm_toolbar.c
src/edje_externals/modules.inc
src/edje_externals/private.h
src/lib/Elementary.h.in
src/lib/Makefile.am
src/lib/elc_anchorblock.c
src/lib/elc_anchorview.c
src/lib/elc_fileselector.c
src/lib/elc_fileselector_button.c
src/lib/elc_hoversel.c
src/lib/elc_notepad.c
src/lib/elc_scrolled_entry.c
src/lib/elm_animator.c [new file with mode: 0644]
src/lib/elm_bubble.c
src/lib/elm_button.c
src/lib/elm_check.c
src/lib/elm_clock.c
src/lib/elm_cnp_helper.c [new file with mode: 0644]
src/lib/elm_config.c
src/lib/elm_conform.c
src/lib/elm_entry.c
src/lib/elm_flip.c
src/lib/elm_frame.c
src/lib/elm_gengrid.c
src/lib/elm_genlist.c
src/lib/elm_hover.c
src/lib/elm_icon.c
src/lib/elm_image.c
src/lib/elm_index.c
src/lib/elm_label.c
src/lib/elm_layout.c
src/lib/elm_list.c
src/lib/elm_main.c
src/lib/elm_map.c
src/lib/elm_mapbuf.c
src/lib/elm_menu.c
src/lib/elm_notify.c
src/lib/elm_pager.c
src/lib/elm_panel.c
src/lib/elm_panes.c [new file with mode: 0644]
src/lib/elm_photo.c
src/lib/elm_photocam.c
src/lib/elm_priv.h
src/lib/elm_progressbar.c
src/lib/elm_radio.c
src/lib/elm_scroller.c
src/lib/elm_slider.c
src/lib/elm_slideshow.c
src/lib/elm_spinner.c
src/lib/elm_theme.c
src/lib/elm_thumb.c
src/lib/elm_toggle.c
src/lib/elm_toolbar.c
src/lib/elm_widget.c
src/lib/elm_win.c
src/lib/els_icon.c
src/lib/els_icon.h
src/lib/els_scroller.c
src/modules/test_entry/Makefile.am

diff --git a/AUTHORS b/AUTHORS
index 8df9a5c..8aec86f 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -13,3 +13,4 @@ Brian Wang <brian.wang.0721@gmail.com>
 Mike Blumenkrantz (zmike) <mike@zentific.com>
 Saumsung Electronics <tbd>
 Samsung SAIT <tbd>
+Brett Nash <nash@nash.id.au>
diff --git a/COPYING b/COPYING
index cf546d2..ba77514 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -1,3 +1,21 @@
+Copyright notice for Elementary:
+
+Copyright (C) 2008-2010 Carsten Haitzler and various contributors (see AUTHORS)
+
+This library is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by the
+Free Software Foundation; either version 2.1 of the License.
+
+This library is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
+details.
+
+Below is a copy of the GNU Lesser General Public License that is distributed
+along with this library. If you do not have a copy below, write to the Free
+Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
+02110-1301  USA
+\f
                  GNU LESSER GENERAL PUBLIC LICENSE
                       Version 2.1, February 1999
 
@@ -471,49 +489,3 @@ SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
 DAMAGES.
 
                     END OF TERMS AND CONDITIONS
-\f
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.  It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the library's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2.1 of the License, or (at your option) any later version.
-
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
index d7a58bd..3214b64 100644 (file)
@@ -12,9 +12,6 @@ EXTRA_DIST = README AUTHORS COPYING autogen.sh elementary.pc.in elementary.spec
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = elementary.pc
 
-installed_headersdir = $(prefix)/include/elementary
-installed_headers_DATA = elementary_config.h
-
 .PHONY: doc
 
 doc:
index 34308f6..d69e364 100644 (file)
@@ -1,7 +1,6 @@
 [Desktop Entry]
 Type=Link
 Name=Illume
-Name[fr]=Illume
 Name[el]=Illume
 Name[eo]=Illume
 Name[zh_CN]=Illume
@@ -10,7 +9,7 @@ Comment=Illume profile for<br>embedded systems like<br>phones and web<br>tablets
 Comment[cs]=Illume profil pro<br>přenosná zařízení<br>jako telefony<br>a webové tablety<br>s malými dotykovými displeji.<br>Použijte jen pokud<br>opravdu máte<br>takové zařízení.
 Comment[it]=Profilo Illume per<br>sistemi embedded come<br>cellulari e webpad<br>con piccoli display<br>touchscreen.<br>Usatelo solo se<br>avete realmente un<br>dispositivo simile.
 Comment[hu]=Illume profil <br>telefonokhoz, érintőképernyőkhöz.<br>Csak akkor használd ezt,<br>ha valóban ilyen eszközöd van.
-Comment[fr]=Profil Illume pour les systèmes<br>embarqués comme les téléphones<br>et tablettes internet pourvus<br>d'un petit écran tactile.<br>À n'utiliser que si<br>vous disposez réellement<br>d'un tel matériel.
+Comment[fr]=Profil Illume pour les systèmes<br>embarqués comme les téléphones<br>et tablettes Internet pourvus<br>d'un petit écran tactile.<br>À n'utiliser que si vous<br>disposez réellement<br>d'un tel matériel.
 Comment[el]=Το προφίλ Illume είναι<br>για μικροσυσκευές όπως <br>κινητά τηλέφωνα ή internet<br>tablets με μικρές οθόνες αφής.<br>Επιλέξτε μόνο αν έχετε τέτοια<br>συσκευή.
 Comment[eo]=Profilo Illume por la<br>enkorpigitaj sistemoj<br>kiel la telefonoj kaj<br>ttt-tabletoj kun etaj<br>tuŝekranoj. Nur uzu<br>tiun se vi vere havas<br>tian aparaton.
 Comment[zh_CN]=为带有小型触屏的嵌入式系统如手机和上网本设计的 Illume 设置主题。
index 7c9ed30..3813af5 100644 (file)
@@ -3,7 +3,6 @@ Type=Link
 Name=Standard
 Name[cs]=Standartní
 Name[hu]=Általános
-Name[fr]=Standard
 Name[el]=Κανονικό
 Name[eo]=Kutima
 Name[zh_CN]=标准
index 6cdcf0a..e621f07 100644 (file)
@@ -3,12 +3,12 @@
 m4_define([v_maj], [0])
 m4_define([v_min], [7])
 m4_define([v_mic], [0])
-m4_define([v_rev], m4_esyscmd([(svnversion . | grep -v exported || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
+m4_define([v_rev], m4_esyscmd([(svnversion "${SVN_REPO_PATH:-.}" | grep -v export || echo 0) | awk -F : '{printf("%s\n", $1);}' | tr -d ' :MSP\n']))
 m4_if(v_rev, [0], [m4_define([v_rev], m4_esyscmd([git log 2> /dev/null | (grep -m1 git-svn-id || echo 0) | sed -e 's/.*@\([0-9]*\).*/\1/' | tr -d '\n']))])
 ##--   When released, remove the dnl on the below line
 dnl m4_undefine([v_rev])
 ##--   When doing snapshots - change soname. remove dnl on below line
-m4_define([relname], [ver-pre-svn-06])
+m4_define([relname], [ver-pre-svn-07])
 m4_define([v_rel], [-release relname])
 ##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
 m4_ifdef([v_rev], [m4_define([v_ver], [v_maj.v_min.v_mic.v_rev])],
@@ -30,8 +30,6 @@ AM_INIT_AUTOMAKE([1.6 dist-bzip2])
 AM_CONFIG_HEADER([elementary_config.h])
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
 AC_C_BIGENDIAN
 AC_ISC_POSIX
 AC_PROG_CC
@@ -65,17 +63,23 @@ VMIN=v_min
 AC_SUBST(VMAJ)
 AC_SUBST(VMIN)
 
+EDJE_VERSION="1.0.0"
+
 case "$host_os" in
   mingw32ce* | cegcc*)
     MODULE_ARCH="$host_os-$host_cpu"
+    MODULE_EDJE="$host_os-$host_cpu"
     ;;
   *)
-    MODULE_ARCH="$host_os-$host_cpu-relname"
+    MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
+    MODULE_EDJE="$host_os-$host_cpu-${EDJE_VERSION}"
     ;;
 esac
 AC_SUBST(release_info)
 AC_SUBST(MODULE_ARCH)
 AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
+AC_SUBST(MODULE_EDJE)
+AC_DEFINE_UNQUOTED(MODULE_EDJE, "$MODULE_EDJE", "Edje module architecture")
 
 EFL_SHARED_EXTENSION="${shrext_cmds}"
 AC_DEFINE_UNQUOTED(EFL_SHARED_EXTENSION, "${EFL_SHARED_EXTENSION}", "Shared extension")
@@ -165,13 +169,14 @@ AM_CONDITIONAL([ELEMENTARY_WINDOWS_BUILD], [test "x${have_windows}" = "xyes"])
 
 PKG_CHECK_MODULES([ELEMENTARY],
    [
-    eina-0 >= 0.0.1
-    eet >= 1.2.3
-    evas >= 0.9.9
-    ecore >= 0.9.9
-    ecore-evas >= 0.9.9
-    ecore-file >= 0.9.9
-    edje >= 0.9.9
+    eina >= 1.0.0
+    eet >= 1.4.0
+    evas >= 1.0.0
+    ecore >= 1.0.0
+    ecore-evas >= 1.0.0
+    ecore-file >= 1.0.0
+    ecore-imf >= 1.0.0
+    edje >= ${EDJE_VERSION}
    ]
 )
 
@@ -186,7 +191,7 @@ AC_ARG_WITH(eet-eet,
 ])
 AC_SUBST(eet_eet)
         
-requirement_elm="edje ecore-file ecore-evas ecore evas eet eina-0 ${requirement_elm}"
+requirement_elm="edje >= ${EDJE_VERSION} ecore-file >= 1.0.0 ecore-evas >= 1.0.0 ecore >= 1.0.0 evas >= 1.0.0 eet >= 1.4.0 eina >= 1.0.0 ${requirement_elm}"
 
 have_elementary_x="no"
 want_elementary_x="auto"
@@ -196,11 +201,11 @@ AC_ARG_ENABLE([ecore-x],
 
 if test "x$want_elementary_x" != "xno"; then
    PKG_CHECK_MODULES([ELEMENTARY_X],
-      [ecore-x],
+      [ecore-x >= 1.0.0],
       [
        AC_DEFINE(HAVE_ELEMENTARY_X, 1, [X11 support for Elementary])
        have_elementary_x="yes"
-       requirement_elm="ecore-x ${requirement_elm}"
+       requirement_elm="ecore-x >= 1.0.0 ${requirement_elm}"
       ],
       [have_elementary_x="no"]
    )
@@ -220,11 +225,11 @@ AC_ARG_ENABLE([ecore-fb],
 
 if test "x$want_elementary_fb" != "xno"; then
    PKG_CHECK_MODULES([ELEMENTARY_FB],
-      [ecore-fb],
+      [ecore-fb >= 1.0.0],
       [
        AC_DEFINE(HAVE_ELEMENTARY_FB, 1, [FB support for Elementary])
        have_elementary_fb="yes"
-       requirement_elm="ecore-fb ${requirement_elm}"
+       requirement_elm="ecore-fb >= 1.0.0 ${requirement_elm}"
       ],
       [have_elementary_fb="no"]
    )
@@ -243,11 +248,11 @@ AC_ARG_ENABLE([ecore-sdl],
 
 if test "x$want_elementary_sdl" != "xno"; then
    PKG_CHECK_MODULES([ELEMENTARY_SDL],
-      [ecore-sdl],
+      [ecore-sdl >= 1.0.0],
       [
        AC_DEFINE(HAVE_ELEMENTARY_SDL, 1, [SDL support for Elementary])
        have_elementary_sdl="yes"
-       requirement_elm="ecore-sdl ${requirement_elm}"
+       requirement_elm="ecore-sdl >= 1.0.0 ${requirement_elm}"
       ],
       [have_elementary_sdl="no"]
    )
@@ -266,11 +271,11 @@ AC_ARG_ENABLE([ecore-win32],
 
 if test "x$want_elementary_win32" != "xno"; then
    PKG_CHECK_MODULES([ELEMENTARY_WIN32],
-      [ecore-win32],
+      [ecore-win32 >= 1.0.0],
       [
        AC_DEFINE(HAVE_ELEMENTARY_WIN32, 1, [Windows XP support for Elementary])
        have_elementary_win32="yes"
-       requirement_elm="ecore-win32 ${requirement_elm}"
+       requirement_elm="ecore-win32 >= 1.0.0 ${requirement_elm}"
       ],
       [have_elementary_win32="no"]
    )
@@ -289,11 +294,11 @@ AC_ARG_ENABLE([ecore-wince],
 
 if test "x$want_elementary_wince" != "xno"; then
    PKG_CHECK_MODULES([ELEMENTARY_WINCE],
-      [ecore-wince],
+      [ecore-wince >= 1.0.0],
       [
        AC_DEFINE(HAVE_ELEMENTARY_WINCE, 1, [Windows CE support for Elementary])
        have_elementary_wince="yes"
-       requirement_elm="ecore-wince ${requirement_elm}"
+       requirement_elm="ecore-wince >= 1.0.0 ${requirement_elm}"
       ],
       [have_elementary_wince="no"]
    )
@@ -314,14 +319,14 @@ AC_ARG_ENABLE([edbus],
 if test "x$want_elementary_edbus" != "xno"; then
     PKG_CHECK_MODULES([ELEMENTARY_EDBUS],
        [
-        edbus
-        ehal
+        edbus >= 1.0.0
+        ehal >= 1.0.0
        ],
        [
         AC_DEFINE(HAVE_ELEMENTARY_EDBUS, 1, [EDBus support for Elementary])
         have_elementary_edbus="yes"
         ELM_EDBUS_DEF="#define"
-        requirement_elm="ehal edbus ${requirement_elm}"
+        requirement_elm="ehal >= 1.0.0 edbus >= 1.0.0 ${requirement_elm}"
        ],
        [have_elementary_edbus="no"]
     )
@@ -343,15 +348,15 @@ AC_ARG_ENABLE([efreet],
 if test "x$want_elementary_efreet" != "xno"; then
     PKG_CHECK_MODULES([ELEMENTARY_EFREET],
        [
-        efreet
-        efreet-mime
-        efreet-trash
+        efreet >= 1.0.0
+        efreet-mime >= 1.0.0
+        efreet-trash >= 1.0.0
        ],
        [
         AC_DEFINE(HAVE_ELEMENTARY_EFREET, 1, [Efreet support for Elementary])
         have_elementary_efreet="yes"
         ELM_EFREET_DEF="#define"
-        requirement_elm="efreet efreet-mime efreet-trash ${requirement_elm}"
+        requirement_elm="efreet >= 1.0.0 efreet-mime >= 1.0.0 efreet-trash >= 1.0.0 ${requirement_elm}"
        ],
        [have_elementary_efreet="no"]
     )
@@ -407,7 +412,7 @@ if test "x$want_elementary_ethumb" != "xno"; then
         AC_DEFINE(HAVE_ELEMENTARY_ETHUMB, 1, [Ethumb support for Elementary])
         have_elementary_ethumb="yes"
         ELM_ETHUMB_DEF="#define"
-        requirement_elm="ethumb ${requirement_elm}"
+        requirement_elm="ethumb_client ${requirement_elm}"
        ],
        [have_elementary_ethumb="no"]
     )
index 5e361be..baf9ed5 100644 (file)
@@ -40,6 +40,8 @@ icon_21.png \
 icon_22.png \
 icon_23.png \
 bubble.png \
-bubble_sh.png
+bubble_sh.png \
+mystrale.jpg \
+mystrale_2.jpg
 
 EXTRA_DIST = $(files_DATA)
diff --git a/data/images/mystrale.jpg b/data/images/mystrale.jpg
new file mode 100644 (file)
index 0000000..31edf4a
Binary files /dev/null and b/data/images/mystrale.jpg differ
diff --git a/data/images/mystrale_2.jpg b/data/images/mystrale_2.jpg
new file mode 100644 (file)
index 0000000..88d86d6
Binary files /dev/null and b/data/images/mystrale_2.jpg differ
index 7170801..4f8309a 100644 (file)
@@ -140,6 +140,7 @@ busy-7.png \
 busy-8.png \
 busy-9.png \
 arrow_right.png \
+arrow_left.png \
 bt_spinner_up.png \
 bt_spinner_down.png \
 bt_spinner_hilight.png \
@@ -184,7 +185,11 @@ emo-very-sorry.png \
 emo-what.png \
 emo-wink.png \
 emo-worried.png \
-emo-wtf.png
+emo-wtf.png \
+map_item.png \
+map_item_2.png \
+shadow.png \
+black.png
 
 default.edj: Makefile $(EXTRA_DIST)
        $(EDJE_CC) $(EDJE_FLAGS) \
diff --git a/data/themes/arrow_left.png b/data/themes/arrow_left.png
new file mode 100644 (file)
index 0000000..fbe0795
Binary files /dev/null and b/data/themes/arrow_left.png differ
diff --git a/data/themes/black.png b/data/themes/black.png
new file mode 100644 (file)
index 0000000..28f520a
Binary files /dev/null and b/data/themes/black.png differ
index 2cb28c8..ba6b03d 100644 (file)
@@ -118,8 +118,8 @@ collections {
          part { name: "bg";
            type: RECT;
            description { state: "default" 0.0;
-              rel1.offset: 1 1;
-              rel2.offset: -2 -2;
+              rel1.offset: 2 2;
+              rel2.offset: -3 -3;
               color: 255 255 255 0;
            }
         }
@@ -129,21 +129,25 @@ collections {
            description { state: "default" 0.0;
               rel1.to: "bg";
               rel2.to: "bg";
+              rel1.offset: 2 2;
+              rel2.offset: -3 -3;
            }
         }
         part { name: "elm.swallow.content";
            clip_to: "clipper";
            type: SWALLOW;
            description { state: "default" 0.0;
-              rel1.offset: 1 1;
-              rel2.offset: -2 -2;
+              rel1.to: "bg";
+              rel2.to: "bg";
+              rel1.offset: 2 2;
+              rel2.offset: -3 -3;
            }
         }
         part { name: "conf_over";
            mouse_events:  0;
            description { state: "default" 0.0;
-              rel1.offset: 0 0;
-              rel2.offset: -1 -1;
+              rel1.to: "bg";
+              rel2.to: "bg";
               image {
                  normal: "shelf_inset.png";
                  border: 7 7 7 7;
@@ -183,7 +187,8 @@ collections {
               align: 1.0 0.0;
               rel1 {
                  relative: 1.0 0.0;
-                 offset:   -2 0;
+                 offset:   -2 2;
+                 to_y:     "elm.swallow.content";
               }
               rel2 {
                  relative: 1.0 0.0;
@@ -292,7 +297,8 @@ collections {
               align: 0.0 1.0;
               rel1 {
                  relative: 0.0 1.0;
-                 offset:   0 -2;
+                 offset:   2 -2;
+                 to_x:     "elm.swallow.content";
               }
               rel2 {
                  relative: 0.0 1.0;
@@ -527,18 +533,28 @@ collections {
 
 ///////////////////////////////////////////////////////////////////////////////
    group { name: "elm/label/base/default";
-      styles
-       {
-          style { name: "textblock_style";
-             base: "font=Sans font_size=10 align=left color=#000 wrap=word";
-
-             tag:  "br" "\n";
-             tag:  "hilight" "+ font=Sans:style=Bold";
-             tag:  "b" "+ font=Sans:style=Bold";
-             tag:  "tab" "\t";
+      data.item: "default_font_size" "24";
+      data.item: "min_font_size" "8";
+      data.item: "max_font_size" "60";
+      styles {
+         style { name: "textblock_style";
+            base: "font=Sans font_size=10 color=#000 wrap=word";
+            tag:  "br" "\n";
+            tag:  "ps" "ps";
+            tag:  "hilight" "+ font=Sans:style=Bold";
+            tag:  "b" "+ font=Sans:style=Bold";
+            tag:  "tab" "\t";
           }
        }
       parts {
+         part { name: "label.swallow.background";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               visible: 1;
+               rel1 { relative: 0 0; to: "elm.text"; }
+               rel2 { relative: 1 1; to: "elm.text"; }
+            }
+         }
         part { name: "elm.text";
            type: TEXTBLOCK;
            mouse_events: 0;
@@ -554,7 +570,18 @@ collections {
    }
 
    group { name: "elm/label/base_wrap/default";
+      data.item: "default_font_size" "24";
+      data.item: "min_font_size" "8";
+      data.item: "max_font_size" "60";
       parts {
+         part { name: "label.swallow.background";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               visible: 1;
+               rel1 { relative: 0 0; to: "elm.text"; }
+               rel2 { relative: 1 1; to: "elm.text"; }
+            }
+         }
         part { name: "elm.text";
            type: TEXTBLOCK;
            mouse_events: 0;
@@ -570,18 +597,28 @@ collections {
    }
 
    group { name: "elm/label/base/marker";
-      styles
-       {
-          style { name: "textblock_style2";
-             base: "font=Sans:style=Bold font_size=10 align=center color=#fff wrap=word";
-
-             tag:  "br" "\n";
-             tag:  "hilight" "+ color=#ffff";
-             tag:  "b" "+ color=#ffff";
-             tag:  "tab" "\t";
-          }
-       }
+      data.item: "default_font_size" "24";
+      data.item: "min_font_size" "8";
+      data.item: "max_font_size" "60";
+      styles {
+         style { name: "textblock_style2";
+          base: "font=Sans:style=Bold font_size=10 align=center color=#fff wrap=word";
+           tag:  "br" "\n";
+           tag:  "ps" "ps";
+          tag:  "hilight" "+ color=#ffff";
+          tag:  "b" "+ color=#ffff";
+          tag:  "tab" "\t";
+        }
+      }
       parts {
+         part { name: "label.swallow.background";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               visible: 1;
+               rel1 { relative: 0 0; to: "elm.text"; }
+               rel2 { relative: 1 1; to: "elm.text"; }
+            }
+         }
         part { name: "elm.text";
            type: TEXTBLOCK;
            mouse_events: 0;
@@ -597,8 +634,19 @@ collections {
    }
 
    group { name: "elm/label/base_wrap/marker";
+      data.item: "default_font_size" "24";
+      data.item: "min_font_size" "8";
+      data.item: "max_font_size" "60";
       parts {
-        part { name: "elm.text";
+         part { name: "label.swallow.background";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               visible: 1;
+               rel1 { relative: 0 0; to: "elm.text"; }
+               rel2 { relative: 1 1; to: "elm.text"; }
+            }
+         }
+         part { name: "elm.text";
            type: TEXTBLOCK;
            mouse_events: 0;
            scale: 1;
@@ -5518,132 +5566,133 @@ collections {
 // http://lazycrazy.deviantart.com/
 // http://lazycrazy.deviantart.com/art/Very-Emotional-Emoticons-144461621
   group { name: "elm/entry/emoticon/angry/default"; images.image:
-     "emo-angry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-angry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-angry.png"; } } } }
   group { name: "elm/entry/emoticon/angry-shout/default"; images.image:
-     "emo-angry-shout.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-angry-shout.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-angry-shout.png"; } } } }
   group { name: "elm/entry/emoticon/crazy-laugh/default"; images.image:
-     "emo-crazy-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-crazy-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-crazy-laugh.png"; } } } }
   group { name: "elm/entry/emoticon/evil-laugh/default"; images.image:
-     "emo-evil-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-evil-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-evil-laugh.png"; } } } }
   group { name: "elm/entry/emoticon/evil/default"; images.image:
-     "emo-evil.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-evil.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-evil.png"; } } } }
   group { name: "elm/entry/emoticon/goggle-smile/default"; images.image:
-     "emo-goggle-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-goggle-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-goggle-smile.png"; } } } }
   group { name: "elm/entry/emoticon/grumpy/default"; images.image:
-     "emo-grumpy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-grumpy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-grumpy.png"; } } } }
   group { name: "elm/entry/emoticon/grumpy-smile/default"; images.image:
-     "emo-grumpy-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-grumpy-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-grumpy-smile.png"; } } } }
   group { name: "elm/entry/emoticon/guilty/default"; images.image:
-     "emo-guilty.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-guilty.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-guilty.png"; } } } }
   group { name: "elm/entry/emoticon/guilty-smile/default"; images.image:
-     "emo-guilty-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-guilty-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-guilty-smile.png"; } } } }
   group { name: "elm/entry/emoticon/haha/default"; images.image:
-     "emo-haha.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-haha.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-haha.png"; } } } }
   group { name: "elm/entry/emoticon/half-smile/default"; images.image:
-     "emo-half-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-half-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-half-smile.png"; } } } }
   group { name: "elm/entry/emoticon/happy-panting/default"; images.image:
-     "emo-happy-panting.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-happy-panting.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-happy-panting.png"; } } } }
   group { name: "elm/entry/emoticon/happy/default"; images.image:
-     "emo-happy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-happy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-happy.png"; } } } }
   group { name: "elm/entry/emoticon/indifferent/default"; images.image:
-     "emo-indifferent.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-indifferent.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-indifferent.png"; } } } }
   group { name: "elm/entry/emoticon/kiss/default"; images.image:
-     "emo-kiss.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-kiss.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-kiss.png"; } } } }
   group { name: "elm/entry/emoticon/knowing-grin/default"; images.image:
-     "emo-knowing-grin.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-knowing-grin.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-knowing-grin.png"; } } } }
   group { name: "elm/entry/emoticon/laugh/default"; images.image:
-     "emo-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-laugh.png"; } } } }
   group { name: "elm/entry/emoticon/little-bit-sorry/default"; images.image:
-     "emo-little-bit-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-little-bit-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-little-bit-sorry.png"; } } } }
   group { name: "elm/entry/emoticon/love-lots/default"; images.image:
-     "emo-love-lots.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-love-lots.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-love-lots.png"; } } } }
   group { name: "elm/entry/emoticon/love/default"; images.image:
-     "emo-love.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-love.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-love.png"; } } } }
   group { name: "elm/entry/emoticon/minimal-smile/default"; images.image:
-     "emo-minimal-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-minimal-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-minimal-smile.png"; } } } }
   group { name: "elm/entry/emoticon/not-happy/default"; images.image:
-     "emo-not-happy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-not-happy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-not-happy.png"; } } } }
   group { name: "elm/entry/emoticon/not-impressed/default"; images.image:
-     "emo-not-impressed.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-not-impressed.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-not-impressed.png"; } } } }
   group { name: "elm/entry/emoticon/omg/default"; images.image:
-     "emo-omg.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-omg.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-omg.png"; } } } }
   group { name: "elm/entry/emoticon/opensmile/default"; images.image:
-     "emo-opensmile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-opensmile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-opensmile.png"; } } } }
   group { name: "elm/entry/emoticon/smile/default"; images.image:
-     "emo-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-smile.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-smile.png"; } } } }
   group { name: "elm/entry/emoticon/sorry/default"; images.image:
-     "emo-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-sorry.png"; } } } }
   group { name: "elm/entry/emoticon/squint-laugh/default"; images.image:
-     "emo-squint-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-squint-laugh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-squint-laugh.png"; } } } }
   group { name: "elm/entry/emoticon/surprised/default"; images.image:
-     "emo-surprised.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-surprised.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-surprised.png"; } } } }
   group { name: "elm/entry/emoticon/suspicious/default"; images.image:
-     "emo-suspicious.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-suspicious.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-suspicious.png"; } } } }
   group { name: "elm/entry/emoticon/tongue-dangling/default"; images.image:
-     "emo-tongue-dangling.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-tongue-dangling.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-tongue-dangling.png"; } } } }
   group { name: "elm/entry/emoticon/tongue-poke/default"; images.image:
-     "emo-tongue-poke.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-tongue-poke.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-tongue-poke.png"; } } } }
   group { name: "elm/entry/emoticon/uh/default"; images.image:
-     "emo-uh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-uh.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-uh.png"; } } } }
   group { name: "elm/entry/emoticon/unhappy/default"; images.image:
-     "emo-unhappy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-unhappy.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-unhappy.png"; } } } }
   group { name: "elm/entry/emoticon/very-sorry/default"; images.image:
-     "emo-very-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-very-sorry.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-very-sorry.png"; } } } }
   group { name: "elm/entry/emoticon/what/default"; images.image:
-     "emo-what.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-what.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-what.png"; } } } }
   group { name: "elm/entry/emoticon/wink/default"; images.image:
-     "emo-wink.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-wink.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-wink.png"; } } } }
   group { name: "elm/entry/emoticon/worried/default"; images.image:
-     "emo-worried.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-worried.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-worried.png"; } } } }
   group { name: "elm/entry/emoticon/wtf/default"; images.image:
-     "emo-wtf.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal: 
+     "emo-wtf.png" COMP; parts { part { name: "icon"; mouse_events: 0; description { state: "default" 0.0; max: 64 64; image.normal:
         "emo-wtf.png"; } } } }
 //------------------------------------------------------------
    group { name: "elm/entry/base/default";
       styles
        {
           style { name: "entry_textblock_style";
-             base: "font=Sans font_size=10 align=left color=#000 wrap=word";
+             base: "font=Sans font_size=10 color=#000 wrap=word";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -5651,8 +5700,9 @@ collections {
              tag:  "hilight" "+ font=Sans:style=Bold";
           }
           style { name: "entry_textblock_disabled_style";
-             base: "font=Sans font_size=10 align=left color=#00000080 wrap=word";
+             base: "font=Sans font_size=10 color=#00000080 wrap=word";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -5678,7 +5728,8 @@ collections {
            source5: "elm/entry/anchor/default"; // anchor under
 //         source6: "X"; // anchor over
            description { state: "default" 0.0;
-               fixed: 1 0;
+               /* we gotta use 0 0 here, because of scrolled entries */
+               fixed: 0 0;
               text {
                  style: "entry_textblock_style";
                  min: 0 1;
@@ -5719,8 +5770,9 @@ collections {
       styles
        {
           style { name: "entry_textblock_style_charwrap";
-             base: "font=Sans font_size=10 align=left color=#000 wrap=char";
+             base: "font=Sans font_size=10 color=#000 wrap=char";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -5728,8 +5780,9 @@ collections {
              tag:  "hilight" "+ font=Sans:style=Bold";
           }
           style { name: "entry_textblock_disabled_style_charwrap";
-             base: "font=Sans font_size=10 align=left color=#00000080 wrap=char";
+             base: "font=Sans font_size=10 color=#00000080 wrap=char";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -5873,8 +5926,9 @@ collections {
       styles
        {
           style { name: "entry_single_textblock_style";
-             base: "font=Sans font_size=10 align=left color=#000 wrap=none";
+             base: "font=Sans font_size=10 color=#000 wrap=none";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -5882,8 +5936,9 @@ collections {
              tag:  "hilight" "+ font=Sans:style=Bold";
           }
           style { name: "entry_single_textblock_disabled_style";
-             base: "font=Sans font_size=10 align=left color=#00000080 wrap=none";
+             base: "font=Sans font_size=10 color=#00000080 wrap=none";
              tag:  "br" "\n";
+              tag:  "ps" "ps";
              tag:  "tab" "\t";
              tag:  "em" "+ font=Sans:style=Oblique";
              tag:  "b" "+ font=Sans:style=Bold";
@@ -6364,6 +6419,7 @@ collections {
         type: SWALLOW;
         description { state: "default" 0.0;
           fixed: 1 1;
+          visible: 0;
           align: 0.0 0.0;
           aspect: 1.0 1.0;
           aspect_preference: VERTICAL;
@@ -6377,6 +6433,10 @@ collections {
             offset: 4 -1;
           }
         }
+        description { state: "visible" 0.0;
+          inherit: "default" 0.0;
+          visible: 1;
+        }
       }
       part { name: "elm.text";
         type: TEXT;
@@ -6479,6 +6539,22 @@ collections {
         }
       }
     }
+    programs {
+      program {
+        name: "icon_show";
+        signal: "elm,state,icon,visible";
+        source: "elm";
+        action: STATE_SET "visible" 0.0;
+        target: "elm.swallow.icon";
+      }
+      program {
+        name: "icon_hide";
+        signal: "elm,state,icon,hidden";
+        source: "elm";
+        action: STATE_SET "default" 0.0;
+        target: "elm.swallow.icon";
+      }
+    }
   }
 
   group { name: "elm/bubble/top_right/default";
@@ -6491,6 +6567,7 @@ collections {
         type: SWALLOW;
         description { state: "default" 0.0;
           fixed: 1 1;
+          visible: 0;
           align: 1.0 0.0;
           aspect: 1.0 1.0;
           aspect_preference: VERTICAL;
@@ -6504,6 +6581,10 @@ collections {
             offset: -5 -1;
           }
         }
+        description { state: "visible" 0.0;
+          inherit: "default" 0.0;
+          visible: 1;
+        }
       }
       part { name: "elm.text";
         type: TEXT;
@@ -6606,6 +6687,22 @@ collections {
         }
       }
     }
+    programs {
+      program {
+        name: "icon_show";
+        signal: "elm,state,icon,visible";
+        source: "elm";
+        action: STATE_SET "visible" 0.0;
+        target: "elm.swallow.icon";
+      }
+      program {
+        name: "icon_hide";
+        signal: "elm,state,icon,hidden";
+        source: "elm";
+        action: STATE_SET "default" 0.0;
+        target: "elm.swallow.icon";
+      }
+    }
   }
 
   group { name: "elm/bubble/bottom_left/default";
@@ -6618,6 +6715,7 @@ collections {
         type: SWALLOW;
         description { state: "default" 0.0;
           fixed: 1 1;
+          visible: 0;
           align: 0.0 1.0;
           aspect: 1.0 1.0;
           aspect_preference: VERTICAL;
@@ -6631,6 +6729,10 @@ collections {
             offset: 4 -5;
           }
         }
+        description { state: "visible" 0.0;
+          inherit: "default" 0.0;
+          visible: 1;
+        }
       }
       part { name: "elm.text";
         type: TEXT;
@@ -6733,6 +6835,22 @@ collections {
         }
       }
     }
+    programs {
+      program {
+        name: "icon_show";
+        signal: "elm,state,icon,visible";
+        source: "elm";
+        action: STATE_SET "visible" 0.0;
+        target: "elm.swallow.icon";
+      }
+      program {
+        name: "icon_hide";
+        signal: "elm,state,icon,hidden";
+        source: "elm";
+        action: STATE_SET "default" 0.0;
+        target: "elm.swallow.icon";
+      }
+    }
   }
 
   group { name: "elm/bubble/bottom_right/default";
@@ -6745,6 +6863,7 @@ collections {
         type: SWALLOW;
         description { state: "default" 0.0;
           fixed: 1 1;
+          visible: 0.0;
           align: 1.0 1.0;
           aspect: 1.0 1.0;
           aspect_preference: VERTICAL;
@@ -6758,6 +6877,10 @@ collections {
             offset: -5 -5;
           }
         }
+        description { state: "visible" 0.0;
+          inherit: "default" 0.0;
+          visible: 1;
+        }
       }
       part { name: "elm.text";
         type: TEXT;
@@ -6860,6 +6983,22 @@ collections {
         }
       }
     }
+    programs {
+      program {
+        name: "icon_show";
+        signal: "elm,state,icon,visible";
+        source: "elm";
+        action: STATE_SET "visible" 0.0;
+        target: "elm.swallow.icon";
+      }
+      program {
+        name: "icon_hide";
+        signal: "elm,state,icon,hidden";
+        source: "elm";
+        action: STATE_SET "default" 0.0;
+        target: "elm.swallow.icon";
+      }
+    }
   }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -6939,6 +7078,78 @@ collections {
         }
      }
    }
+   
+   group { name: "elm/photo/base/shadow";
+       images {
+                       image: "shadow.png" COMP;
+                       image: "black.png" COMP;
+       }
+       script {
+       public message(Msg_Type:type, id, ...) {
+               if( (type==MSG_INT_SET) && (id==0) )
+               {
+               new w;
+               new h;
+           
+               custom_state(PART:"size", "default", 0.0);
+
+               w = getarg(2);
+               h = getarg(3);
+               set_state_val(PART:"size", STATE_REL1_OFFSET, - w/2, - h/2);
+               set_state_val(PART:"size", STATE_REL2_OFFSET, w/2 + 1, h/2 + 1);
+               set_state(PART:"size", "custom", 0.0);
+               }
+       }
+       }
+       parts {
+       part { name: "size";
+               type: SWALLOW;
+               description { state: "default" 0.0;
+                       rel1.relative: 0.5 0.5;
+                       rel2.relative: 0.5 0.5;
+               }
+               }
+       part {
+               name: "shadow";
+               type: IMAGE;
+               repeat_events: 1;
+               description {
+               state: "default" 0.0;
+               rel1.to: "size";
+               rel2.to: "size";
+               rel1.relative: -0.06 -0.06;
+               rel2.relative: 1.07 1.07; 
+               image.normal: "shadow.png";
+               }
+       }
+       
+       
+               part { name: "elm.swallow.content";
+               type: SWALLOW;
+               description { state: "default" 0.0;
+               rel1.offset: 3 3;
+               rel2.offset: -3 -3;
+                       fixed: 1 1;
+               }
+               }
+               
+               part {
+               name: "border";
+               type: IMAGE;
+               repeat_events: 1;
+               description {
+               state: "default" 0.0;
+               visible: 1;
+               color: 0 0 0 255;
+               rel1.to: "size";
+               rel2.to: "size";
+               image.normal: "black.png";
+               image.border: 1 1 1 1;
+               image.middle: 0;
+               }
+       }
+               }
+   }
 
 ///////////////////////////////////////////////////////////////////////////////
    group { name: "elm/thumb/base/default";
@@ -7498,7 +7709,7 @@ collections {
                   }
           }
    }
-   group { name: "elm/notify/base/default";
+   group { name: "elm/notify/top/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -7596,7 +7807,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/center";
+   group { name: "elm/notify/center/default";
        //this group is a design similar to the inwin group
        images {
            image: "bt_dis_base.png" COMP;
@@ -7653,7 +7864,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/bottom";
+   group { name: "elm/notify/bottom/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -7751,7 +7962,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/left";
+   group { name: "elm/notify/left/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -7849,7 +8060,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/right";
+   group { name: "elm/notify/right/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -7947,7 +8158,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/top_left";
+   group { name: "elm/notify/top_left/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -8045,7 +8256,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/top_right";
+   group { name: "elm/notify/top_right/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -8143,7 +8354,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/bottom_left";
+   group { name: "elm/notify/bottom_left/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -8241,7 +8452,7 @@ collections {
            }
        }
    }
-   group { name: "elm/notify/base/bottom_right";
+   group { name: "elm/notify/bottom_right/default";
        //this group is a design similar to the inwin group
        images {
            image: "shad_circ.png" COMP;
@@ -8344,13 +8555,15 @@ collections {
    group { name: "elm/slideshow/base/default";
       data {
          item: transitions "fade black_fade horizontal vertical square";
+         item: layouts "fullscreen not_fullscreen";
       }
       parts {
          part { name: "whole";
+               type: RECT;
             description {
                state: "default" 0.0;
                visible: 1;
-               color: 0 0 0 0;
+               color: 20 20 20 255;
             }
          }
          part { name: "image_1_whole";
@@ -8413,6 +8626,11 @@ collections {
                rel1.relative: 0.0 1.0;
                rel2.relative: 1.0 2.0;
             }
+            description {
+               state: "square_prev_next" 0.0;
+               inherit: "default" 0.0;
+               color: 255 255 255 0;
+            }
          }
          part { name: "image_2_whole";
             description {
@@ -8507,6 +8725,14 @@ collections {
                rel2.to: "image_1_whole";
                color: 255 255 255 255;
             }
+            description {
+               state: "not_fullscreen" 0.0;
+               rel1.relative: 0.1 0.1;
+               rel1.to: "image_1_whole";
+               rel2.relative: 0.9 0.9;
+               rel2.to: "image_1_whole";
+               color: 255 255 255 255;
+            }
          }
          part { name: "elm.swallow.2";
             type: SWALLOW;
@@ -8517,6 +8743,14 @@ collections {
                rel1.to: "image_2_whole";
                rel2.to: "image_2_whole";
             }
+            description {
+               state: "not_fullscreen" 0.0;
+               color: 255 255 255 255;
+               rel1.relative: 0.1 0.1;
+               rel1.to: "image_2_whole";
+               rel2.relative: 0.9 0.9;
+               rel2.to: "image_2_whole";
+            }
          }
          part { name: "events_catcher";
             type: RECT;
@@ -8529,6 +8763,24 @@ collections {
          }
       }
       programs {
+       //Substyle
+       program { name: "layout_fullscreen";
+            signal: "layout,fullscreen";
+            source: "slideshow";
+            action: STATE_SET "default" 0.0;
+            target: "elm.swallow.1";
+            target: "elm.swallow.2";
+            transition: SINUSOIDAL 1.0;
+        }
+        program { name: "layout_not_fullscreen";
+            signal: "layout,not_fullscreen";
+            source: "slideshow";
+            action: STATE_SET "not_fullscreen" 0.0;
+            target: "elm.swallow.1";
+            target: "elm.swallow.2";
+            transition: SINUSOIDAL 1.0;
+         } 
+        //
          program { name: "fade_next";
             signal: "fade,next";
             source: "slideshow";
@@ -8669,6 +8921,7 @@ collections {
          program { name: "square_next_2";
             action: STATE_SET "square_prev_next" 0.0;
             target: "image_2_whole";
+            target: "image_1_whole";
             transition: SINUSOIDAL 1.5;
             after: "end";
          }
@@ -8680,13 +8933,14 @@ collections {
             after: "square_next_2";
          }
          program { name: "end";
+            action: SIGNAL_EMIT "end" "slideshow";
+         }
+         program { name: "end_signal";
+           signal: "anim,end";
+           source: "slideshow";
             action: STATE_SET "default" 0.0;
             target: "image_1_whole";
             target: "image_2_whole";
-            after: "end_signal";
-         }
-         program { name: "end_signal";
-            action: SIGNAL_EMIT "end" "slideshow";
          }
       }
    }
@@ -13102,6 +13356,7 @@ collections {
            style { name: "genlist_style";
                base: "font=Sans font_size=10 align=left valign=0.5 color=#000";
                tag:  "br" "\n";
+               tag:  "ps" "ps";
                tag:  "hilight" "+ font=Sans:style=Bold";
                tag:  "b" "+ font=Sans:style=Bold";
                tag:  "tab" "\t";
@@ -13109,6 +13364,7 @@ collections {
            style { name: "genlist_selected_style";
                base: "font=Sans font_size=10 align=left valign=0.5 color=#fff";
                tag:  "br" "\n";
+               tag:  "ps" "ps";
                tag:  "hilight" "+ font=Sans:style=Bold";
                tag:  "b" "+ font=Sans:style=Bold";
                tag:  "tab" "\t";
@@ -18452,6 +18708,14 @@ collections {
         }
       }
       programs {
+        program { name: "push_start";
+           signal: "elm,action,push";
+           source: "elm";
+           action:  STATE_SET "hidden" 0.0;
+           target: "base";
+           target: "clip";
+            after: "show_start2";
+        }
          program { name: "show_start";
            signal: "elm,action,show";
            source: "elm";
@@ -18470,6 +18734,14 @@ collections {
          program { name: "show_end";
             action: SIGNAL_EMIT "elm,action,show,finished" "";
         }
+         program { name: "pop_start";
+           signal: "elm,action,pop";
+           source: "elm";
+           action:  STATE_SET "visible" 0.0;
+           target: "base";
+           target: "clip";
+            after: "hide_start2";
+        }
          program { name: "hide_start";
            signal: "elm,action,hide";
            source: "elm";
@@ -18498,403 +18770,844 @@ collections {
       }
    }
 
-   group { name: "elm/pager/base/fade";
-       data.item: "onshow" "raise";
-       // other options
-       //      data.item: "onhide" "lower";
-       //      data.item: "onshow" "lower";
-       images {
-           image: "frame_1.png" COMP;
-           image: "frame_2.png" COMP;
-           image: "dia_grad.png" COMP;
-       }
-       parts {
-           part { name: "clip_base";
-               type: RECT;
-               mouse_events: 0;
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: -9999 -9999;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: 9999 9999;
-                   }
-                   color: 255 255 255 120;
-               }
-               description { state: "visible" 0.0;
-                   inherit: "default" 0.0;
-               }
-               description { state: "hidden" 0.0;
-                   inherit: "default" 0.0;
-                   color: 255 255 255 0;
-                   visible: 0;
-               }
-           }
-           part { name: "clip";
-               type: RECT;
-               mouse_events: 0;
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: -9999 -9999;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: 9999 9999;
-                   }
-                   color: 255 255 255 255;
-               }
-               description { state: "visible" 0.0;
-                   inherit: "default" 0.0;
-               }
-               description { state: "hidden" 0.0;
-                   inherit: "default" 0.0;
-                   color: 255 255 255 0;
-                   visible: 0;
-               }
-           }
-           part { name: "base0";
-               mouse_events:  0;
-               clip_to: "clip_base";
-               description { state: "default" 0.0;
-                   image.normal: "dia_grad.png";
-                   rel1.to: "over";
-                   rel2.to: "over";
-                   fill {
-                       smooth: 0;
-                       size {
-                           relative: 0.0 1.0;
-                           offset: 64 0;
-                       }
-                   }
-               }
-           }
-           part { name: "base";
-               mouse_events:  0;
-               clip_to: "clip_base";
-               description { state: "default" 0.0;
-                   image {
-                       normal: "frame_2.png";
-                       border: 5 5 32 26;
-                       middle: 0;
-                   }
-                   fill.smooth : 0;
-               }
-           }
-           part { name: "over";
-               mouse_events:  0;
-               clip_to: "clip";
-               description { state:    "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: 4 4;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: -5 -5;
-                   }
-                   image {
-                       normal: "frame_1.png";
-                       border: 2 2 28 22;
-                       middle: 0;
-                   }
-                   fill.smooth : 0;
-               }
-           }
-           part { name: "elm.swallow.content";
-               type: SWALLOW;
-               clip_to: "clip";
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: 8 8;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: -9 -9;
-                   }
-               }
-           }
-       }
-       programs {
-           program { name: "show_start";
-               signal: "elm,action,show";
-               source: "elm";
-               action:  STATE_SET "hidden" 0.0;
-               target: "clip";
-               target: "clip_base";
-               after: "show_start2";
-           }
-           program { name: "show_start2";
-               action:  STATE_SET "visible" 0.0;
-               transition: DECELERATE 0.5;
-               target: "clip";
-               target: "clip_base";
-               after: "show_end";
-           }
-           program { name: "show_end";
-               action: SIGNAL_EMIT "elm,action,show,finished" "";
-           }
-           program { name: "hide_start";
-               signal: "elm,action,hide";
-               source: "elm";
-               action:  STATE_SET "visible" 0.0;
-               target: "clip";
-               target: "clip_base";
-               after: "hide_start2";
-           }
-           program { name: "hide_start2";
-               action:  STATE_SET "hidden" 0.0;
-               transition: DECELERATE 0.5;
-               target: "clip";
-               target: "clip_base";
-               after: "hide_end";
-           }
-           program { name: "hide_end";
-               action: SIGNAL_EMIT "elm,action,hide,finished" "";
-           }
-           program { name: "reset";
-               signal: "elm,action,reset";
-               source: "elm";
-               action:  STATE_SET "default" 0.0;
-               target: "clip_base";
-               target: "clip";
-           }
-       }
-   }
-   group { name: "elm/pager/base/fade_translucide";
-       data.item: "onshow" "raise";
-       // other options
-       //      data.item: "onhide" "lower";
-       //      data.item: "onshow" "lower";
-       images {
-           image: "frame_1.png" COMP;
-           image: "frame_2.png" COMP;
-           image: "dia_grad.png" COMP;
-       }
-       parts {
-           part { name: "clip_base";
-               type: RECT;
-               mouse_events: 0;
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: -9999 -9999;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: 9999 9999;
-                   }
-                   color: 255 255 255 120;
-               }
-               description { state: "visible" 0.0;
-                   inherit: "default" 0.0;
-               }
-               description { state: "hidden" 0.0;
-                   inherit: "default" 0.0;
-                   color: 255 255 255 0;
-                   visible: 0;
-               }
-           }
-           part { name: "clip";
-               type: RECT;
-               mouse_events: 0;
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: -9999 -9999;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: 9999 9999;
-                   }
-                   color: 255 255 255 255;
-               }
-               description { state: "visible" 0.0;
-                   inherit: "default" 0.0;
-               }
-               description { state: "hidden" 0.0;
-                   inherit: "default" 0.0;
-                   color: 255 255 255 0;
-                   visible: 0;
-               }
-           }
-           part { name: "base0";
-               mouse_events:  0;
-               clip_to: "clip_base";
-               description { state: "default" 0.0;
-                   image.normal: "dia_grad.png";
-                   rel1.to: "over";
-                   rel2.to: "over";
-                   fill {
-                       smooth: 0;
-                       size {
-                           relative: 0.0 1.0;
-                           offset: 64 0;
-                       }
-                   }
-               }
-           }
-           part { name: "base";
-               mouse_events:  0;
-               clip_to: "clip_base";
-               description { state: "default" 0.0;
-                   image {
-                       normal: "frame_2.png";
-                       border: 5 5 32 26;
-                       middle: 0;
-                   }
-                   fill.smooth : 0;
-               }
-           }
-           part { name: "over";
-               mouse_events:  0;
-               clip_to: "clip";
-               description { state:    "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: 4 4;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: -5 -5;
-                   }
-                   image {
-                       normal: "frame_1.png";
-                       border: 2 2 28 22;
-                       middle: 0;
-                   }
-                   fill.smooth : 0;
-               }
-           }
-           part { name: "elm.swallow.content";
-               type: SWALLOW;
-               clip_to: "clip";
-               description { state: "default" 0.0;
-                   rel1 {
-                       to: "base";
-                       offset: 8 8;
-                   }
-                   rel2 {
-                       to: "base";
-                       offset: -9 -9;
-                   }
-               }
-           }
-       }
-       programs {
-           program { name: "show_start";
-               signal: "elm,action,show";
-               source: "elm";
-               action:  STATE_SET "hidden" 0.0;
-               target: "clip";
-               target: "clip_base";
-               after: "show_start2";
-           }
-           program { name: "show_start2";
-               action:  STATE_SET "visible" 0.0;
-               transition: DECELERATE 0.5;
-               target: "clip";
-               target: "clip_base";
-               after: "show_end";
-           }
-           program { name: "show_end";
-               action: SIGNAL_EMIT "elm,action,show,finished" "";
-           }
-           program { name: "hide_start";
-               signal: "elm,action,hide";
-               source: "elm";
-               action:  STATE_SET "visible" 0.0;
-               target: "clip";
-               target: "clip_base";
-               after: "hide_start2";
-           }
-           program { name: "hide_start2";
-               action:  STATE_SET "hidden" 0.0;
-               transition: DECELERATE 0.5;
-               target: "clip";
-               target: "clip_base";
-               after: "hide_end";
-           }
-           program { name: "hide_end";
-               action: SIGNAL_EMIT "elm,action,hide,finished" "";
-           }
-           program { name: "reset";
-               signal: "elm,action,reset";
-               source: "elm";
-               action:  STATE_SET "default" 0.0;
-               target: "clip_base";
-               target: "clip";
-           }
-       }
-   }
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// FIXME: this doesn't look too hot. need to fix it up
-   group { name: "elm/progressbar/horizontal/default";
+   group { name: "elm/pager/base/slide";
       images {
-         image: "shelf_inset.png" COMP;
-         image: "bt_sm_base2.png" COMP;
-         image: "bt_sm_hilight.png" COMP;
-         image: "bt_sm_shine.png" COMP;
+        image: "frame_1.png" COMP;
+        image: "frame_2.png" COMP;
+        image: "dia_grad.png" COMP;
       }
       parts {
-         part { name: "elm.background.progressbar";
-            mouse_events: 0;
-            description {
-               state: "default" 0.0;
-               rel1 {
-                  relative: 0.0 0.0;
-                  offset: 0 0;
-               }
-               rel2 {
-                  relative: 1.0 1.0;
-               }
-            }
-         }
-         part { name: "elm.swallow.bar";
-            mouse_events: 0;
-            type: SWALLOW;
-            description {
-               min: 48 28;
-               max: 99999 28;
-               state: "default" 0.0;
-               rel1 {
-                  to_x: "elm.text";
-                  to_y: "elm.background.progressbar";
-                  relative: 1.0 0.0;
-               }
-               rel2 {
-                  to: "elm.background.progressbar";
-                  relative: 1.0 1.0;
-               }
-            }
-         }
-         part { name: "elm.swallow.content";
-            type: SWALLOW;
-            description { state: "default" 0.0;
-               visible: 0;
-               align: 0.0 0.5;
-               rel1 {
-                  offset: 4 0;
-                  to_y: "elm.background.progressbar";
-               }
-               rel2 {
-                  offset: 3 -1;
-                  relative: 0.0 1.0;
-                  to_y: "elm.background.progressbar";
-               }
-            }
-            description { state: "visible" 0.0;
-               inherit: "default" 0.0;
-               visible: 1;
-               aspect: 1.0 1.0;
-               aspect_preference: VERTICAL;
-               rel2.offset: 4 -1;
+        part { name: "clip";
+           type: RECT;
+           mouse_events: 0;
+           description { state: "default" 0.0;
+              rel1 {
+                 to: "base";
+                 offset: -9999 -9999;
+              }
+              rel2 {
+                 to: "base";
+                 offset: 9999 9999;
+              }
+              color: 255 255 255 255;
+           }
+           description { state: "visible" 0.0;
+              inherit: "default" 0.0;
+           }
+           description { state: "hidden" 0.0;
+              inherit: "default" 0.0;
+              color: 255 255 255 0;
+              visible: 0;
+           }
+           description { state: "hidden2" 0.0;
+              inherit: "default" 0.0;
+              color: 255 255 255 0;
+              visible: 0;
+           }
+        }
+        part { name: "base0";
+           mouse_events:  0;
+           clip_to: "clip";
+           description { state: "default" 0.0;
+              image.normal: "dia_grad.png";
+              rel1.to: "over";
+              rel2.to: "over";
+              fill {
+                 smooth: 0;
+                 size {
+                    relative: 0.0 1.0;
+                    offset: 64 0;
+                 }
+              }
+           }
+        }
+        part { name: "base";
+           mouse_events:  0;
+           clip_to: "clip";
+           description { state: "default" 0.0;
+              image {
+                 normal: "frame_2.png";
+                 border: 5 5 32 26;
+                 middle: 0;
+              }
+              fill.smooth : 0;
+           }
+           description { state: "hidden" 0.0;
+              inherit: "default" 0.0;
+              rel1.relative: -1.0 0.0;
+              rel2.relative: 0.0 1.0;
+           }
+           description { state: "hidden2" 0.0;
+              inherit: "default" 0.0;
+              rel1.relative: 1.0 0.0;
+              rel2.relative: 2.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: "over";
+           mouse_events:  0;
+           clip_to: "clip";
+           description { state:    "default" 0.0;
+              rel1 {
+                 to: "base";
+                 offset: 4 4;
+              }
+              rel2 {
+                 to: "base";
+                 offset: -5 -5;
+              }
+              image {
+                 normal: "frame_1.png";
+                 border: 2 2 28 22;
+                 middle: 0;
+              }
+              fill.smooth : 0;
+           }
+        }
+        part { name: "elm.swallow.content";
+           type: SWALLOW;
+           clip_to: "clip";
+           description { state: "default" 0.0;
+              rel1 {
+                 to: "base";
+                 offset: 8 8;
+              }
+              rel2 {
+                 to: "base";
+                 offset: -9 -9;
+              }
+           }
+        }
+      }
+      programs {
+        program { name: "push_start";
+           signal: "elm,action,push";
+           source: "elm";
+           action:  STATE_SET "hidden2" 0.0;
+           target: "base";
+           target: "clip";
+           after: "show_start2";
+        }
+        program { name: "show_start";
+           signal: "elm,action,show";
+           source: "elm";
+           action:  STATE_SET "hidden" 0.0;
+           target: "base";
+           target: "clip";
+           after: "show_start2";
+        }
+        program { name: "show_start2";
+           action:  STATE_SET "visible" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "show_end";
+        }
+        program { name: "show_end";
+           action: SIGNAL_EMIT "elm,action,show,finished" "";
+        }
+        program { name: "pop_start";
+           signal: "elm,action,pop";
+           source: "elm";
+           action:  STATE_SET "visible" 0.0;
+           target: "base";
+           target: "clip";
+           after: "pop_start2";
+        }
+        program { name: "pop_start2";
+           action:  STATE_SET "hidden2" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "hide_end";
+        }
+        program { name: "hide_start";
+           signal: "elm,action,hide";
+           source: "elm";
+           action:  STATE_SET "visible" 0.0;
+           target: "base";
+           target: "clip";
+           after: "hide_start2";
+        }
+        program { name: "hide_start2";
+           action:  STATE_SET "hidden" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "hide_end";
+        }
+        program { name: "hide_end";
+           action: SIGNAL_EMIT "elm,action,hide,finished" "";
+        }
+        program { name: "reset";
+           signal: "elm,action,reset";
+           source: "elm";
+           action:  STATE_SET "default" 0.0;
+           target: "base";
+           target: "clip";
+        }
+      }
+   }
+   group { name: "elm/pager/base/slide_invisible";
+      parts {
+        part { name: "clip";
+           type: RECT;
+           mouse_events: 0;
+           description { state: "default" 0.0;
+              rel1 {
+                 to: "base";
+                 offset: -9999 -9999;
+           }
+              rel2 {
+                 to: "base";
+                 offset: 9999 9999;
+              }
+              color: 255 255 255 255;
+           }
+           description { state: "visible" 0.0;
+              inherit: "default" 0.0;
+           }
+           description { state: "hidden" 0.0;
+              inherit: "default" 0.0;
+              color: 255 255 255 0;
+              visible: 0;
+           }
+           description { state: "hidden2" 0.0;
+              inherit: "default" 0.0;
+              color: 255 255 255 0;
+              visible: 0;
+           }
+        }
+        part { name: "base";
+           type: RECT;
+           mouse_events:  0;
+           clip_to: "clip";
+           description { state: "default" 0.0;
+              color: 0 0 0 0;
+           }
+           description { state: "hidden" 0.0;
+              color: 0 0 0 0;
+              rel1.relative: -1.0 0.0;
+              rel2.relative: 0.0 1.0;
+           }
+           description { state: "hidden2" 0.0;
+              color: 0 0 0 0;
+              rel1.relative: 1.0 0.0;
+              rel2.relative: 2.0 1.0;
+           }
+           description { state: "visible" 0.0;
+              color: 0 0 0 0;
+              rel1.relative: 0.0 0.0;
+              rel2.relative: 1.0 1.0;
+           }
+        }
+        part { name: "elm.swallow.content";
+           type: SWALLOW;
+           clip_to: "clip";
+           description { state: "default" 0.0;
+              rel1.to: "base";
+              rel2.to: "base";
+           }
+        }
+      }
+      programs {
+        program { name: "push_start";
+           signal: "elm,action,push";
+           source: "elm";
+           action:  STATE_SET "hidden2" 0.0;
+           target: "base";
+           target: "clip";
+           after: "show_start2";
+        }
+        program { name: "show_start";
+           signal: "elm,action,show";
+           source: "elm";
+           action:  STATE_SET "hidden" 0.0;
+           target: "base";
+           target: "clip";
+           after: "show_start2";
+        }
+        program { name: "show_start2";
+           action:  STATE_SET "visible" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "show_end";
+        }
+        program { name: "show_end";
+           action: SIGNAL_EMIT "elm,action,show,finished" "";
+        }
+        program { name: "pop_start";
+           signal: "elm,action,pop";
+           source: "elm";
+           action:  STATE_SET "visible" 0.0;
+           target: "base";
+           target: "clip";
+           after: "pop_start2";
+        }
+        program { name: "pop_start2";
+           action:  STATE_SET "hidden2" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "hide_end";
+        }
+        program { name: "hide_start";
+           signal: "elm,action,hide";
+           source: "elm";
+           action:  STATE_SET "visible" 0.0;
+           target: "base";
+           target: "clip";
+           after: "hide_start2";
+        }
+        program { name: "hide_start2";
+           action:  STATE_SET "hidden" 0.0;
+           transition: DECELERATE 0.5;
+           target: "base";
+           target: "clip";
+           after: "hide_end";
+        }
+        program { name: "hide_end";
+           action: SIGNAL_EMIT "elm,action,hide,finished" "";
+        }
+        program { name: "reset";
+           signal: "elm,action,reset";
+           source: "elm";
+           action:  STATE_SET "default" 0.0;
+           target: "base";
+           target: "clip";
+        }
+      }
+   }
+
+   group { name: "elm/pager/base/fade";
+       data.item: "onshow" "raise";
+       // other options
+       //      data.item: "onhide" "lower";
+       //      data.item: "onshow" "lower";
+       images {
+           image: "frame_1.png" COMP;
+           image: "frame_2.png" COMP;
+           image: "dia_grad.png" COMP;
+       }
+       parts {
+           part { name: "clip_base";
+               type: RECT;
+               mouse_events: 0;
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: -9999 -9999;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: 9999 9999;
+                   }
+                   color: 255 255 255 120;
+               }
+               description { state: "visible" 0.0;
+                   inherit: "default" 0.0;
+               }
+               description { state: "hidden" 0.0;
+                   inherit: "default" 0.0;
+                   color: 255 255 255 0;
+                   visible: 0;
+               }
+           }
+           part { name: "clip";
+               type: RECT;
+               mouse_events: 0;
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: -9999 -9999;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: 9999 9999;
+                   }
+                   color: 255 255 255 255;
+               }
+               description { state: "visible" 0.0;
+                   inherit: "default" 0.0;
+               }
+               description { state: "hidden" 0.0;
+                   inherit: "default" 0.0;
+                   color: 255 255 255 0;
+                   visible: 0;
+               }
+           }
+           part { name: "base0";
+               mouse_events:  0;
+               clip_to: "clip_base";
+               description { state: "default" 0.0;
+                   image.normal: "dia_grad.png";
+                   rel1.to: "over";
+                   rel2.to: "over";
+                   fill {
+                       smooth: 0;
+                       size {
+                           relative: 0.0 1.0;
+                           offset: 64 0;
+                       }
+                   }
+               }
+           }
+           part { name: "base";
+               mouse_events:  0;
+               clip_to: "clip_base";
+               description { state: "default" 0.0;
+                   image {
+                       normal: "frame_2.png";
+                       border: 5 5 32 26;
+                       middle: 0;
+                   }
+                   fill.smooth : 0;
+               }
+           }
+           part { name: "over";
+               mouse_events:  0;
+               clip_to: "clip";
+               description { state:    "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: 4 4;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: -5 -5;
+                   }
+                   image {
+                       normal: "frame_1.png";
+                       border: 2 2 28 22;
+                       middle: 0;
+                   }
+                   fill.smooth : 0;
+               }
+           }
+           part { name: "elm.swallow.content";
+               type: SWALLOW;
+               clip_to: "clip";
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: 8 8;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: -9 -9;
+                   }
+               }
+           }
+       }
+       programs {
+           program { name: "push_start";
+               signal: "elm,action,push";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "show_start2";
+           }
+           program { name: "show_start";
+               signal: "elm,action,show";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "show_start2";
+           }
+           program { name: "show_start2";
+               action:  STATE_SET "visible" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               target: "clip_base";
+               after: "show_end";
+           }
+           program { name: "show_end";
+               action: SIGNAL_EMIT "elm,action,show,finished" "";
+           }
+           program { name: "pop_start";
+               signal: "elm,action,pop";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_start2";
+           }
+           program { name: "hide_start";
+               signal: "elm,action,hide";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_start2";
+           }
+           program { name: "hide_start2";
+               action:  STATE_SET "hidden" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_end";
+           }
+           program { name: "hide_end";
+               action: SIGNAL_EMIT "elm,action,hide,finished" "";
+           }
+           program { name: "reset";
+               signal: "elm,action,reset";
+               source: "elm";
+               action:  STATE_SET "default" 0.0;
+               target: "clip_base";
+               target: "clip";
+           }
+       }
+   }
+   group { name: "elm/pager/base/fade_translucide";
+       data.item: "onshow" "raise";
+       // other options
+       //      data.item: "onhide" "lower";
+       //      data.item: "onshow" "lower";
+       images {
+           image: "frame_1.png" COMP;
+           image: "frame_2.png" COMP;
+           image: "dia_grad.png" COMP;
+       }
+       parts {
+           part { name: "clip_base";
+               type: RECT;
+               mouse_events: 0;
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: -9999 -9999;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: 9999 9999;
+                   }
+                   color: 255 255 255 120;
+               }
+               description { state: "visible" 0.0;
+                   inherit: "default" 0.0;
+               }
+               description { state: "hidden" 0.0;
+                   inherit: "default" 0.0;
+                   color: 255 255 255 0;
+                   visible: 0;
+               }
+           }
+           part { name: "clip";
+               type: RECT;
+               mouse_events: 0;
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: -9999 -9999;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: 9999 9999;
+                   }
+                   color: 255 255 255 255;
+               }
+               description { state: "visible" 0.0;
+                   inherit: "default" 0.0;
+               }
+               description { state: "hidden" 0.0;
+                   inherit: "default" 0.0;
+                   color: 255 255 255 0;
+                   visible: 0;
+               }
+           }
+           part { name: "base0";
+               mouse_events:  0;
+               clip_to: "clip_base";
+               description { state: "default" 0.0;
+                   image.normal: "dia_grad.png";
+                   rel1.to: "over";
+                   rel2.to: "over";
+                   fill {
+                       smooth: 0;
+                       size {
+                           relative: 0.0 1.0;
+                           offset: 64 0;
+                       }
+                   }
+               }
+           }
+           part { name: "base";
+               mouse_events:  0;
+               clip_to: "clip_base";
+               description { state: "default" 0.0;
+                   image {
+                       normal: "frame_2.png";
+                       border: 5 5 32 26;
+                       middle: 0;
+                   }
+                   fill.smooth : 0;
+               }
+           }
+           part { name: "over";
+               mouse_events:  0;
+               clip_to: "clip";
+               description { state:    "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: 4 4;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: -5 -5;
+                   }
+                   image {
+                       normal: "frame_1.png";
+                       border: 2 2 28 22;
+                       middle: 0;
+                   }
+                   fill.smooth : 0;
+               }
+           }
+           part { name: "elm.swallow.content";
+               type: SWALLOW;
+               clip_to: "clip";
+               description { state: "default" 0.0;
+                   rel1 {
+                       to: "base";
+                       offset: 8 8;
+                   }
+                   rel2 {
+                       to: "base";
+                       offset: -9 -9;
+                   }
+               }
+           }
+       }
+       programs {
+           program { name: "push_start";
+               signal: "elm,action,push";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "show_start2";
+           }
+           program { name: "show_start";
+               signal: "elm,action,show";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "show_start2";
+           }
+           program { name: "show_start2";
+               action:  STATE_SET "visible" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               target: "clip_base";
+               after: "show_end";
+           }
+           program { name: "show_end";
+               action: SIGNAL_EMIT "elm,action,show,finished" "";
+           }
+           program { name: "pop_start";
+               signal: "elm,action,pop";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_start2";
+           }
+           program { name: "hide_start";
+               signal: "elm,action,hide";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_start2";
+           }
+           program { name: "hide_start2";
+               action:  STATE_SET "hidden" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               target: "clip_base";
+               after: "hide_end";
+           }
+           program { name: "hide_end";
+               action: SIGNAL_EMIT "elm,action,hide,finished" "";
+           }
+           program { name: "reset";
+               signal: "elm,action,reset";
+               source: "elm";
+               action:  STATE_SET "default" 0.0;
+               target: "clip_base";
+               target: "clip";
+           }
+       }
+   }
+   group { name: "elm/pager/base/fade_invisible";
+       data.item: "onshow" "raise";
+       // other options
+       //      data.item: "onhide" "lower";
+       //      data.item: "onshow" "lower";
+       parts {
+           part { name: "clip";
+               type: RECT;
+               mouse_events: 0;
+               description { state: "default" 0.0;
+                   rel1 {
+                       offset: -9999 -9999;
+                   }
+                   rel2 {
+                       offset: 9999 9999;
+                   }
+                   color: 255 255 255 255;
+               }
+               description { state: "visible" 0.0;
+                   inherit: "default" 0.0;
+               }
+               description { state: "hidden" 0.0;
+                   inherit: "default" 0.0;
+                   color: 255 255 255 0;
+                   visible: 0;
+               }
+           }
+           part { name: "elm.swallow.content";
+               type: SWALLOW;
+               clip_to: "clip";
+               description { state: "default" 0.0;
+                   rel1 {
+                       offset: 8 8;
+                   }
+                   rel2 {
+                       offset: -9 -9;
+                   }
+               }
+           }
+       }
+       programs {
+           program { name: "push_start";
+               signal: "elm,action,push";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               after: "show_start2";
+           }
+           program { name: "show_start";
+               signal: "elm,action,show";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "clip";
+               after: "show_start2";
+           }
+           program { name: "show_start2";
+               action:  STATE_SET "visible" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               after: "show_end";
+           }
+           program { name: "show_end";
+               action: SIGNAL_EMIT "elm,action,show,finished" "";
+           }
+           program { name: "pop_start";
+               signal: "elm,action,pop";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               after: "hide_start2";
+           }
+           program { name: "hide_start";
+               signal: "elm,action,hide";
+               source: "elm";
+               action:  STATE_SET "visible" 0.0;
+               target: "clip";
+               after: "hide_start2";
+           }
+           program { name: "hide_start2";
+               action:  STATE_SET "hidden" 0.0;
+               transition: DECELERATE 0.5;
+               target: "clip";
+               after: "hide_end";
+           }
+           program { name: "hide_end";
+               action: SIGNAL_EMIT "elm,action,hide,finished" "";
+           }
+           program { name: "reset";
+               signal: "elm,action,reset";
+               source: "elm";
+               action:  STATE_SET "default" 0.0;
+               target: "clip";
+           }
+       }
+   }
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// FIXME: this doesn't look too hot. need to fix it up
+   group { name: "elm/progressbar/horizontal/default";
+      images {
+         image: "shelf_inset.png" COMP;
+         image: "bt_sm_base2.png" COMP;
+         image: "bt_sm_hilight.png" COMP;
+         image: "bt_sm_shine.png" COMP;
+      }
+      parts {
+         part { name: "elm.background.progressbar";
+            mouse_events: 0;
+            description {
+               state: "default" 0.0;
+               rel1 {
+                  relative: 0.0 0.0;
+                  offset: 0 0;
+               }
+               rel2 {
+                  relative: 1.0 1.0;
+               }
+            }
+         }
+         part { name: "elm.swallow.bar";
+            mouse_events: 0;
+            type: SWALLOW;
+            description {
+               min: 48 28;
+               max: 99999 28;
+               state: "default" 0.0;
+               rel1 {
+                  to_x: "elm.text";
+                  to_y: "elm.background.progressbar";
+                  relative: 1.0 0.0;
+               }
+               rel2 {
+                  to: "elm.background.progressbar";
+                  relative: 1.0 1.0;
+               }
+            }
+         }
+         part { name: "elm.swallow.content";
+            type: SWALLOW;
+            description { state: "default" 0.0;
+               visible: 0;
+               align: 0.0 0.5;
+               rel1 {
+                  offset: 4 0;
+                  to_y: "elm.background.progressbar";
+               }
+               rel2 {
+                  offset: 3 -1;
+                  relative: 0.0 1.0;
+                  to_y: "elm.background.progressbar";
+               }
+            }
+            description { state: "visible" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+               aspect: 1.0 1.0;
+               aspect_preference: VERTICAL;
+               rel2.offset: 4 -1;
             }
          }
          part { name: "elm.text";
@@ -21364,6 +22077,7 @@ collections {
            style { name: "gengrid_style";
                base: "font=Sans font_size=10 align=left valign=0.5 color=#000";
                tag:  "br" "\n";
+               tag:  "ps" "ps";
                tag:  "hilight" "+ font=Sans:style=Bold";
                tag:  "b" "+ font=Sans:style=Bold";
                tag:  "tab" "\t";
@@ -21371,6 +22085,7 @@ collections {
            style { name: "gengrid_selected_style";
                base: "font=Sans font_size=10 align=left valign=0.5 color=#fff";
                tag:  "br" "\n";
+               tag:  "ps" "ps";
                tag:  "hilight" "+ font=Sans:style=Bold";
                tag:  "b" "+ font=Sans:style=Bold";
                tag:  "tab" "\t";
@@ -22536,396 +23251,1067 @@ collections {
                action:  STATE_SET "hidden" 0.0;
                target: "sb_vbar_clip_master";
            }
-           program { name: "vbar_show_always";
-               signal: "elm,action,show_always,vbar";
+           program { name: "vbar_show_always";
+               signal: "elm,action,show_always,vbar";
+               source: "elm";
+               script {
+                   new v;
+                   v = get_int(sbvis_v);
+                   v |= get_int(sbalways_v);
+                   if (!v) {
+                       set_int(sbalways_v, 1);
+                       emit("do-show-vbar", "");
+                       set_int(sbvis_v, 1);
+                   }
+               }
+           }
+           program { name: "vbar_show_notalways";
+               signal: "elm,action,show_notalways,vbar";
+               source: "elm";
+               script {
+                   new v;
+                   v = get_int(sbalways_v);
+                   if (v) {
+                       set_int(sbalways_v, 0);
+                       v = get_int(sbvis_v);
+                       if (!v) {
+                           emit("do-hide-vbar", "");
+                           set_int(sbvis_v, 0);
+                       }
+                   }
+               }
+           }
+           program { name: "sb_vbar_show";
+               signal: "do-show-vbar";
+               source: "";
+               action:  STATE_SET "default" 0.0;
+               transition: LINEAR 1.0;
+               target: "sb_vbar_clip";
+           }
+           program { name: "sb_vbar_hide";
+               signal: "do-hide-vbar";
+               source: "";
+               action:  STATE_SET "hidden" 0.0;
+               transition: LINEAR 1.0;
+               target: "sb_vbar_clip";
+           }
+
+           program { name: "hbar_show";
+               signal: "elm,action,show,hbar";
+               source: "elm";
+               action:  STATE_SET "default" 0.0;
+               target: "sb_hbar_clip_master";
+           }
+           program { name: "hbar_hide";
+               signal: "elm,action,hide,hbar";
+               source: "elm";
+               action:  STATE_SET "hidden" 0.0;
+               target: "sb_hbar_clip_master";
+           }
+           program { name: "hbar_show_always";
+               signal: "elm,action,show_always,hbar";
+               source: "elm";
+               script {
+                   new v;
+                   v = get_int(sbvis_h);
+                   v |= get_int(sbalways_h);
+                   if (!v) {
+                       set_int(sbalways_h, 1);
+                       emit("do-show-hbar", "");
+                       set_int(sbvis_h, 1);
+                   }
+               }
+           }
+           program { name: "hbar_show_notalways";
+               signal: "elm,action,show_notalways,hbar";
+               source: "elm";
+               script {
+                   new v;
+                   v = get_int(sbalways_h);
+                   if (v) {
+                       set_int(sbalways_h, 0);
+                       v = get_int(sbvis_h);
+                       if (!v) {
+                           emit("do-hide-hbar", "");
+                           set_int(sbvis_h, 0);
+                       }
+                   }
+               }
+           }
+           program { name: "sb_hbar_show";
+               signal: "do-show-hbar";
+               source: "";
+               action:  STATE_SET "default" 0.0;
+               transition: LINEAR 1.0;
+               target: "sb_hbar_clip";
+           }
+           program { name: "sb_hbar_hide";
+               signal: "do-hide-hbar";
+               source: "";
+               action:  STATE_SET "hidden" 0.0;
+               transition: LINEAR 1.0;
+               target: "sb_hbar_clip";
+           }
+
+           program { name: "scroll";
+               signal: "elm,action,scroll";
                source: "elm";
                script {
                    new v;
                    v = get_int(sbvis_v);
                    v |= get_int(sbalways_v);
                    if (!v) {
-                       set_int(sbalways_v, 1);
                        emit("do-show-vbar", "");
                        set_int(sbvis_v, 1);
                    }
+                   v = get_int(sbvis_h);
+                   v |= get_int(sbalways_h);
+                   if (!v) {
+                       emit("do-show-hbar", "");
+                       set_int(sbvis_h, 1);
+                   }
+                   v = get_int(sbvis_timer);
+                   if (v > 0) cancel_timer(v);
+                   v = timer(2.0, "timer0", 0);
+                   set_int(sbvis_timer, v);
                }
            }
-           program { name: "vbar_show_notalways";
-               signal: "elm,action,show_notalways,vbar";
+           program { name: "go1";
+               signal: "elm,state,busy,start";
                source: "elm";
-               script {
-                   new v;
-                   v = get_int(sbalways_v);
-                   if (v) {
-                       set_int(sbalways_v, 0);
-                       v = get_int(sbvis_v);
-                       if (!v) {
-                           emit("do-hide-vbar", "");
-                           set_int(sbvis_v, 0);
-                       }
-                   }
-               }
+               action: STATE_SET "active" 0.0;
+               transition: SINUSOIDAL 1.0;
+               target:  "busy_clip";
            }
-           program { name: "sb_vbar_show";
-               signal: "do-show-vbar";
-               source: "";
-               action:  STATE_SET "default" 0.0;
-               transition: LINEAR 1.0;
-               target: "sb_vbar_clip";
+           program { name: "go2";
+               signal: "elm,state,busy,start";
+               source: "elm";
+               action: STATE_SET "default" 0.0;
+               transition: LINEAR 0.5;
+               target: "busy";
+               after:  "go2";
            }
-           program { name: "sb_vbar_hide";
-               signal: "do-hide-vbar";
-               source: "";
-               action:  STATE_SET "hidden" 0.0;
-               transition: LINEAR 1.0;
-               target: "sb_vbar_clip";
+           program { name: "stop1";
+               signal: "elm,state,busy,stop";
+               source: "elm";
+               action: STATE_SET "default" 0.0;
+               transition: SINUSOIDAL 1.0;
+               target: "busy_clip";
+               after: "stop2";
            }
+         program { name: "stop2";
+            action: ACTION_STOP;
+            target: "go2";
+         }
+      }
+   }
+   group { name: "elm/map/marker/radio/default";
+        data {
+            item: size_w 24;
+            item: size_h 24;
+            item: size_max_w 58;
+            item: size_max_h 58;
+        }
+        images {
+               image: "map_item.png" COMP;
+        }
+        parts {
+            part { name: "whole";
+                description { state: "default" 0.0;
+                }
+            }
+            part { name: "base";
+                ignore_flags: ON_HOLD;
+                description { state: "default" 0.0;
+                    image.normal: "map_item.png";
+                }
+            }
+            part { name: "elm.icon";
+                type: SWALLOW;
+                clip_to: "whole";
+                mouse_events:  0;
+                description { state: "default" 0.0;
+                    rel1.relative: 0.27 0.27;
+                    rel2.relative: 0.73 0.73;
+                }
+            }
+            part { name: "elm.text";
+                type:          TEXT;
+                effect:        SOFT_SHADOW;
+                mouse_events:  0;
+                scale: 1;
+                description { state: "default" 0.0;
+                    align:    0.5 0.5;
+                    color: 224 224 224 255;
+                    color3: 0 0 0 64;
+                    rel1.relative: 0.28 0.25;
+                    rel2.relative: 0.75 0.75;
+                    text {
+                        font:     "Sans,Edje-Vera";
+                        size:     10;
+                        min:      0 0;
+                        align:    0.5 0.5;
+                    }
+                }
+            }
+       }
+       programs {
+            program { name: "open";
+                signal: "mouse,clicked,1";
+                source: "base";
+                action: SIGNAL_EMIT "open" "elm";
+            }
+            program { name: "bringin";
+                signal: "mouse,down,1,double";
+                source: "base";
+                action: SIGNAL_EMIT "bringin" "elm";
+            }
+       }
+   }
+   group { name: "elm/map/marker/radio2/default";
+        data {
+            item: size_w 24;
+            item: size_h 24;
+            item: size_max_w 58;
+            item: size_max_h 58;
+        }
+        images {
+               image: "map_item_2.png" COMP;
+        }
+        parts {
+            part { name: "base";
+                ignore_flags: ON_HOLD;
+                description { state: "default" 0.0;
+                    image.normal: "map_item_2.png";
+                }
+            }
+            part { name: "elm.text";
+                type:          TEXT;
+                effect:        SOFT_SHADOW;
+                mouse_events:  0;
+                scale: 1;
+                description { state: "default" 0.0;
+                    align:    0.5 0.5;
+                    color: 224 224 224 255;
+                    color3: 0 0 0 64;
+                    rel1.relative: 0.28 0.25;
+                    rel2.relative: 0.75 0.75;
+                    text {
+                        font:     "Sans,Edje-Vera";
+                        size:     10;
+                        min:      0 0;
+                        align:    0.5 0.5;
+                    }
+                }
+            }
+       }
+       programs {
+            program { name: "open";
+                signal: "mouse,clicked,1";
+                source: "base";
+                action: SIGNAL_EMIT "open" "elm";
+            }
+            program { name: "bringin";
+                signal: "mouse,down,1,double";
+                source: "base";
+                action: SIGNAL_EMIT "bringin" "elm";
+            }
+       }
+   }
+   group { name: "elm/map/marker/empty/default";
+        data {
+            item: size_w 22;
+            item: size_h 22;
+            item: size_max_w 64;
+            item: size_max_h 64;
+        }
+        parts {
+            part { name: "whole";
+                description { state: "default" 0.0;
+                }
+            }
+            part { name: "base";
+                ignore_flags: ON_HOLD;
+                description { state: "default" 0.0;
+                }
+            }
+            part { name: "elm.icon";
+                type: SWALLOW;
+                clip_to: "whole";
+                mouse_events:  0;
+                description { state: "default" 0.0;
+                }
+            }
+            part { name: "elm.text";
+                type:          TEXT;
+                effect:        SOFT_SHADOW;
+                mouse_events:  0;
+                scale: 1;
+                description { state: "default" 0.0;
+                    align:    0.5 0.5;
+                    color: 224 224 224 255;
+                    color3: 0 0 0 64;
+                    rel1.relative: 0.28 0.25;
+                    rel2.relative: 0.75 0.75;
+                    text {
+                        font:     "Sans,Edje-Vera";
+                        size:     10;
+                        min:      0 0;
+                        align:    0.5 0.5;
+                    }
+                }
+            }
+       }
+       programs {
+            program { name: "open";
+                signal: "mouse,clicked,1";
+                source: "base";
+                action: SIGNAL_EMIT "open" "elm";
+            }
+            program { name: "bringin";
+                signal: "mouse,down,1,double";
+                source: "base";
+                action: SIGNAL_EMIT "bringin" "elm";
+            }
+       }
+   }
+   group { name: "elm/map/marker_bubble/default";
+    images {
+      image: "bubble.png" COMP;
+      image: "bubble_shine.png" COMP;
+    }
+    data {
+            item: size_w 400;
+            item: size_h 100;
+        }
+    parts {
+    part { name: "clipper";
+        mouse_events:  1;
+        description { state: "default" 0.0;
+          color: 255 255 255 0;
+        }
+        description { state: "show" 0.0;
+            inherit: "default" 0.0;
+            color: 255 255 255 255;
+        }
+      }
+     part { name: "base0";
+        mouse_events:  0;
+        clip_to: "clipper";
+        description { state: "default" 0.0;
+          image {
+            normal: "bubble.png";
+            border: 11 36 10 19;
+          }
+          image.middle: SOLID;
+          fill.smooth: 0;
+        }
+      }
+      part { name: "elm.swallow.content";
+        type: SWALLOW;
+        clip_to: "clipper";
+        description { state: "default" 0.0;
+            align: 0.5 0.5;
+          rel1 {
+            offset: 9 8;
+          }
+          rel2 {
+            offset: -10 -17;
+          }
+        }
+      }
+      part { name: "shine";
+        mouse_events:  0;
+        clip_to: "clipper";
+        description { state:    "default" 0.0;
+          rel1 {
+            to: "base0";
+          }
+          rel2 {
+            to: "base0";
+            relative: 1.0 0.5;
+          }
+          image {
+            normal: "bubble_shine.png";
+            border: 5 5 5 0;
+          }
+          fill.smooth: 0;
+        }
+        }
+    }
+    programs {
+        program { name: "show";
+            signal: "show";
+            action: STATE_SET "show" 0.0;
+            target: "clipper";
+            transition: ACCELERATE 0.5;
+        }
+    }
+  }
 
-           program { name: "hbar_show";
-               signal: "elm,action,show,hbar";
-               source: "elm";
-               action:  STATE_SET "default" 0.0;
-               target: "sb_hbar_clip_master";
-           }
-           program { name: "hbar_hide";
-               signal: "elm,action,hide,hbar";
-               source: "elm";
-               action:  STATE_SET "hidden" 0.0;
-               target: "sb_hbar_clip_master";
-           }
-           program { name: "hbar_show_always";
-               signal: "elm,action,show_always,hbar";
-               source: "elm";
-               script {
-                   new v;
-                   v = get_int(sbvis_h);
-                   v |= get_int(sbalways_h);
-                   if (!v) {
-                       set_int(sbalways_h, 1);
-                       emit("do-show-hbar", "");
-                       set_int(sbvis_h, 1);
-                   }
-               }
-           }
-           program { name: "hbar_show_notalways";
-               signal: "elm,action,show_notalways,hbar";
-               source: "elm";
-               script {
-                   new v;
-                   v = get_int(sbalways_h);
-                   if (v) {
-                       set_int(sbalways_h, 0);
-                       v = get_int(sbvis_h);
-                       if (!v) {
-                           emit("do-hide-hbar", "");
-                           set_int(sbvis_h, 0);
-                       }
-                   }
-               }
-           }
-           program { name: "sb_hbar_show";
-               signal: "do-show-hbar";
-               source: "";
-               action:  STATE_SET "default" 0.0;
-               transition: LINEAR 1.0;
-               target: "sb_hbar_clip";
-           }
-           program { name: "sb_hbar_hide";
-               signal: "do-hide-hbar";
-               source: "";
-               action:  STATE_SET "hidden" 0.0;
-               transition: LINEAR 1.0;
-               target: "sb_hbar_clip";
-           }
+/////////////////////////////////////////////////////////////////////////////
+// PANES
+/////////////////////////////////////////////////////////////////////////////
+  group {
+     name: "elm/panes/vertical/default";
+      images {
+        image: "bt_base1.png" COMP;
+        image: "bt_base2.png" COMP;
+        image: "bt_hilight.png" COMP;
+        image: "bt_shine.png" COMP;
+        image: "bt_glow.png" COMP;
+        image: "bt_dis_base.png" COMP;
+        image: "bt_dis_hilight.png" COMP;
+         image: "arrow_right.png" COMP;
+         image: "arrow_left.png" COMP;
+      }
+     parts
+       {
+          part
+            {
+               name: "whole";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    visible: 0;
+                 }
+            }
 
-           program { name: "scroll";
-               signal: "elm,action,scroll";
-               source: "elm";
-               script {
-                   new v;
-                   v = get_int(sbvis_v);
-                   v |= get_int(sbalways_v);
-                   if (!v) {
-                       emit("do-show-vbar", "");
-                       set_int(sbvis_v, 1);
-                   }
-                   v = get_int(sbvis_h);
-                   v |= get_int(sbalways_h);
-                   if (!v) {
-                       emit("do-show-hbar", "");
-                       set_int(sbvis_h, 1);
-                   }
-                   v = get_int(sbvis_timer);
-                   if (v > 0) cancel_timer(v);
-                   v = timer(2.0, "timer0", 0);
-                   set_int(sbvis_timer, v);
-               }
-           }
-           program { name: "go1";
-               signal: "elm,state,busy,start";
-               source: "elm";
-               action: STATE_SET "active" 0.0;
-               transition: SINUSOIDAL 1.0;
-               target:  "busy_clip";
-           }
-           program { name: "go2";
-               signal: "elm,state,busy,start";
-               source: "elm";
-               action: STATE_SET "default" 0.0;
-               transition: LINEAR 0.5;
-               target: "busy";
-               after:  "go2";
-           }
-           program { name: "stop1";
-               signal: "elm,state,busy,stop";
-               source: "elm";
-               action: STATE_SET "default" 0.0;
-               transition: SINUSOIDAL 1.0;
-               target: "busy_clip";
-               after: "stop2";
-           }
-         program { name: "stop2";
-            action: ACTION_STOP;
-            target: "go2";
+         //2 contents
+          part
+            {
+               name: "whole_left";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    rel2.to_x: "elm.bar";
+                    rel2.relative: 0.0 1.0;
+                    visible: 1;
+                 }
+            }
+          part
+            {
+               name: "elm.swallow.left";
+               type: SWALLOW;
+               clip_to: "whole_left";
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to: "whole_left";
+                    rel2.to: "whole_left";
+                 }
+            }
+
+            part
+            {
+               name: "whole_right";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to_x: "elm.bar";
+                    rel1.relative: 1.0 0.0;
+                    visible: 1;
+                 }
+            }
+          part
+            {
+               name: "elm.swallow.right";
+               type: SWALLOW;
+               clip_to: "whole_right";
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to: "whole_right";
+                    rel2.to: "whole_right";
+                 }
+            }
+         //BAR
+        part { name: "elm.bar";
+           mouse_events: 1;
+            dragable {
+               confine: "whole";
+               x: 1 1 1;
+               y: 0 0 0;
+            }
+           description { state: "default" 0.0;
+               max: 15 9999;
+               min: 15 100;
+               rel1.relative: 0.0 0.5;
+               rel2.relative: 1.0 0.5;
+              image {
+                 normal: "bt_base2.png";
+                 border: 7 7 7 7;
+              }
+               image.middle: SOLID;
+           }
+           description { state: "clicked" 0.0;
+              inherit: "default" 0.0;
+              image.normal: "bt_base1.png";
+               image.middle: SOLID;
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              image {
+                 normal: "bt_dis_base.png";
+                 border: 4 4 4 4;
+              }
+           }
+        }
+        part {   name: "over1";
+           mouse_events: 0;
+           description { state: "default" 0.0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+              rel2.relative: 1.0 0.5;
+              image {
+                 normal: "bt_hilight.png";
+                 border: 7 7 7 0;
+              }
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              image {
+                 normal: "bt_dis_hilight.png";
+                 border: 4 4 4 0;
+              }
+           }
+        }
+        part { name: "over2";
+           mouse_events: 1;
+           repeat_events: 1;
+            ignore_flags: ON_HOLD;
+           description { state: "default" 0.0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+              image {
+                 normal: "bt_shine.png";
+                 border: 7 7 7 7;
+              }
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              visible: 0;
+           }
+        }
+         part { name: "over3";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 255 255 255 0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+               image {
+                  normal: "bt_glow.png";
+                  border: 12 12 12 12;
+               }
+              fill.smooth : 0;
+            }
+            description { state: "clicked" 0.0;
+               inherit:  "default" 0.0;
+               visible: 1;
+               color: 255 255 255 255;
+            }
          }
-      }
-   }
-   group { name: "elm/map/marker/radio/default";
-        data {
-            item: size_w 32;
-            item: size_h 32;
-            item: size_max_w 64;
-            item: size_max_h 64;
-        }
-        parts {
-            part { name: "whole";
-                description { state: "default" 0.0;
-                }
+
+         //Arrow
+         part {
+            name: "arrow_right";
+            description { state: "default" 0.0;
+                min: 45 45;
+                max: 45 45;
+                color: 255 255 255 0;
+
+                rel1.relative: 1.0 0.5;
+                rel1.to_x: "elm.bar";
+                rel1.offset: 45/2 -45/2;
+
+                rel2.relative: 1.0 0.5;
+                rel2.to_x: "elm.bar";
+                rel2.offset: 45/2 45/2;
+
+                image.normal: "arrow_right.png";
+
+                fixed: 1 1;
             }
-            part { name: "base";
-                ignore_flags: ON_HOLD;
-                description { state: "default" 0.0;
-                    image.normal: "radio.png";
-                }
+            description { state: "anim_1" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 200;
+                rel1.offset: (45/2 + 10) -45/2;
+                rel2.offset: (45/2 +10) 45/2;
             }
-            part { name: "elm.icon";
-                type: SWALLOW;
-                clip_to: "whole";
-                mouse_events:  0;
-                description { state: "default" 0.0;
-                    rel1.relative: 0.27 0.27;
-                    rel2.relative: 0.73 0.73;
-                }
+            description { state: "anim_2" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 0;
+                rel1.offset: (45/2 + 20) -45/2;
+                rel2.offset: (45/2 + 20) 45/2;
             }
-            part { name: "elm.text";
-                type:          TEXT;
-                effect:        SOFT_SHADOW;
-                mouse_events:  0;
-                scale: 1;
-                description { state: "default" 0.0;
-                    align:    0.5 0.5;
-                    color: 224 224 224 255;
-                    color3: 0 0 0 64;
-                    rel1.relative: 0.28 0.25;
-                    rel2.relative: 0.75 0.75;
-                    text {
-                        font:     "Sans,Edje-Vera";
-                        size:     10;
-                        min:      0 0;
-                        align:    0.5 0.5;
-                    }
-                }
+         }
+        part {
+            name: "arrow_left";
+            description { state: "default" 0.0;
+                min: 45 45;
+                max: 45 45;
+                color: 255 255 255 0;
+
+                rel1.relative: 0.0 0.5;
+                rel1.to_x: "elm.bar";
+                rel1.offset: -45/2 -45/2;
+
+                rel2.relative: 0.0 0.5;
+                rel2.to_x: "elm.bar";
+                rel2.offset: -45/2 45/2;
+
+                image.normal: "arrow_left.png";
+
+                fixed: 1 1;
             }
-       }
-       programs {
-            program { name: "open";
-                signal: "mouse,clicked,1";
-                source: "base";
-                action: SIGNAL_EMIT "open" "elm";
+            description { state: "anim_1" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 200;
+                rel1.offset: (-45/2 - 10) -45/2;
+                rel2.offset: (-45/2 - 10) 45/2;
             }
-            program { name: "bringin";
-                signal: "mouse,down,1,double";
-                source: "base";
-                action: SIGNAL_EMIT "bringin" "elm";
+            description { state: "anim_2" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 0;
+                rel1.offset: (-45/2 - 20) -45/2;
+                rel2.offset: (-45/2 - 20) 45/2;
             }
+         }
+
        }
-   }
-   group { name: "elm/map/marker/radio2/default";
-        data {
-            item: size_w 32;
-            item: size_h 32;
-            item: size_max_w 64;
-            item: size_max_h 64;
+        programs {
+        program {
+           name:   "button_click";
+           signal: "mouse,down,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,press" "";
+           after: "button_click_anim";
+            after: "arrow_anim_start";
+        }
+        program {
+           name:   "button_click_anim";
+           action: STATE_SET "clicked" 0.0;
+           target: "elm.bar";
+        }
+        program {
+           name:   "button_unclick";
+           signal: "mouse,up,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,unpress" "";
+           after: "button_unclick_anim";
+            after: "arrow_anim_stop";
+        }
+        program {
+           name:   "button_unclick_anim";
+           action: STATE_SET "default" 0.0;
+           target: "elm.bar";
+        }
+        program {
+           name:   "button_click2";
+           signal: "mouse,down,1";
+           source: "over3";
+           action: STATE_SET "clicked" 0.0;
+           target: "over3";
+        }
+        program {
+           name:   "button_unclick2";
+           signal: "mouse,up,1";
+           source: "over3";
+           action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+           target: "over3";
+        }
+        program {
+           name:   "button_unclick3";
+           signal: "mouse,up,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,click" "";
+        }
+         program {
+           name:   "button_down_double";
+           signal: "mouse,down,1,double";
+           source: "over3";
+            action: SIGNAL_EMIT "elm,action,click,double" "";
+        }
+
+         //arrows animation
+         program {
+            name: "arrow_anim_start";
+            action: STATE_SET "anim_1" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: LINEAR 0.6;
+            after: "arrow_anim_1";
+         }
+         program {
+            name: "arrow_anim_1";
+            action: STATE_SET "anim_2" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: LINEAR 0.6;
+            after: "arrow_anim_2";
+         }
+         program {
+            name: "arrow_anim_2";
+            action: STATE_SET "default" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            after: "arrow_anim_start";
+         }
+         program {
+            name: "arrow_anim_stop";
+            action: ACTION_STOP;
+            target: "arrow_anim_start";
+            target: "arrow_anim_1";
+            target: "arrow_anim_2";
+            after: "arrow_anim_stop_1";
+         }
+         program {
+            name: "arrow_anim_stop_1";
+            action: STATE_SET "default" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: DECELERATE 0.4;
         }
-        parts {
-            part { name: "base";
-                ignore_flags: ON_HOLD;
-                description { state: "default" 0.0;
-                    image.normal: "radio2.png";
-                }
+      }
+  }
+
+  group {
+     name: "elm/panes/horizontal/default";
+      images {
+        image: "bt_base1.png" COMP;
+        image: "bt_base2.png" COMP;
+        image: "bt_hilight.png" COMP;
+        image: "bt_shine.png" COMP;
+        image: "bt_glow.png" COMP;
+        image: "bt_dis_base.png" COMP;
+        image: "bt_dis_hilight.png" COMP;
+         image: "arrow_up.png" COMP;
+         image: "arrow_down.png" COMP;
+      }
+     parts
+       {
+          part
+            {
+               name: "whole";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    visible: 0;
+                 }
             }
-            part { name: "elm.text";
-                type:          TEXT;
-                effect:        SOFT_SHADOW;
-                mouse_events:  0;
-                scale: 1;
-                description { state: "default" 0.0;
-                    align:    0.5 0.5;
-                    color: 224 224 224 255;
-                    color3: 0 0 0 64;
-                    rel1.relative: 0.28 0.25;
-                    rel2.relative: 0.75 0.75;
-                    text {
-                        font:     "Sans,Edje-Vera";
-                        size:     10;
-                        min:      0 0;
-                        align:    0.5 0.5;
-                    }
-                }
+
+         //2 contents
+          part
+            {
+               name: "whole_left";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    rel2.to_y: "elm.bar";
+                    rel2.relative: 1.0 0.0;
+                    visible: 1;
+                 }
             }
-       }
-       programs {
-            program { name: "open";
-                signal: "mouse,clicked,1";
-                source: "base";
-                action: SIGNAL_EMIT "open" "elm";
+          part
+            {
+               name: "elm.swallow.left";
+               type: SWALLOW;
+               clip_to: "whole_left";
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to: "whole_left";
+                    rel2.to: "whole_left";
+                 }
+            }
+
+            part
+            {
+               name: "whole_right";
+               type: RECT;
+               mouse_events: 0;
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to_y: "elm.bar";
+                    rel1.relative: 0.0 1.0;
+                    visible: 1;
+                 }
+            }
+          part
+            {
+               name: "elm.swallow.right";
+               type: SWALLOW;
+               clip_to: "whole_right";
+               description
+                 {
+                    state: "default" 0.0;
+                    rel1.to: "whole_right";
+                    rel2.to: "whole_right";
+                 }
+            }
+         //BAR
+        part { name: "elm.bar";
+           mouse_events: 1;
+            dragable {
+               confine: "whole";
+               x: 0 0 0;
+               y: 1 1 1;
+            }
+           description { state: "default" 0.0;
+               max: 999 15;
+               min: 100 15;
+               rel1.relative: 0.5 0.0;
+               rel2.relative: 0.5 1.0;
+              image {
+                 normal: "bt_base2.png";
+                 border: 7 7 7 7;
+              }
+               image.middle: SOLID;
+           }
+           description { state: "clicked" 0.0;
+              inherit: "default" 0.0;
+              image.normal: "bt_base1.png";
+               image.middle: SOLID;
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              image {
+                 normal: "bt_dis_base.png";
+                 border: 4 4 4 4;
+              }
+           }
+        }
+        part {   name: "over1";
+           mouse_events: 0;
+           description { state: "default" 0.0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+              rel2.relative: 1.0 0.5;
+              image {
+                 normal: "bt_hilight.png";
+                 border: 7 7 7 0;
+              }
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              image {
+                 normal: "bt_dis_hilight.png";
+                 border: 4 4 4 0;
+              }
+           }
+        }
+        part { name: "over2";
+           mouse_events: 1;
+           repeat_events: 1;
+            ignore_flags: ON_HOLD;
+           description { state: "default" 0.0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+              image {
+                 normal: "bt_shine.png";
+                 border: 7 7 7 7;
+              }
+           }
+           description { state: "disabled" 0.0;
+              inherit:  "default" 0.0;
+              visible: 0;
+           }
+        }
+         part { name: "over3";
+            mouse_events: 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: 255 255 255 0;
+            rel1.to: "elm.bar";
+            rel2.to: "elm.bar";
+               image {
+                  normal: "bt_glow.png";
+                  border: 12 12 12 12;
+               }
+              fill.smooth : 0;
             }
-            program { name: "bringin";
-                signal: "mouse,down,1,double";
-                source: "base";
-                action: SIGNAL_EMIT "bringin" "elm";
+            description { state: "clicked" 0.0;
+               inherit:  "default" 0.0;
+               visible: 1;
+               color: 255 255 255 255;
             }
-       }
-   }
-   group { name: "elm/map/marker/empty/default";
-        data {
-            item: size_w 22;
-            item: size_h 22;
-            item: size_max_w 64;
-            item: size_max_h 64;
-        }
-        parts {
-            part { name: "whole";
-                description { state: "default" 0.0;
-                }
+         }
+
+         //Arrow
+         part {
+            name: "arrow_right";
+            description { state: "default" 0.0;
+                min: 45 45;
+                max: 45 45;
+                color: 255 255 255 0;
+
+                rel1.relative: 0.5 1.0;
+                rel1.to_y: "elm.bar";
+                rel1.offset: -45/2 45/2;
+
+                rel2.relative: 0.5 1.0;
+                rel2.to_y: "elm.bar";
+                rel2.offset: 45/2 45/2;
+
+                image.normal: "arrow_down.png";
+
+                fixed: 1 1;
             }
-            part { name: "base";
-                ignore_flags: ON_HOLD;
-                description { state: "default" 0.0;
-                }
+            description { state: "anim_1" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 200;
+                rel1.offset: -45/2 (45/2 +10);
+                rel2.offset: 45/2 (45/2 +10);
             }
-            part { name: "elm.icon";
-                type: SWALLOW;
-                clip_to: "whole";
-                mouse_events:  0;
-                description { state: "default" 0.0;
-                }
+            description { state: "anim_2" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 0;
+                rel1.offset: -45/2 (45/2 + 20);
+                rel2.offset: 45/2 (45/2 + 20);
             }
-            part { name: "elm.text";
-                type:          TEXT;
-                effect:        SOFT_SHADOW;
-                mouse_events:  0;
-                scale: 1;
-                description { state: "default" 0.0;
-                    align:    0.5 0.5;
-                    color: 224 224 224 255;
-                    color3: 0 0 0 64;
-                    rel1.relative: 0.28 0.25;
-                    rel2.relative: 0.75 0.75;
-                    text {
-                        font:     "Sans,Edje-Vera";
-                        size:     10;
-                        min:      0 0;
-                        align:    0.5 0.5;
-                    }
-                }
+         }
+        part {
+            name: "arrow_left";
+            description { state: "default" 0.0;
+                min: 45 45;
+                max: 45 45;
+                color: 255 255 255 0;
+
+                rel1.relative: 0.5 0.0;
+                rel1.to_y: "elm.bar";
+                rel1.offset: -45/2 -45/2;
+
+                rel2.relative: 0.5 0.0;
+                rel2.to_y: "elm.bar";
+                rel2.offset: 45/2 -45/2;
+
+                image.normal: "arrow_up.png";
+
+                fixed: 1 1;
             }
-       }
-       programs {
-            program { name: "open";
-                signal: "mouse,clicked,1";
-                source: "base";
-                action: SIGNAL_EMIT "open" "elm";
+            description { state: "anim_1" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 200;
+                rel1.offset: -45/2 (-45/2 - 10);
+                rel2.offset: 45/2 (-45/2 - 10);
             }
-            program { name: "bringin";
-                signal: "mouse,down,1,double";
-                source: "base";
-                action: SIGNAL_EMIT "bringin" "elm";
+            description { state: "anim_2" 0.0;
+                inherit: "default" 0.0;
+                color: 255 255 255 0;
+                rel1.offset: -45/2 (-45/2 - 20);
+                rel2.offset: 45/2 (-45/2 - 20);
             }
+         }
+
        }
-   }
-   group { name: "elm/map/marker_bubble/default";
-    images {
-      image: "bubble.png" COMP;
-      image: "bubble_shine.png" COMP;
-    }
-    data {
-            item: size_w 400;
-            item: size_h 100;
-        }
-    parts {
-    part { name: "clipper";
-        mouse_events:  1;
-        description { state: "default" 0.0;
-          color: 255 255 255 0;
-        }
-        description { state: "show" 0.0;
-            inherit: "default" 0.0;
-            color: 255 255 255 255;
-        }
-      }
-     part { name: "base0";
-        mouse_events:  0;
-        clip_to: "clipper";
-        description { state: "default" 0.0;
-          image {
-            normal: "bubble.png";
-            border: 11 36 10 19;
-          }
-          image.middle: SOLID;
-          fill.smooth: 0;
-        }
-      }
-      part { name: "elm.swallow.content";
-        type: SWALLOW;
-        clip_to: "clipper";
-        description { state: "default" 0.0;
-            align: 0.5 0.5;
-          rel1 {
-            offset: 9 8;
-          }
-          rel2 {
-            offset: -10 -17;
-          }
+        programs {
+        program {
+           name:   "button_click";
+           signal: "mouse,down,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,press" "";
+           after: "button_click_anim";
+            after: "arrow_anim_start";
+        }
+        program {
+           name:   "button_click_anim";
+           action: STATE_SET "clicked" 0.0;
+           target: "elm.bar";
+        }
+        program {
+           name:   "button_unclick";
+           signal: "mouse,up,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,unpress" "";
+           after: "button_unclick_anim";
+            after: "arrow_anim_stop";
+        }
+        program {
+           name:   "button_unclick_anim";
+           action: STATE_SET "default" 0.0;
+           target: "elm.bar";
+        }
+        program {
+           name:   "button_click2";
+           signal: "mouse,down,1";
+           source: "over3";
+           action: STATE_SET "clicked" 0.0;
+           target: "over3";
+        }
+        program {
+           name:   "button_unclick2";
+           signal: "mouse,up,1";
+           source: "over3";
+           action: STATE_SET "default" 0.0;
+            transition: DECELERATE 0.5;
+           target: "over3";
+        }
+        program {
+           name:   "button_unclick3";
+           signal: "mouse,up,1";
+           source: "over2";
+           action: SIGNAL_EMIT "elm,action,click" "";
+        }
+         program {
+           name:   "button_down_double";
+           signal: "mouse,down,1,double";
+           source: "over3";
+            action: SIGNAL_EMIT "elm,action,click,double" "";
+        }
+
+         //arrows animation
+         program {
+            name: "arrow_anim_start";
+            action: STATE_SET "anim_1" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: LINEAR 0.6;
+            after: "arrow_anim_1";
+         }
+         program {
+            name: "arrow_anim_1";
+            action: STATE_SET "anim_2" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: LINEAR 0.6;
+            after: "arrow_anim_2";
+         }
+         program {
+            name: "arrow_anim_2";
+            action: STATE_SET "default" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            after: "arrow_anim_start";
+         }
+         program {
+            name: "arrow_anim_stop";
+            action: ACTION_STOP;
+            target: "arrow_anim_start";
+            target: "arrow_anim_1";
+            target: "arrow_anim_2";
+            after: "arrow_anim_stop_1";
+         }
+         program {
+            name: "arrow_anim_stop_1";
+            action: STATE_SET "default" 0.0;
+            target: "arrow_right";
+            target: "arrow_left";
+            transition: DECELERATE 0.4;
         }
       }
-      part { name: "shine";
-        mouse_events:  0;
-        clip_to: "clipper";
-        description { state:    "default" 0.0;
-          rel1 {
-            to: "base0";
-          }
-          rel2 {
-            to: "base0";
-            relative: 1.0 0.5;
-          }
-          image {
-            normal: "bubble_shine.png";
-            border: 5 5 5 0;
-          }
-          fill.smooth: 0;
-        }
-        }
-    }
-    programs {
-        program { name: "show";
-            signal: "show";
-            action: STATE_SET "show" 0.0;
-            target: "clipper";
-            transition: ACCELERATE 0.5;
-        }
-    }
   }
 
 
diff --git a/data/themes/map_item.png b/data/themes/map_item.png
new file mode 100644 (file)
index 0000000..9e90159
Binary files /dev/null and b/data/themes/map_item.png differ
diff --git a/data/themes/map_item_1.png b/data/themes/map_item_1.png
new file mode 100644 (file)
index 0000000..da9b580
Binary files /dev/null and b/data/themes/map_item_1.png differ
diff --git a/data/themes/map_item_2.png b/data/themes/map_item_2.png
new file mode 100644 (file)
index 0000000..f92ebfa
Binary files /dev/null and b/data/themes/map_item_2.png differ
diff --git a/data/themes/shadow.png b/data/themes/shadow.png
new file mode 100644 (file)
index 0000000..5dc92cc
Binary files /dev/null and b/data/themes/shadow.png differ
index 14fb43b..1f10df9 100644 (file)
@@ -1,2 +1,2 @@
-Revision 49550
-Last Changed Rev 49550
+Revision 51480
+Last Changed Rev 51469
index 307d3ad..cb3ea4b 100644 (file)
@@ -9,4 +9,4 @@ Description: Mobile device touchscreen widget library
 Version: @VERSION@
 Libs: -L${libdir} -lelementary
 Libs.private: @dlopen_libs@ @my_libs@
-Cflags: -I${includedir} -I${includedir}/elementary
+Cflags: -I${includedir}/elementary-@VMAJ@
index 933e5fe..da9ec3b 100644 (file)
@@ -70,6 +70,7 @@ test_notify.c \
 test_slideshow.c \
 test_menu.c \
 test_panel.c \
+test_panes.c \
 test_map.c \
 test_weather.c \
 test_flip.c \
index f700cc5..a01afb2 100644 (file)
@@ -651,11 +651,11 @@ status_win(void)
    evas_object_show(win);
 }
 
-static int
+static Eina_Bool
 _exit_timer(void *data)
 {
    elm_exit();
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 /* this is your elementary main function - it MUSt be called IMMEDIATELY
index bd9806d..e49c7e5 100644 (file)
@@ -45,6 +45,7 @@ void test_genlist6(void *data, Evas_Object *obj, void *event_info);
 void test_table(void *data, Evas_Object *obj, void *event_info);
 void test_gengrid(void *data, Evas_Object *obj, void *event_info);
 void test_pager(void *data, Evas_Object *obj, void *event_info);
+void test_pager_slide(void *data, Evas_Object *obj, void *event_info);
 void test_win_state(void *data, Evas_Object *obj, void *event_info);
 void test_win_state2(void *data, Evas_Object *obj, void *event_info);
 void test_progressbar(void *data, Evas_Object *obj, void *event_info);
@@ -63,6 +64,8 @@ void test_notify(void *data, Evas_Object *obj, void *event_info);
 void test_slideshow(void *data, Evas_Object *obj, void *event_info);
 void test_menu(void *data, Evas_Object *obj, void *event_info);
 void test_panel(void *data, Evas_Object *obj, void *event_info);
+void test_panes(void *data, Evas_Object *obj, void *event_info);
+
 void test_map(void *data, Evas_Object *obj, void *event_info);
 void test_weather(void *data, Evas_Object *obj, void *event_info);
 void test_flip(void *data, Evas_Object *obj, void *event_info);
@@ -240,6 +243,7 @@ my_win_main(void)
    ADD_TEST("Checks", test_check);
    ADD_TEST("Radios", test_radio);
    ADD_TEST("Pager", test_pager);
+   ADD_TEST("Pager Slide", test_pager_slide);
    ADD_TEST("Window States", test_win_state);
    ADD_TEST("Window States 2", test_win_state2);
    ADD_TEST("Progressbar", test_progressbar);
@@ -258,6 +262,7 @@ my_win_main(void)
    ADD_TEST("Slideshow", test_slideshow);
    ADD_TEST("Menu", test_menu);
    ADD_TEST("Panel", test_panel);
+   ADD_TEST("Panes", test_panes);
    ADD_TEST("Map", test_map);
    ADD_TEST("Weather", test_weather);
    ADD_TEST("Flip", test_flip);
index 42f220d..f7a0661 100644 (file)
@@ -17,7 +17,7 @@ _del(void *data, Evas *evas, Evas_Object *obj, void *event_info)
    ecore_animator_del(ani);
 }
 
-static int
+static Eina_Bool
 anim(void *data)
 {
    Evas_Object *win = data;
@@ -57,7 +57,7 @@ anim(void *data)
         evas_object_move(sh, x, y);
         evas_object_resize(sh, w, h);
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 void
index f8932a2..889b9e9 100644 (file)
@@ -30,6 +30,20 @@ my_fl_4(void *data, Evas_Object *obj, void *event_info)
 }
 
 void
+my_fl_5(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *fl = data;
+   elm_flip_go(fl, ELM_FLIP_CUBE_LEFT);
+}
+
+void
+my_fl_6(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *fl = data;
+   elm_flip_go(fl, ELM_FLIP_CUBE_RIGHT);
+}
+
+void
 test_flip(void *data, Evas_Object *obj, void *event_info)
 {
    Evas_Object *win, *bg, *bx, *bx2, *fl, *o, *bt, *ly;
@@ -123,6 +137,22 @@ test_flip(void *data, Evas_Object *obj, void *event_info)
    evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
    elm_box_pack_end(bx2, bt);
    evas_object_show(bt);
+
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "5");
+   evas_object_smart_callback_add(bt, "clicked", my_fl_5, fl);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   evas_object_show(bt);
+   
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "6");
+   evas_object_smart_callback_add(bt, "clicked", my_fl_6, fl);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   evas_object_show(bt);
    
    elm_box_pack_end(bx, bx2);
    evas_object_show(bx2);
@@ -265,6 +295,22 @@ test_flip2(void *data, Evas_Object *obj, void *event_info)
    elm_box_pack_end(bx2, bt);
    evas_object_show(bt);
    
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "5");
+   evas_object_smart_callback_add(bt, "clicked", my_fl_5, fl);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   evas_object_show(bt);
+   
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "6");
+   evas_object_smart_callback_add(bt, "clicked", my_fl_6, fl);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, 0.0);
+   elm_box_pack_end(bx2, bt);
+   evas_object_show(bt);
+   
    elm_box_pack_end(bx, bx2);
    evas_object_show(bx2);
 
index 28abf34..10e7199 100644 (file)
@@ -39,7 +39,7 @@ gl_sel(void *data, Evas_Object *obj, void *event_info)
    printf("sel item data [%p] on genlist obj [%p], item pointer [%p]\n", data, obj, event_info);
 }
 
-static int
+static Eina_Bool
 anim(void *data)
 {
    Evas_Object *gl = data;
@@ -48,7 +48,7 @@ anim(void *data)
    y = 0;
    x = (sin(ecore_loop_time_get()) * 500);
    evas_object_move(gl, x, y);
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
index 18909ae..f342eb9 100644 (file)
@@ -321,11 +321,11 @@ my_gl_last(void *data, Evas_Object *obj, void *event_info)
    elm_genlist_item_selected_set(gli, 1);
 }
 
-static int
+static Eina_Bool
 my_gl_flush_delay(void *data)
 {
    elm_all_flush();
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
index 3a63ad0..96e14f1 100644 (file)
@@ -24,16 +24,20 @@ desk_gl_icon_get(const void *data, Evas_Object *obj, const char *part)
    evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
    if (!(!strcmp(part, "elm.swallow.icon"))) return ic;
    if (!d->icon) return ic;
-   path = efreet_icon_path_find("default", d->icon, 48);
-   if (!path)
+   path = efreet_icon_path_find(getenv("E_ICON_THEME"), d->icon, 48);
+   if (!path) 
      {
-        path = efreet_icon_path_find("hicolor", d->icon, 48);
+        path = efreet_icon_path_find("default", d->icon, 48);
         if (!path)
           {
-             path = efreet_icon_path_find("gnome", d->icon, 48);
+             path = efreet_icon_path_find("hicolor", d->icon, 48);
              if (!path)
                {
-                  path = efreet_icon_path_find("Human", d->icon, 48);
+                  path = efreet_icon_path_find("gnome", d->icon, 48);
+                  if (!path)
+                    {
+                       path = efreet_icon_path_find("Human", d->icon, 48);
+                    }
                }
           }
      }
index 3330b63..e57cb1d 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #ifndef ELM_LIB_QUICKLAUNCH
 
index d1b38ef..82bdda8 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #ifndef ELM_LIB_QUICKLAUNCH
 
index 477fc9a..81f1c4f 100644 (file)
@@ -4,7 +4,7 @@ typedef struct _Pginfo Pginfo;
 
 struct _Pginfo
 {
-   Evas_Object *pager, *pg1, *pg2, *pg3;
+   Evas_Object *win, *pager, *pg1, *pg2, *pg3;
 };
 
 static void
@@ -44,6 +44,7 @@ test_pager(void *data, Evas_Object *obj, void *event_info)
    win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
    elm_win_title_set(win, "Pager");
    elm_win_autodel_set(win, 1);
+   info.win = win;
 
    bg = elm_bg_add(win);
    elm_win_resize_object_add(win, bg);
@@ -148,4 +149,91 @@ test_pager(void *data, Evas_Object *obj, void *event_info)
 
    evas_object_show(win);
 }
+
+static void
+my_pager_push(void *data, Evas_Object *obj, void *event_info)
+{
+   Pginfo *info = data;
+   Evas_Object *bx, *bt, *lb;
+   static int count = 2;
+   char buf[32];
+
+   bx = elm_box_add(info->win);
+   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bx);
+
+   lb = elm_label_add(info->win);
+   snprintf(buf, sizeof(buf), "This is page %d in the slide pager<br><br>", count++);
+   elm_label_label_set(lb, buf);
+   elm_box_pack_end(bx, lb);
+   evas_object_show(lb);
+
+   bt = elm_button_add(info->win);
+   elm_button_label_set(bt, "Push a new page");
+   evas_object_smart_callback_add(bt, "clicked", my_pager_push, info);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+
+   bt = elm_button_add(info->win);
+   elm_button_label_set(bt, "Go back (pop)");
+   evas_object_smart_callback_add(bt, "clicked", my_pager_pop, info);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+   elm_pager_content_push(info->pager, bx);
+}
+
+void
+test_pager_slide(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *win, *bg, *pg, *bx, *lb, *bt;
+   static Pginfo info;
+
+   win = elm_win_add(NULL, "pager", ELM_WIN_BASIC);
+   elm_win_title_set(win, "Pager Slide");
+   elm_win_autodel_set(win, 1);
+   info.win = win;
+
+   bg = elm_bg_add(win);
+   elm_win_resize_object_add(win, bg);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bg);
+
+   pg = elm_pager_add(win);
+   elm_win_resize_object_add(win, pg);
+   elm_object_style_set(pg, "slide");
+   evas_object_show(pg);
+   info.pager = pg;
+
+   bx = elm_box_add(win);
+   evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bx);
+
+   lb = elm_label_add(win);
+   elm_label_label_set(lb,
+                      "This is page 1 in a slide pager.<br>"
+                      "<br>"
+                      "The slide pager style is usefull for browsing<br>"
+                      "a hierarchy of objects, as it makes clear<br>"
+                      "the direction of the browse.<br>"
+                      "This is the 'slide' style, also available<br>"
+                      "a fully transparent style named 'slide_invisble'.<br>"
+                      "<br>");
+   elm_box_pack_end(bx, lb);
+   evas_object_show(lb);
+
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "Push a new page");
+   evas_object_smart_callback_add(bt, "clicked", my_pager_push, &info);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "Go back (pop)");
+   evas_object_smart_callback_add(bt, "clicked", my_pager_pop, &info);
+   elm_box_pack_end(bx, bt);
+   evas_object_show(bt);
+   elm_pager_content_push(pg, bx);
+
+   evas_object_show(win);
+}
 #endif
diff --git a/src/bin/test_panes.c b/src/bin/test_panes.c
new file mode 100644 (file)
index 0000000..e236946
--- /dev/null
@@ -0,0 +1,116 @@
+#include <Elementary.h>
+#ifndef ELM_LIB_QUICKLAUNCH
+
+static double size = 0.0;
+
+static void
+_press(void *data, Evas_Object *obj, void *event_info)
+{
+    printf("press\n");
+}
+
+static void
+_unpress(void *data, Evas_Object *obj, void *event_info)
+{
+    printf("unpress, size : %f\n", elm_panes_content_left_size_get(obj));
+}
+
+static void
+_clicked(void *data, Evas_Object *obj, void *event_info)
+{
+    printf("clicked\n");
+}
+
+
+static void
+_clicked_double(void *data, Evas_Object *obj, void *event_info)
+{
+    printf("clicked double\n");
+    if(elm_panes_content_left_size_get(obj) > 0)
+    {
+        size = elm_panes_content_left_size_get(obj);
+        elm_panes_content_left_size_set(obj, 0.0);
+    }
+    else
+        elm_panes_content_left_size_set(obj, size);
+}
+
+
+void
+test_panes(void *data, Evas_Object *obj, void *event_info)
+{
+   Evas_Object *win, *bg, *panes, *panes_h, *bt;
+   char buf[PATH_MAX];
+   Evas_Object *list;
+
+   win = elm_win_add(NULL, "panes", ELM_WIN_BASIC);
+   elm_win_title_set(win, "Panes");
+   elm_win_autodel_set(win, 1);
+
+   bg = elm_bg_add(win);
+   elm_win_resize_object_add(win, bg);
+   evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_show(bg);
+
+   panes = elm_panes_add(win);
+   elm_win_resize_object_add(win, panes);
+   evas_object_size_hint_weight_set(panes, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(panes, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_show(panes);
+
+   evas_object_smart_callback_add(panes, "clicked", _clicked, panes);
+   evas_object_smart_callback_add(panes, "clicked,double", _clicked_double, panes);
+
+   evas_object_smart_callback_add(panes, "press", _press, panes);
+   evas_object_smart_callback_add(panes, "unpress", _unpress, panes);
+
+
+   //
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "Left");
+   evas_object_size_hint_weight_set(bt, 1.0, 1.0);
+   evas_object_size_hint_align_set(bt, -1.0, -1.0);
+   evas_object_show(bt);
+   elm_panes_content_left_set(panes, bt);
+   //
+
+   //
+   panes_h = elm_panes_add(win);
+   elm_panes_horizontal_set(panes_h, EINA_TRUE);
+   evas_object_size_hint_weight_set(panes_h, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(panes_h, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_show(panes_h);
+
+   evas_object_smart_callback_add(panes_h, "clicked", _clicked, panes_h);
+   evas_object_smart_callback_add(panes_h, "clicked,double", _clicked_double, panes_h);
+
+   evas_object_smart_callback_add(panes_h, "press", _press, panes_h);
+   evas_object_smart_callback_add(panes_h, "unpress", _unpress, panes_h);
+   elm_panes_content_right_set(panes, panes_h);
+   //
+
+   //
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "Up");
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_show(bt);
+   elm_panes_content_left_set(panes_h, bt);
+   //
+
+   //
+   bt = elm_button_add(win);
+   elm_button_label_set(bt, "Down");
+   evas_object_size_hint_weight_set(bt, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+   evas_object_size_hint_align_set(bt, EVAS_HINT_FILL, EVAS_HINT_FILL);
+   evas_object_show(bt);
+   elm_panes_content_right_set(panes_h, bt);
+   //
+
+
+   evas_object_resize(win, 320, 400);
+   evas_object_show(win);
+}
+
+
+#endif
index 8c82d57..67dd630 100644 (file)
@@ -8,13 +8,13 @@ test_photo(void *data, Evas_Object *obj, void *event_info)
    char buf[PATH_MAX];
    const char *img[9] =
      {
-        "panel_01.jpg", 
-          "plant_01.jpg", 
-          "rock_01.jpg", 
+        "panel_01.jpg",
+          "mystrale.jpg",
+          "mystrale_2.jpg",
           "rock_02.jpg",
-          "sky_01.jpg", 
-          "sky_02.jpg", 
-          "sky_03.jpg", 
+          "sky_01.jpg",
+          "sky_02.jpg",
+          "sky_03.jpg",
           "sky_04.jpg",
           "wood_01.jpg"
      };
@@ -47,6 +47,10 @@ test_photo(void *data, Evas_Object *obj, void *event_info)
              evas_object_size_hint_align_set(ph, EVAS_HINT_FILL, 
                                              EVAS_HINT_FILL);
              elm_photo_size_set(ph, 80);
+             if(n == 2 || n == 3) {
+                elm_photo_fill_inside_set(ph, EINA_TRUE);
+                elm_widget_style_set(ph, "shadow");
+             }
              elm_table_pack(tb, ph, i, j, 1, 1);
              evas_object_show(ph);
           }
index f0c24c5..c70588b 100644 (file)
@@ -15,7 +15,7 @@ typedef struct Progressbar
 
 static Progressbar _test_progressbar;
 
-static int
+static Eina_Bool
 _my_progressbar_value_set (void *data)
 {
    double progress;
index 123fecc..ce893b2 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #ifndef ELM_LIB_QUICKLAUNCH
 
@@ -13,6 +10,8 @@ static char *img4 = PACKAGE_DATA_DIR"/images/rock_02.jpg";
 static char *img5 = PACKAGE_DATA_DIR"/images/sky_01.jpg";
 static char *img6 = PACKAGE_DATA_DIR"/images/sky_04.jpg";
 static char *img7 = PACKAGE_DATA_DIR"/images/wood_01.jpg";
+static char *img8 = PACKAGE_DATA_DIR"/images/mystrale.jpg";
+static char *img9 = PACKAGE_DATA_DIR"/images/mystrale_2.jpg";
 
 static void
 _notify_show(void *data, Evas *e, Evas_Object *obj, void *event_info)
@@ -54,6 +53,13 @@ _hv_select(void *data, Evas_Object *obj, void *event_info)
 }
 
 static void
+_layout_select(void *data, Evas_Object *obj, void *event_info)
+{
+   elm_slideshow_layout_set(slideshow, data);
+   elm_hoversel_label_set(obj, data);
+}
+
+static void
 _start(void *data, Evas_Object *obj, void *event_info)
 {
    elm_slideshow_timeout_set(slideshow, (int)elm_spinner_value_get(data));
@@ -80,9 +86,15 @@ _spin(void *data, Evas_Object *obj, void *event_info)
 static Evas_Object *
 _get(void *data, Evas_Object *obj)
 {
-   Evas_Object *photo = elm_photocam_add(obj);
-   elm_photocam_file_set(photo, data);
-   elm_photocam_zoom_mode_set(photo, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+   //Evas_Object *photo = elm_photocam_add(obj);
+   //elm_photocam_file_set(photo, data);
+   //elm_photocam_zoom_mode_set(photo, ELM_PHOTOCAM_ZOOM_MODE_AUTO_FIT);
+
+   Evas_Object *photo = elm_photo_add(obj);
+   elm_photo_file_set(photo, data);
+   elm_photo_fill_inside_set(photo, EINA_TRUE);
+   elm_widget_style_set(photo, "shadow");
+
    return photo;
 }
 
@@ -93,7 +105,7 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
 {
    Evas_Object *win, *bg, *notify, *bx, *bt, *hv, *spin;
    const Eina_List *l;
-   const char *transition;
+   const char *transition, *layout;
 
    win = elm_win_add(NULL, "Slideshow", ELM_WIN_BASIC);
    elm_win_title_set(win, "Slideshow");
@@ -117,9 +129,11 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
    elm_slideshow_item_add(slideshow, &itc, img2);
    elm_slideshow_item_add(slideshow, &itc, img3);
    elm_slideshow_item_add(slideshow, &itc, img4);
+   elm_slideshow_item_add(slideshow, &itc, img9);
    elm_slideshow_item_add(slideshow, &itc, img5);
    elm_slideshow_item_add(slideshow, &itc, img6);
    elm_slideshow_item_add(slideshow, &itc, img7);
+   elm_slideshow_item_add(slideshow, &itc, img8);
 
    notify = elm_notify_add(win);
    elm_notify_orient_set(notify, ELM_NOTIFY_ORIENT_BOTTOM);
@@ -154,6 +168,14 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
    elm_hoversel_label_set(hv, eina_list_data_get(elm_slideshow_transitions_get(slideshow)));
    evas_object_show(hv);
 
+   hv = elm_hoversel_add(win);
+   elm_box_pack_end(bx, hv);
+   elm_hoversel_hover_parent_set(hv, win);
+   EINA_LIST_FOREACH(elm_slideshow_layouts_get(slideshow), l, layout)
+       elm_hoversel_item_add(hv, layout,  NULL, 0, _layout_select, layout);
+   elm_hoversel_label_set(hv, elm_slideshow_layout_get(slideshow));
+   evas_object_show(hv);
+
    spin = elm_spinner_add(win);
    elm_spinner_label_format_set(spin, "%2.0f secs.");
    evas_object_smart_callback_add(spin, "changed", _spin, spin);
@@ -182,7 +204,7 @@ test_slideshow(void *data, Evas_Object *obj, void *event_info)
    evas_object_event_callback_add(slideshow, EVAS_CALLBACK_MOUSE_UP, _notify_show, notify);
    evas_object_event_callback_add(slideshow, EVAS_CALLBACK_MOUSE_MOVE, _notify_show, notify);
 
-   evas_object_resize(win, 350, 200);
+   evas_object_resize(win, 500, 400);
    evas_object_show(win);
 }
 
index d55242b..c90d4ae 100644 (file)
@@ -47,8 +47,6 @@ test_thumb(void *data, Evas_Object *obj, void *event_info)
                                               EVAS_HINT_EXPAND);
             evas_object_size_hint_align_set(th, EVAS_HINT_FILL,
                                             EVAS_HINT_FILL);
-            elm_thumb_align_set(th, 0.5, 0.5);
-            elm_thumb_keep_aspect_set(th, EINA_TRUE);
              elm_table_pack(tb, th, i, j, 1, 1);
              evas_object_show(th);
           }
index 5d56695..da3f967 100644 (file)
@@ -14,16 +14,17 @@ AM_CPPFLAGS = \
 @ELEMENTARY_WIN32_CFLAGS@ \
 @ELEMENTARY_WINCE_CFLAGS@ \
 @ELEMENTARY_EDBUS_CFLAGS@ \
-@ELEMENTARY_EFREET_CFLAGS@
+@ELEMENTARY_EFREET_CFLAGS@ \
+@ELEMENTARY_ETHUMB_CFLAGS@
 
 if ELEMENTARY_WINDOWS_BUILD
 AM_CPPFLAGS += -DELEMENTARY_BUILD
 endif
 
-pkgdir = $(libdir)/edje
-pkg_LTLIBRARIES = elm.la
+pkgdir = $(libdir)/edje/modules/elm/$(MODULE_EDJE)
+pkg_LTLIBRARIES = module.la
 
-elm_la_SOURCES = private.h \
+module_la_SOURCES = private.h \
 modules.inc \
 elm.c \
 elm_anchorblock.c \
@@ -48,7 +49,9 @@ elm_slideshow.c \
 elm_spinner.c \
 elm_thumb.c \
 elm_toggle.c \
-elm_toolbar.c
+elm_toolbar.c \
+elm_notify.c \
+elm_panes.c
 
-elm_la_LIBADD = $(top_builddir)/src/lib/libelementary.la
-elm_la_LDFLAGS = $(all_libraries) -no-undefined @lt_enable_auto_import@ -module -avoid-version -shared -fPIC
+module_la_LIBADD = $(top_builddir)/src/lib/libelementary.la
+module_la_LDFLAGS = -no-undefined -module -avoid-version -shared -fPIC
index b2a815e..af91e60 100644 (file)
@@ -4,9 +4,39 @@
 int _elm_log_dom = -1;
 
 void
-external_signal(void *data __UNUSED__, Evas_Object *obj __UNUSED__, const char *signal, const char *source)
+external_signal(void *data __UNUSED__, Evas_Object *obj, const char *signal, const char *source)
 {
-   printf("External Signal received: '%s' '%s'\n", signal, source);
+       char *_signal = strdup(signal);
+       char *p = _signal;
+       Evas_Object *content;
+
+       while((*p!='\0') && (*p!=']'))
+               p++;
+
+
+       if((*p=='\0') || (*(p+1)!=':'))
+       {
+               ERR("Invalid External Signal received: '%s' '%s'\n", signal, source);
+               free(_signal);
+               return ;
+       }
+
+       *p = '\0';
+       p+=2; //jump ']' and ':'
+
+       Edje_External_Type *type = evas_object_data_get(obj, "Edje_External_Type");
+       if (!type->content_get)
+       {
+               ERR("external type '%s' from module '%s' does not provide content_get()",
+                               type->module_name, type->module);
+               free(_signal);
+               return ;
+       }
+
+       content = type->content_get(type->data, obj, _signal);
+       free(_signal);
+       if(content)
+               edje_object_signal_emit(content, signal + (p - _signal), source);
 }
 
 const char *
index cb5dc91..0e0c2eb 100644 (file)
@@ -76,6 +76,13 @@ external_anchorblock_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUS
    return mem;
 }
 
+static Evas_Object *external_anchorblock_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_anchorblock_params_free(void *params)
 {
index 88ebdff..f4f3d9a 100644 (file)
@@ -76,6 +76,13 @@ external_anchorview_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSE
    return mem;
 }
 
+static Evas_Object *external_anchorview_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_anchorview_params_free(void *params)
 {
index 380e07c..f8f0f2d 100644 (file)
@@ -39,11 +39,9 @@ external_bubble_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_bubble_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_bubble_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "info"))
@@ -59,12 +57,10 @@ external_bubble_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *content = \
-              external_common_param_edje_object_get(obj, param);
-            if (content)
-              {
-                 elm_bubble_content_set(obj, content);
-                 return EINA_TRUE;
-              }
+                   external_common_param_edje_object_get(obj, param);
+            if ((strcmp(param->s, "")) && (!content)) return EINA_FALSE;
+            elm_bubble_content_set(obj, content);
+            return EINA_TRUE;
          }
      }
 
@@ -134,15 +130,18 @@ external_bubble_params_parse(void *data, Evas_Object *obj, const Eina_List *para
    return mem;
 }
 
- static void
+static Evas_Object *external_bubble_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
+static void
 external_bubble_params_free(void *params)
 {
    Elm_Params_Bubble *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
-   if (mem->content)
-     evas_object_del(mem->content);
    if (mem->info)
      eina_stringshare_del(mem->info);
    external_common_params_free(params);
index f0daaf1..329cf45 100644 (file)
@@ -37,11 +37,9 @@ external_button_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_button_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_button_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
 
@@ -88,13 +86,18 @@ external_button_params_parse(void *data, Evas_Object *obj, const Eina_List *para
    return mem;
 }
 
- static void
+static Evas_Object *external_button_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
+static void
 external_button_params_free(void *params)
 {
    Elm_Params_Button *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    external_common_params_free(params);
 }
 
index 2fb331e..89e4930 100644 (file)
@@ -41,11 +41,9 @@ external_check_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_check_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_check_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "state"))
@@ -116,13 +114,18 @@ external_check_params_parse(void *data, Evas_Object *obj, const Eina_List *param
    return mem;
 }
 
+static Evas_Object *external_check_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_check_params_free(void *params)
 {
    Elm_Params_Check *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    external_common_params_free(params);
 }
 
index 74f0818..13bda6d 100644 (file)
@@ -210,6 +210,13 @@ external_clock_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
    return mem;
 }
 
+static Evas_Object *external_clock_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_clock_params_free(void *params)
 {
index 571cd13..c955bc4 100644 (file)
@@ -155,6 +155,13 @@ external_fileselector_params_parse(void *data __UNUSED__, Evas_Object *obj __UNU
    return mem;
 }
 
+static Evas_Object *external_fileselector_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_fileselector_params_free(void *params)
 {
index bfa0650..f17e6bd 100644 (file)
@@ -57,11 +57,9 @@ external_fileselector_button_param_set(void *data __UNUSED__, Evas_Object *obj,
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_fileselector_button_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_fileselector_button_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "path"))
@@ -217,13 +215,18 @@ external_fileselector_button_params_parse(void *data, Evas_Object *obj, const Ei
    return mem;
 }
 
+static Evas_Object *external_fileselector_button_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
  static void
 external_fileselector_button_params_free(void *params)
 {
    Elm_Params_fileselector_button *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    if (mem->fs.path)
      eina_stringshare_del(mem->fs.path);
    external_common_params_free(params);
index bc3f634..a8b2405 100644 (file)
@@ -297,6 +297,13 @@ external_genlist_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__
    return mem;
 }
 
+static Evas_Object *external_genlist_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_genlist_params_free(void *params)
 {
index 902a956..2bc49e0 100644 (file)
@@ -41,11 +41,9 @@ external_hoversel_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_hoversel_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_hoversel_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "horizontal"))
@@ -119,13 +117,18 @@ external_hoversel_params_parse(void *data, Evas_Object *obj, const Eina_List *pa
    return mem;
 }
 
+static Evas_Object *external_hoversel_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
  static void
 external_hoversel_params_free(void *params)
 {
    Elm_Params_Hoversel *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    external_common_params_free(params);
 }
 
index 2f6d193..8f782af 100644 (file)
@@ -242,6 +242,13 @@ external_list_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, c
    return mem;
 }
 
+static Evas_Object *external_list_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_list_params_free(void *params)
 {
index 13c0592..3077cf2 100644 (file)
@@ -172,6 +172,13 @@ external_map_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__, co
    return mem;
 }
 
+static Evas_Object *external_map_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_map_params_free(void *params)
 {
index 697b0ae..a99eeb6 100644 (file)
@@ -1,18 +1,9 @@
 #include "private.h"
 
-typedef struct _Elm_Params_Notepad
-{
-} Elm_Params_Notepad;
 
 static void
 external_notepad_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
 {
-   const Elm_Params_Notepad *p;
-
-   if (to_params) p = to_params;
-   else if (from_params) p = from_params;
-   else return;
-
    /* TODO: to be expanded */
 }
 
@@ -46,6 +37,13 @@ external_notepad_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__
    return NULL;
 }
 
+static Evas_Object *external_notepad_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_notepad_params_free(void *params)
 {
diff --git a/src/edje_externals/elm_notify.c b/src/edje_externals/elm_notify.c
new file mode 100644 (file)
index 0000000..5ec004b
--- /dev/null
@@ -0,0 +1,216 @@
+#include "private.h"
+#include <assert.h>
+
+
+typedef struct _Elm_Params_Notify Elm_Params_Notify;
+
+struct _Elm_Params_Notify {
+       Elm_Params base;
+       Evas_Object *content; /* part name whose obj is to be set as content */
+       Eina_Bool repeat_events_exists;
+       Eina_Bool repeat_events;
+       Eina_Bool timer_init;
+       Eina_Bool timeout_exists;
+       int timeout;
+
+       const char *orient;
+};
+
+
+static const char *orients[] = {
+               "top",
+               "center",
+               "bottom",
+               "left",
+               "right",
+               "top_left",
+               "top_right",
+               "bottom_left",
+               "bottom_right",
+               NULL
+};
+
+static Elm_Notify_Orient _orient_get(const char *orient)
+{
+   unsigned int i;
+
+   assert(sizeof(orients)/sizeof(orients[0]) ==
+         ELM_NOTIFY_ORIENT_LAST + 1);
+
+   for (i = 0; i < sizeof(orients); i++)
+     if (strcmp(orient, orients[i]) == 0) return i;
+
+   return ELM_NOTIFY_ORIENT_LAST;
+}
+
+static void external_notify_state_set(void *data __UNUSED__,
+               Evas_Object *obj, const void *from_params,
+               const void *to_params, float pos __UNUSED__)
+{
+       const Elm_Params_Notify *p;
+
+       if (to_params) p = to_params;
+       else if (from_params) p = from_params;
+       else return;
+
+       if (p->content) {
+               elm_notify_content_set(obj, p->content);
+       }
+       if(p->repeat_events_exists)
+               elm_notify_repeat_events_set(obj, p->repeat_events);
+       if(p->timeout_exists)
+               elm_notify_timeout_set(obj, p->timeout);
+       if(p->timer_init)
+               elm_notify_timer_init(obj);
+
+       if (p->orient)
+       {
+               Elm_Notify_Orient set = _orient_get(p->orient);
+               if (set == ELM_NOTIFY_ORIENT_LAST) return;
+               elm_notify_orient_set(obj, set);
+       }
+}
+
+static Eina_Bool external_notify_param_set(void *data __UNUSED__,
+               Evas_Object *obj, const Edje_External_Param *param)
+{
+       if (!strcmp(param->name, "content")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+       {
+               Evas_Object *content = external_common_param_edje_object_get(obj, param);
+               if ((strcmp(param->s, "")) && (!content))
+                       return EINA_FALSE;
+               elm_notify_content_set(obj, content);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "repeat_events")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+       {
+               elm_notify_repeat_events_set(obj, param->i);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "timer_init")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+       {
+               elm_notify_timer_init(obj);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "timeout")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+       {
+               elm_notify_timeout_set(obj, param->i);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "orient")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+       {
+               Elm_Notify_Orient set = _orient_get(param->s);
+               if (set == ELM_NOTIFY_ORIENT_LAST) return;
+               elm_notify_orient_set(obj, set);
+               return EINA_TRUE;
+       }
+
+       ERR("unknown parameter '%s' of type '%s'",
+                       param->name, edje_external_param_type_str(param->type));
+
+       return EINA_FALSE;
+}
+
+static Eina_Bool external_notify_param_get(void *data __UNUSED__,
+               const Evas_Object *obj, Edje_External_Param *param)
+{
+       if (!strcmp(param->name, "content"))
+       {
+               /* not easy to get content name back from live object */
+               return EINA_FALSE;
+       }
+       else if (!strcmp(param->name, "repeat_events")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+       {
+               param->i = elm_notify_repeat_events_get(obj);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "timeout")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_INT)
+       {
+               param->i = elm_notify_timeout_get(obj);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "orient")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE)
+       {
+               Elm_Notify_Orient set = elm_notify_orient_get(obj);
+               if (set == ELM_NOTIFY_ORIENT_LAST) return EINA_FALSE;
+               param->s = orients[set];
+               return EINA_TRUE;
+       }
+
+       ERR("unknown parameter '%s' of type '%s'",
+                       param->name, edje_external_param_type_str(param->type));
+
+       return EINA_FALSE;
+}
+
+static void * external_notify_params_parse(void *data, Evas_Object *obj,
+               const Eina_List *params) {
+       Elm_Params_Notify *mem;
+       Edje_External_Param *param;
+       const Eina_List *l;
+
+       mem = external_common_params_parse(Elm_Params_Notify, data, obj, params);
+       if (!mem)
+               return NULL;
+
+       EINA_LIST_FOREACH(params, l, param)
+       {
+               if (!strcmp(param->name, "content"))
+                       mem->content = external_common_param_edje_object_get(obj, param);
+               else if (!strcmp(param->name, "timeout"))
+               {
+                       mem->timeout = param->i;
+                       mem->timeout_exists = EINA_TRUE;
+               }
+               else if (!strcmp(param->name, "timer_init") && param->i > 0)
+               {
+                       mem->timer_init = EINA_TRUE;
+               }
+               else if (!strcmp(param->name, "repeat_events"))
+               {
+                       mem->repeat_events = param->i;
+                       mem->repeat_events_exists = EINA_TRUE;
+               }
+               else if (!strcmp(param->name, "orient"))
+                         mem->orient = eina_stringshare_add(param->s);
+       }
+
+       return mem;
+}
+
+static Evas_Object *external_notify_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       if (!strcmp(content, "content"))
+               return elm_notify_content_get(obj);
+
+       ERR("unknown content '%s'", content);
+       return NULL;
+}
+
+static void external_notify_params_free(void *params) {
+       Elm_Params_Notify *mem = params;
+
+       external_common_params_free(params);
+}
+
+static Edje_External_Param_Info external_notify_params[] = {
+               DEFINE_EXTERNAL_COMMON_PARAMS,
+               EDJE_EXTERNAL_PARAM_INFO_STRING("content"),
+               EDJE_EXTERNAL_PARAM_INFO_BOOL("repeat_events"),
+               EDJE_EXTERNAL_PARAM_INFO_INT("timeout"),
+               EDJE_EXTERNAL_PARAM_INFO_BOOL("timer_init"),
+               EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(notify, "notify");
+DEFINE_EXTERNAL_TYPE_SIMPLE(notify, "Notify")
+;
diff --git a/src/edje_externals/elm_panes.c b/src/edje_externals/elm_panes.c
new file mode 100644 (file)
index 0000000..336e7e9
--- /dev/null
@@ -0,0 +1,173 @@
+#include "private.h"
+#include <assert.h>
+
+
+typedef struct _Elm_Params_Panes Elm_Params_Panes;
+
+struct _Elm_Params_Panes {
+       Elm_Params base;
+       Evas_Object *content_left;
+       Evas_Object *content_right;
+       Eina_Bool is_horizontal;
+       Eina_Bool horizontal;
+       Eina_Bool is_left_size;
+       double left_size;
+};
+
+static void external_panes_state_set(void *data __UNUSED__,
+               Evas_Object *obj, const void *from_params,
+               const void *to_params, float pos __UNUSED__)
+{
+       const Elm_Params_Panes *p;
+
+       if (to_params) p = to_params;
+       else if (from_params) p = from_params;
+       else return;
+
+       if (p->content_left)
+               elm_panes_content_left_set(obj, p->content_left);
+
+       if (p->content_right)
+               elm_panes_content_right_set(obj, p->content_right);
+
+       if(p->is_left_size)
+               elm_panes_content_left_size_set(obj, p->left_size);
+
+       if(p->is_horizontal)
+               elm_panes_horizontal_set(obj, p->horizontal);
+}
+
+static Eina_Bool external_panes_param_set(void *data __UNUSED__,
+               Evas_Object *obj, const Edje_External_Param *param)
+{
+       if (!strcmp(param->name, "content left")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+       {
+               Evas_Object *content = external_common_param_edje_object_get(obj, param);
+               if ((strcmp(param->s, "")) && (!content))
+                       return EINA_FALSE;
+               elm_panes_content_left_set(obj, content);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "content right")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+       {
+               Evas_Object *content = external_common_param_edje_object_get(obj, param);
+               if ((strcmp(param->s, "")) && (!content))
+                       return EINA_FALSE;
+               elm_panes_content_right_set(obj, content);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "horizontal")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+       {
+               elm_panes_horizontal_set(obj, param->i);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "left size")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+       {
+               elm_panes_content_left_size_set(obj, param->d);
+               return EINA_TRUE;
+       }
+
+       ERR("unknown parameter '%s' of type '%s'",
+                       param->name, edje_external_param_type_str(param->type));
+
+       return EINA_FALSE;
+}
+
+static Eina_Bool external_panes_param_get(void *data __UNUSED__,
+               const Evas_Object *obj, Edje_External_Param *param)
+{
+       if (!strcmp(param->name, "content left"))
+       {
+               /* not easy to get content name back from live object */
+               return EINA_FALSE;
+       }
+       else if (!strcmp(param->name, "content right"))
+       {
+               /* not easy to get content name back from live object */
+               return EINA_FALSE;
+       }
+       else if (!strcmp(param->name, "horizontal")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
+       {
+               param->i = elm_panes_horizontal_is(obj);
+               return EINA_TRUE;
+       }
+       else if (!strcmp(param->name, "left size")
+                       && param->type == EDJE_EXTERNAL_PARAM_TYPE_DOUBLE)
+       {
+               param->d = elm_panes_content_left_size_get(obj);
+               return EINA_TRUE;
+       }
+
+       ERR("unknown parameter '%s' of type '%s'",
+                       param->name, edje_external_param_type_str(param->type));
+
+       return EINA_FALSE;
+}
+
+static void * external_panes_params_parse(void *data, Evas_Object *obj,
+               const Eina_List *params) {
+       Elm_Params_Panes *mem;
+       Edje_External_Param *param;
+       const Eina_List *l;
+
+       mem = external_common_params_parse(Elm_Params_Panes, data, obj, params);
+       if (!mem)
+               return NULL;
+
+       EINA_LIST_FOREACH(params, l, param)
+       {
+               if (!strcmp(param->name, "content left"))
+                       mem->content_left = external_common_param_edje_object_get(obj, param);
+               else if (!strcmp(param->name, "content right"))
+                               mem->content_right = external_common_param_edje_object_get(obj, param);
+               else if (!strcmp(param->name, "horizontal"))
+               {
+                       mem->is_horizontal = EINA_TRUE;
+                       mem->horizontal = param->i;
+               }
+               else if (!strcmp(param->name, "left size"))
+               {
+                       mem->is_left_size = EINA_TRUE;
+                       mem->left_size = param->d;
+               }
+       }
+
+       return mem;
+}
+
+static Evas_Object *external_panes_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       if (!strcmp(content, "left"))
+               return elm_panes_content_left_get(obj);
+       else if (!strcmp(content, "right"))
+               return elm_panes_content_right_get(obj);
+
+       ERR("unknown content '%s'", content);
+
+       return NULL;
+}
+
+
+static void external_panes_params_free(void *params) {
+       Elm_Params_Panes *mem = params;
+
+       external_common_params_free(params);
+}
+
+static Edje_External_Param_Info external_panes_params[] = {
+               DEFINE_EXTERNAL_COMMON_PARAMS,
+               EDJE_EXTERNAL_PARAM_INFO_STRING("content left"),
+               EDJE_EXTERNAL_PARAM_INFO_STRING("content right"),
+               EDJE_EXTERNAL_PARAM_INFO_BOOL("horizontal"),
+               EDJE_EXTERNAL_PARAM_INFO_DOUBLE("left size"),
+               EDJE_EXTERNAL_PARAM_INFO_SENTINEL
+};
+
+DEFINE_EXTERNAL_ICON_ADD(panes, "panes");
+DEFINE_EXTERNAL_TYPE_SIMPLE(panes, "panes");
index 4cb821d..f4b942f 100644 (file)
@@ -175,6 +175,13 @@ external_photocam_params_parse(void *data, Evas_Object *obj, const Eina_List *pa
    return mem;
 }
 
+static Evas_Object *external_photocam_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_photocam_params_free(void *params)
 {
index 9cb0150..295ce61 100644 (file)
@@ -56,11 +56,9 @@ external_progressbar_param_set(void *data __UNUSED__, Evas_Object *obj, const Ed
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_progressbar_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_progressbar_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "value"))
@@ -215,13 +213,18 @@ external_progressbar_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUS
    return mem;
 }
 
+static Evas_Object *external_progressbar_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_progressbar_params_free(void *params)
 {
    Elm_Params_Progressbar *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    if (mem->unit)
      eina_stringshare_del(mem->unit);
    external_common_params_free(params);
index 35206a8..ab847e4 100644 (file)
@@ -48,11 +48,9 @@ external_radio_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_radio_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_radio_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "value"))
@@ -143,13 +141,18 @@ external_radio_params_parse(void *data, Evas_Object *obj, const Eina_List *param
    return mem;
 }
 
+static Evas_Object *external_radio_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_radio_params_free(void *params)
 {
    Elm_Params_Radio *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    if (mem->group_name)
      eina_stringshare_del(mem->group_name);
    external_common_params_free(params);
index 446106a..f81ca62 100644 (file)
@@ -153,6 +153,13 @@ external_scrolled_entry_params_parse(void *data __UNUSED__, Evas_Object *obj __U
    return mem;
 }
 
+static Evas_Object *external_scrolled_entry_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_scrolled_entry_params_free(void *params)
 {
index d7423f3..ba76cd4 100644 (file)
@@ -71,11 +71,9 @@ external_slider_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_slider_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_slider_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "min"))
@@ -298,13 +296,18 @@ external_slider_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
    return mem;
 }
 
+static Evas_Object *external_slider_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_slider_params_free(void *params)
 {
    Elm_Params_Slider *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    if (mem->unit)
      eina_stringshare_del(mem->unit);
    if (mem->indicator)
index 657f95b..23c50a8 100644 (file)
@@ -4,6 +4,7 @@ typedef struct _Elm_Params_Slideshow
 {
    int timeout;
    const char *transition;
+   const char *layout;
    Eina_Bool loop:1;
    Eina_Bool timeout_exists:1;
    Eina_Bool loop_exists:1;
@@ -11,6 +12,7 @@ typedef struct _Elm_Params_Slideshow
 
 static const char *transitions[] = { "fade", "black_fade", "horizontal",
                                     "vertical", "square", NULL};
+static const char *layout[] = { "fullscreen", "not_fullscreen", NULL};
 
 static void
 external_slideshow_state_set(void *data __UNUSED__, Evas_Object *obj, const void *from_params, const void *to_params, float pos __UNUSED__)
@@ -28,6 +30,9 @@ external_slideshow_state_set(void *data __UNUSED__, Evas_Object *obj, const void
    if (p->transition) {
       elm_slideshow_transition_set(obj, p->transition);
    }
+   if (p->layout) {
+         elm_slideshow_layout_set(obj, p->layout);
+   }
 }
 
 static Eina_Bool
@@ -57,6 +62,14 @@ external_slideshow_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje
             return EINA_TRUE;
          }
      }
+   else if (!strcmp(param->name, "layout"))
+        {
+       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+         {
+            elm_slideshow_layout_set(obj, param->s);
+            return EINA_TRUE;
+         }
+        }
 
    ERR("unknown parameter '%s' of type '%s'",
        param->name, edje_external_param_type_str(param->type));
@@ -91,6 +104,14 @@ external_slideshow_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje
             return EINA_TRUE;
          }
      }
+   else if (!strcmp(param->name, "layout"))
+        {
+       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
+         {
+            param->s = elm_slideshow_layout_get(obj);
+            return EINA_TRUE;
+         }
+        }
 
    ERR("unknown parameter '%s' of type '%s'",
        param->name, edje_external_param_type_str(param->type));
@@ -125,11 +146,22 @@ external_slideshow_params_parse(void *data, Evas_Object *obj, const Eina_List *p
          {
             mem->transition = param->s;
          }
+    else if (!strcmp(param->name, "layout"))
+         {
+            mem->layout = param->s;
+         }
      }
 
    return mem;
 }
 
+static Evas_Object *external_slideshow_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_slideshow_params_free(void *params)
 {
@@ -140,6 +172,7 @@ static Edje_External_Param_Info external_slideshow_params[] = {
    EDJE_EXTERNAL_PARAM_INFO_INT("timeout"),
    EDJE_EXTERNAL_PARAM_INFO_BOOL("loop"),
    EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("transition", "fade", transitions),
+   EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("layout", "fullscreen", transitions),
    EDJE_EXTERNAL_PARAM_INFO_SENTINEL
 };
 
index ba86ea0..e63e45b 100644 (file)
@@ -211,6 +211,13 @@ external_spinner_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__
    return mem;
 }
 
+static Evas_Object *external_spinner_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_spinner_params_free(void *params)
 {
index c3310dc..311ecc9 100644 (file)
@@ -5,8 +5,6 @@
 typedef struct _Elm_Params_Thumb
 {
    const char *animate;
-   Eina_Bool keep_aspect:1;
-   Eina_Bool aspect_exists:1;
 } Elm_Params_Thumb;
 
 static const char* choices[] = {"loop", "start", "stop", NULL};
@@ -41,8 +39,6 @@ external_thumb_state_set(void *data __UNUSED__, Evas_Object *obj, const void *fr
        if (set != ELM_THUMB_ANIMATION_LAST)
           elm_thumb_animate_set(obj, set);
      }
-   if (p->aspect_exists)
-     elm_thumb_keep_aspect_set(obj, p->keep_aspect);
 }
 
 static Eina_Bool
@@ -58,14 +54,6 @@ external_thumb_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ext
             return EINA_TRUE;
          }
      }
-   else if (!strcmp(param->name, "aspect"))
-     {
-       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
-         {
-            elm_thumb_keep_aspect_set(obj, param->i);
-            return EINA_TRUE;
-         }
-     }
 
    ERR("unknown parameter '%s' of type '%s'",
        param->name, edje_external_param_type_str(param->type));
@@ -89,14 +77,6 @@ external_thumb_param_get(void *data __UNUSED__, const Evas_Object *obj, Edje_Ext
             return EINA_TRUE;
          }
      }
-   else if (!strcmp(param->name, "aspect"))
-     {
-       if (param->type == EDJE_EXTERNAL_PARAM_TYPE_BOOL)
-         {
-            param->i = elm_thumb_keep_aspect_get(obj);
-            return EINA_TRUE;
-         }
-     }
 
    ERR("unknown parameter '%s' of type '%s'",
        param->name, edje_external_param_type_str(param->type));
@@ -119,16 +99,18 @@ external_thumb_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
      {
        if (!strcmp(param->name, "animate"))
          mem->animate = eina_stringshare_add(param->s);
-       else if (!strcmp(param->name, "aspect"))
-         {
-            mem->keep_aspect = !!param->i;
-            mem->aspect_exists = EINA_TRUE;
-         }
      }
 
    return mem;
 }
 
+static Evas_Object *external_thumb_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_thumb_params_free(void *params)
 {
@@ -142,7 +124,6 @@ external_thumb_params_free(void *params)
 static Edje_External_Param_Info external_thumb_params[] =
   {
     EDJE_EXTERNAL_PARAM_INFO_CHOICE_FULL("animate", "loop", choices),
-    EDJE_EXTERNAL_PARAM_INFO_BOOL("keep aspect"),
     EDJE_EXTERNAL_PARAM_INFO_SENTINEL
   };
 
index 62d645f..90c4d2c 100644 (file)
@@ -57,11 +57,9 @@ external_toggle_param_set(void *data __UNUSED__, Evas_Object *obj, const Edje_Ex
        if (param->type == EDJE_EXTERNAL_PARAM_TYPE_STRING)
          {
             Evas_Object *icon = external_common_param_icon_get(obj, param);
-            if (icon)
-              {
-                 elm_toggle_icon_set(obj, icon);
-                 return EINA_TRUE;
-              }
+            if ((strcmp(param->s, "")) && (!icon)) return EINA_FALSE;
+            elm_toggle_icon_set(obj, icon);
+            return EINA_TRUE;
          }
      }
    else if (!strcmp(param->name, "label on"))
@@ -178,13 +176,18 @@ external_toggle_params_parse(void *data __UNUSED__, Evas_Object *obj __UNUSED__,
    return mem;
 }
 
+static Evas_Object *external_toggle_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_toggle_params_free(void *params)
 {
    Elm_Params_Toggle *mem = params;
 
-   if (mem->icon)
-     evas_object_del(mem->icon);
    if (mem->on)
      eina_stringshare_del(mem->on);
    if (mem->off)
index a41cb69..27c6f24 100644 (file)
@@ -103,6 +103,13 @@ external_toolbar_params_parse(void *data, Evas_Object *obj, const Eina_List *par
    return mem;
 }
 
+static Evas_Object *external_toolbar_content_get(void *data __UNUSED__,
+               const Evas_Object *obj, const char *content)
+{
+       ERR("so content");
+       return NULL;
+}
+
 static void
 external_toolbar_params_free(void *params)
 {
index ec29508..c7a40d5 100644 (file)
@@ -21,3 +21,5 @@ DEFINE_TYPE(spinner)
 DEFINE_TYPE(thumb)
 DEFINE_TYPE(toggle)
 DEFINE_TYPE(toolbar)
+DEFINE_TYPE(notify)
+DEFINE_TYPE(panes)
index 45591b1..a4b5a88 100644 (file)
@@ -39,6 +39,7 @@ const Edje_External_Type external_##type_name##_type = {\
     .params_parse = external_##type_name##_params_parse,\
     .params_free = external_##type_name##_params_free,  \
     .label_get = external_##type_name##_label_get,      \
+    .content_get = external_##type_name##_content_get,  \
     .description_get = NULL,                            \
     .icon_add = external_##type_name##_icon_add,        \
     .preview_add = NULL,                                \
index 5cff583..a39b14b 100644 (file)
@@ -69,6 +69,7 @@
 #include <Ecore.h>
 #include <Ecore_Evas.h>
 #include <Ecore_File.h>
+#include <Ecore_IMF.h>
 #include <Edje.h>
 
 #ifdef ELM_EDBUS
@@ -120,7 +121,7 @@ extern "C" {
 
 #define ELM_VERSION_MAJOR @VMAJ@
 #define ELM_VERSION_MINOR @VMIN@
-   
+
    typedef struct _Elm_Version
      {
         int major;
@@ -128,9 +129,9 @@ extern "C" {
         int micro;
         int revision;
      } Elm_Version;
-   
+
    EAPI extern Elm_Version *elm_version;
-   
+
 /* handy macros */
 #define ELM_RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy)))
 #define ELM_PI 3.14159265358979323846
@@ -208,9 +209,9 @@ extern "C" {
        ELM_THUMB_ANIMATION_STOP,
        ELM_THUMB_ANIMATION_LAST
     } Elm_Thumb_Animation_Setting;
-   
+
    typedef struct _Elm_Theme Elm_Theme;
-   
+
    typedef enum _Elm_Clock_Digedit
      {
         ELM_CLOCK_NONE         = 0,
@@ -222,7 +223,7 @@ extern "C" {
         ELM_CLOCK_SEC_UNIT     = 1 << 5,
         ELM_CLOCK_ALL         = (1 << 6) - 1
      } Elm_Clock_Digedit;
-   
+
 #ifndef ELM_LIB_QUICKLAUNCH
 #define ELM_MAIN() int main(int argc, char **argv) {elm_init(argc, argv); return elm_main(argc, argv);}
 #else
@@ -253,9 +254,9 @@ extern "C" {
 
    EAPI Eina_Bool    elm_policy_set(unsigned int policy, int value);
    EAPI int          elm_policy_get(unsigned int policy);
-   
+
    EAPI void         elm_all_flush(void);
-       
+
    EAPI void         elm_object_scale_set(Evas_Object *obj, double scale);
    EAPI double       elm_object_scale_get(const Evas_Object *obj);
    EAPI void         elm_object_style_set(Evas_Object *obj, const char *style);
@@ -265,6 +266,7 @@ extern "C" {
 
    EAPI Eina_Bool    elm_object_widget_check(const Evas_Object *obj);
    EAPI Evas_Object *elm_object_parent_widget_get(const Evas_Object *obj);
+   EAPI Evas_Object *elm_object_top_widget_get(const Evas_Object *obj);
    EAPI const char  *elm_object_widget_type_get(const Evas_Object *obj);
 
    EAPI double       elm_scale_get(void);
@@ -284,11 +286,19 @@ extern "C" {
    EAPI void         elm_object_scroll_hold_pop(Evas_Object *obj);
    EAPI void         elm_object_scroll_freeze_push(Evas_Object *obj);
    EAPI void         elm_object_scroll_freeze_pop(Evas_Object *obj);
+   EAPI void         elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock);
+   EAPI void         elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock);
+   EAPI Eina_Bool    elm_object_scroll_lock_x_get(const Evas_Object *obj);
+   EAPI Eina_Bool    elm_object_scroll_lock_y_get(const Evas_Object *obj);
+       
+   EAPI void         elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source);
+   EAPI void         elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
+   EAPI void         *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
 
    EAPI void         elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h);
 
    EAPI Elm_Theme   *elm_theme_new(void);
-  EAPI void         elm_theme_free(Elm_Theme *th);
+   EAPI void         elm_theme_free(Elm_Theme *th);
    EAPI void         elm_theme_overlay_add(Elm_Theme *th, const char *item);
    EAPI void         elm_theme_overlay_del(Elm_Theme *th, const char *item);
    EAPI void         elm_theme_extension_add(Elm_Theme *th, const char *item);
@@ -297,12 +307,12 @@ extern "C" {
    EAPI const char  *elm_theme_get(Elm_Theme *th);
    EAPI void         elm_theme_flush(Elm_Theme *th);
    EAPI void         elm_theme_full_flush(void);
-   
+
    EAPI void         elm_theme_all_set(const char *theme);
 
    EAPI void         elm_object_theme_set(Evas_Object *obj, Elm_Theme *th);
    EAPI Elm_Theme   *elm_object_theme_get(Evas_Object *obj);
-   
+
    EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
    EAPI void         elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj);
    EAPI void         elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj);
@@ -359,12 +369,13 @@ extern "C" {
     */
    EAPI void         elm_win_keyboard_mode_set(Evas_Object *obj, Elm_Win_Keyboard_Mode mode);
    EAPI void         elm_win_keyboard_win_set(Evas_Object *obj, Eina_Bool is_keyboard);
-   
+
    EAPI void         elm_win_screen_position_get(const Evas_Object *obj, int *x, int *y);
-       
+
    EAPI Evas_Object *elm_win_inwin_add(Evas_Object *obj);
    EAPI void         elm_win_inwin_activate(Evas_Object *obj);
    EAPI void         elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_win_inwin_content_unset(Evas_Object *obj);
    /* available styles:
     * default
     * minimal
@@ -489,6 +500,7 @@ extern "C" {
 
    EAPI Evas_Object *elm_scroller_add(Evas_Object *parent);
    EAPI void         elm_scroller_content_set(Evas_Object *obj, Evas_Object *child);
+   EAPI Evas_Object *elm_scroller_content_unset(Evas_Object *obj);
    EAPI void         elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base);
    EAPI void         elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h);
    EAPI void         elm_scroller_region_show(Evas_Object *obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h);
@@ -519,6 +531,11 @@ extern "C" {
    EAPI Eina_Bool    elm_label_line_wrap_get(const Evas_Object *obj);
    EAPI void         elm_label_wrap_width_set(Evas_Object *obj, Evas_Coord w);
    EAPI Evas_Coord   elm_label_wrap_width_get(const Evas_Object *obj);
+   EAPI void         elm_label_fontsize_set(Evas_Object *obj, int fontsize);
+   EAPI void         elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
+   EAPI void         elm_label_text_align_set(Evas_Object *obj, const char *alignmode);
+   EAPI void         elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a);
+   EAPI void         elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis);
    /* available styles:
     * default
     * marker
@@ -544,6 +561,7 @@ extern "C" {
    EAPI void         elm_frame_label_set(Evas_Object *obj, const char *label);
    EAPI const char  *elm_frame_label_get(const Evas_Object *obj);
    EAPI void         elm_frame_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_frame_content_unset(Evas_Object *obj);
    /* available styles:
     * default
     * pad_small
@@ -562,7 +580,7 @@ extern "C" {
    EAPI void         elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
    EAPI void         elm_table_unpack(Evas_Object *obj, Evas_Object *subobj);
    EAPI void         elm_table_clear(Evas_Object *obj, Eina_Bool clear);
-       
+
    typedef struct _Elm_Gengrid_Item_Class Elm_Gengrid_Item_Class;
    typedef struct _Elm_Gengrid_Item_Class_Func Elm_Gengrid_Item_Class_Func;
    typedef struct _Elm_Gengrid_Item Elm_Gengrid_Item;
@@ -605,6 +623,7 @@ extern "C" {
    EAPI Eina_Bool    elm_gengrid_item_selected_get(const Elm_Gengrid_Item *item);
    EAPI const Evas_Object *elm_gengrid_item_object_get(Elm_Gengrid_Item *item);
    EAPI const Eina_List *elm_gengrid_selected_items_get(const Evas_Object *obj);
+   EAPI const Eina_List *elm_gengrid_items_get(const Evas_Object *obj);
    EAPI Elm_Gengrid_Item *elm_gengrid_item_append(Evas_Object *obj, const Elm_Gengrid_Item_Class *gcc,  const void *data, Evas_Smart_Cb func, const void *func_data);
    /* smart callbacks called:
     *
@@ -634,6 +653,8 @@ extern "C" {
    EAPI Eina_Bool    elm_clock_show_am_pm_get(const Evas_Object *obj);
    EAPI void         elm_clock_show_seconds_set(Evas_Object *obj, Eina_Bool seconds);
    EAPI Eina_Bool    elm_clock_show_seconds_get(const Evas_Object *obj);
+   EAPI void        elm_clock_interval_set(Evas_Object *obj, double interval);
+   EAPI double      elm_clock_interval_get(const Evas_Object *obj);
    /* smart callbacks called:
     * "changed" - the user changed the time
     */
@@ -642,6 +663,7 @@ extern "C" {
    EAPI Eina_Bool    elm_layout_file_set(Evas_Object *obj, const char *file, const char *group);
    EAPI Eina_Bool    elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, const char *style);
    EAPI void         elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content);
+   EAPI Evas_Object *elm_layout_content_unset(Evas_Object *obj, const char *swallow);
    EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj);
    EAPI void         elm_layout_sizing_eval(Evas_Object *obj);
    /* smart callbacks called:
@@ -657,18 +679,24 @@ extern "C" {
         ELM_NOTIFY_ORIENT_TOP_LEFT,
         ELM_NOTIFY_ORIENT_TOP_RIGHT,
         ELM_NOTIFY_ORIENT_BOTTOM_LEFT,
-        ELM_NOTIFY_ORIENT_BOTTOM_RIGHT
+        ELM_NOTIFY_ORIENT_BOTTOM_RIGHT,
+        ELM_NOTIFY_ORIENT_LAST
      } Elm_Notify_Orient;
    EAPI Evas_Object *elm_notify_add(Evas_Object *parent);
    EAPI void         elm_notify_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_notify_content_unset(Evas_Object *obj);
+   EAPI Evas_Object *elm_notify_content_get(const Evas_Object *obj);
    EAPI void        elm_notify_parent_set(Evas_Object *obj, Evas_Object *parent);
    EAPI void        elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient);
+   EAPI Elm_Notify_Orient          elm_notify_orient_get(const Evas_Object *obj);
    EAPI void         elm_notify_timeout_set(Evas_Object *obj, int timeout);
+   EAPI int          elm_notify_timeout_get(const Evas_Object *obj);
    EAPI void        elm_notify_timer_init(Evas_Object *obj);
    EAPI void        elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat);
+   EAPI Eina_Bool       elm_notify_repeat_events_get(const Evas_Object *obj);
    /* smart callbacks called:
     */
-   
+
    typedef enum _Elm_Hover_Axis
      {
        ELM_HOVER_AXIS_NONE,
@@ -682,6 +710,7 @@ extern "C" {
    EAPI void         elm_hover_parent_set(Evas_Object *obj, Evas_Object *parent);
    EAPI Evas_Object *elm_hover_parent_get(Evas_Object *obj);
    EAPI void         elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content);
+   EAPI Evas_Object *elm_hover_content_unset(Evas_Object *obj, const char *swallow);
    EAPI const char  *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
    /* available styles:
     * default
@@ -775,7 +804,10 @@ extern "C" {
      } Elm_Text_Format;
    EAPI Evas_Object *elm_notepad_add(Evas_Object *parent);
    EAPI void         elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format);
+   EAPI void         elm_notepad_file_save(Evas_Object *obj, const char *file, Elm_Text_Format format);
    EAPI void         elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
+   EAPI void         elm_notepad_autosave_set(Evas_Object *obj, Eina_Bool autosave);
+
    /* smart callbacks called:
     */
 
@@ -844,15 +876,17 @@ extern "C" {
    EAPI const char  *elm_bubble_info_get(const Evas_Object *obj);
 
    EAPI void         elm_bubble_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_bubble_content_unset(Evas_Object *obj);
    EAPI void         elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon);
    EAPI Evas_Object *elm_bubble_icon_get(const Evas_Object *obj);
    EAPI void         elm_bubble_corner_set(Evas_Object *obj, const char *corner);
    /* smart callbacks called:
     */
-
+    
    EAPI Evas_Object *elm_photo_add(Evas_Object *parent);
    EAPI Eina_Bool    elm_photo_file_set(Evas_Object *obj, const char *file);
    EAPI void         elm_photo_size_set(Evas_Object *obj, int size);
+   EAPI void            elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill);
    /* smart callbacks called:
     * "clicked" - the user clicked the icon
     */
@@ -861,10 +895,6 @@ extern "C" {
    EAPI void        elm_thumb_file_set(Evas_Object *obj, const char *file, const char *key);
    EAPI void        elm_thumb_file_get(const Evas_Object *obj, const char **file, const char **key);
    EAPI void        elm_thumb_path_get(const Evas_Object *obj, const char **file, const char **key);
-   EAPI void        elm_thumb_keep_aspect_set(Evas_Object *obj, Eina_Bool setting);
-   EAPI Eina_Bool    elm_thumb_keep_aspect_get(const Evas_Object *obj);
-   EAPI void        elm_thumb_align_set(Evas_Object *obj, float x_align, float y_align);
-   EAPI void        elm_thumb_align_get(const Evas_Object *obj, float *x, float *y);
    EAPI void        elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting s);
    EAPI Elm_Thumb_Animation_Setting elm_thumb_animate_get(const Evas_Object *obj);
    EAPI Eina_Bool    elm_thumb_ethumb_client_connected(void);
@@ -996,6 +1026,10 @@ extern "C" {
    EAPI const Eina_List *elm_list_items_get(const Evas_Object *obj);
    EAPI Elm_List_Item   *elm_list_selected_item_get(const Evas_Object *obj);
    EAPI const Eina_List *elm_list_selected_items_get(const Evas_Object *obj);
+
+   EAPI void             elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting);
+   EAPI Eina_Bool        elm_list_item_separator_get(const Elm_List_Item *it);
+
    EAPI void             elm_list_item_selected_set(Elm_List_Item *item, Eina_Bool selected);
    EAPI Eina_Bool        elm_list_item_selected_get(Elm_List_Item *item);
    EAPI void             elm_list_item_show(Elm_List_Item *item);
@@ -1095,6 +1129,9 @@ extern "C" {
    EAPI Eina_Bool         elm_genlist_homogeneous_get(const Evas_Object *obj);
    EAPI void              elm_genlist_block_count_set(Evas_Object *obj, int n);
    EAPI int               elm_genlist_block_count_get(const Evas_Object *obj);
+   EAPI void              elm_genlist_longpress_timeout_set(const Evas_Object *obj, double timeout);
+   EAPI double            elm_genlist_longpress_timeout_get(const Evas_Object *obj);
+
 
    /* operations to add items */
    EAPI Elm_Genlist_Item *elm_genlist_item_append(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
@@ -1171,6 +1208,7 @@ extern "C" {
     * default
     * fade
     * fade_translucide
+    * fade_invisible
     */
 
    typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class;
@@ -1187,24 +1225,27 @@ extern "C" {
        } func;
      };
 
-   EAPI Evas_Object *  elm_slideshow_add(Evas_Object *parent);
-   EAPI Elm_Slideshow_Item* elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data);
-   EAPI void           elm_slideshow_show(Elm_Slideshow_Item *item);
-   EAPI void           elm_slideshow_next(Evas_Object *obj);
-   EAPI void           elm_slideshow_previous(Evas_Object *obj);
-   EAPI const Eina_List *elm_slideshow_transitions_get(const Evas_Object *obj);
-   EAPI void           elm_slideshow_transition_set(Evas_Object *obj, const char *);
-   EAPI const char     *elm_slideshow_transition_get(const Evas_Object *obj);
-   EAPI void            elm_slideshow_timeout_set(Evas_Object *obj ,int timeout);
-   EAPI int            elm_slideshow_timeout_get(const Evas_Object *obj);
-   EAPI void           elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop);
-   EAPI Eina_Bool      elm_slideshow_loop_get(const Evas_Object *obj);
-   EAPI void           elm_slideshow_clear(Evas_Object *obj);
-   EAPI const Eina_List *elm_slideshow_items_get(const Evas_Object *obj);
-   EAPI void           elm_slideshow_item_del(Elm_Slideshow_Item *item);
-   EAPI void *         elm_slideshow_item_data_get(Elm_Slideshow_Item *item);
-   EAPI Elm_Slideshow_Item* elm_slideshow_item_current_get(const Evas_Object *obj);
-   EAPI Evas_Object*   elm_slideshow_item_object_get(Elm_Slideshow_Item* item);
+   EAPI Evas_Object            *elm_slideshow_add(Evas_Object *parent);
+   EAPI Elm_Slideshow_Item     *elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, const void *data);
+   EAPI void                            elm_slideshow_show(Elm_Slideshow_Item *item);
+   EAPI void                            elm_slideshow_next(Evas_Object *obj);
+   EAPI void                            elm_slideshow_previous(Evas_Object *obj);
+   EAPI const Eina_List        *elm_slideshow_transitions_get(const Evas_Object *obj);
+   EAPI void                    elm_slideshow_transition_set(Evas_Object *obj, const char *);
+   EAPI const char                     *elm_slideshow_transition_get(const Evas_Object *obj);
+   EAPI void                    elm_slideshow_timeout_set(Evas_Object *obj ,int timeout);
+   EAPI int                                     elm_slideshow_timeout_get(const Evas_Object *obj);
+   EAPI void                            elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop);
+   EAPI Eina_Bool                       elm_slideshow_loop_get(const Evas_Object *obj);
+   EAPI void                            elm_slideshow_clear(Evas_Object *obj);
+   EAPI const Eina_List        *elm_slideshow_items_get(const Evas_Object *obj);
+   EAPI void                            elm_slideshow_item_del(Elm_Slideshow_Item *item);
+   EAPI void                           *elm_slideshow_item_data_get(Elm_Slideshow_Item *item);
+   EAPI Elm_Slideshow_Item     *elm_slideshow_item_current_get(const Evas_Object *obj);
+   EAPI Evas_Object*            elm_slideshow_item_object_get(Elm_Slideshow_Item* item);
+   EAPI const char                     *elm_slideshow_layout_get(const Evas_Object *obj);
+   EAPI void                            elm_slideshow_layout_set(Evas_Object *obj, const char *layout);
+   EAPI const Eina_List        *elm_slideshow_layouts_get(const Evas_Object *obj);
 
 
    EAPI Evas_Object *elm_fileselector_add(Evas_Object *parent);
@@ -1272,6 +1313,8 @@ extern "C" {
    EAPI void        elm_spinner_editable_set(Evas_Object *obj, Eina_Bool editable);
    EAPI Eina_Bool    elm_spinner_editable_get(const Evas_Object *obj);
    EAPI void        elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label);
+   EAPI void        elm_spinner_interval_set(Evas_Object *obj, double interval);
+   EAPI double      elm_spinner_interval_get(const Evas_Object *obj);
    /* smart callbacks called:
     * "changed" - when the spinner value changes
     * "delay,changed" - when the spinner value changed, but a small time after a change (use this if you only want to respond to a change once the spinner is held still for a short while).
@@ -1326,7 +1369,7 @@ extern "C" {
    EAPI void         elm_photocam_paused_set(Evas_Object *obj, Eina_Bool paused);
    EAPI Eina_Bool    elm_photocam_paused_get(const Evas_Object *obj);
    EAPI Evas_Object *elm_photocam_internal_image_get(const Evas_Object *obj);
-   
+
    /* smart callbacks called:
     * "clicked" - when image clicked
     * "press" - when mouse/finger held down initially on image
@@ -1419,7 +1462,7 @@ extern "C" {
 
    EAPI void         elm_map_source_set(Evas_Object *obj, Elm_Map_Sources source);
    EAPI Elm_Map_Sources elm_map_source_get(const Evas_Object *obj);
-   EAPI void         elm_map_source_custom_api_set(Elm_Map_Sources source, const char *label, 
+   EAPI void         elm_map_source_custom_api_set(Elm_Map_Sources source, const char *label,
                                int zoom_min, int zoom_max, ElmMapSourceURLFunc url_cb);
    EAPI int          elm_map_source_zoom_min_get(Elm_Map_Sources source);
    EAPI int         elm_map_source_zoom_max_get(Elm_Map_Sources source);
@@ -1452,18 +1495,39 @@ extern "C" {
    EAPI void                  elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient);
    EAPI Elm_Panel_Orient      elm_panel_orient_get(Evas_Object *obj);
    EAPI void                  elm_panel_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object          *elm_panel_content_unset(Evas_Object *obj);
    EAPI void                  elm_panel_hidden_set(Evas_Object *obj, Eina_Bool hidden);
    EAPI Eina_Bool             elm_panel_hidden_get(Evas_Object *obj);
    EAPI void                  elm_panel_toggle(Evas_Object *obj);
 
+
+   /**
+    * TODO
+    *
+    * Update the minimun height of the bar in the theme. No minimun should be set in the vertical theme
+    * Add events (move, start ...)
+    */
+   EAPI Evas_Object          *elm_panes_add(Evas_Object *parent);
+   EAPI void                  elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content);
+   EAPI void                  elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object             *elm_panes_content_left_get(const Evas_Object *obj);
+   EAPI Evas_Object             *elm_panes_content_right_get(const Evas_Object *obj);
+   EAPI double               elm_panes_content_left_size_get(const Evas_Object *obj);
+   EAPI void                 elm_panes_content_left_size_set(Evas_Object *obj, double size);
+   EAPI void                 elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
+   EAPI Eina_Bool                elm_panes_horizontal_is(const Evas_Object *obj);
+
+
    typedef enum _Elm_Flip_Mode
      {
         ELM_FLIP_ROTATE_Y_CENTER_AXIS,
           ELM_FLIP_ROTATE_X_CENTER_AXIS,
           ELM_FLIP_ROTATE_XZ_CENTER_AXIS,
-          ELM_FLIP_ROTATE_YZ_CENTER_AXIS
+          ELM_FLIP_ROTATE_YZ_CENTER_AXIS,
+          ELM_FLIP_CUBE_LEFT,
+          ELM_FLIP_CUBE_RIGHT
      } Elm_Flip_Mode;
-   
+
    EAPI Evas_Object *elm_flip_add(Evas_Object *parent);
    EAPI void         elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content);
    EAPI void         elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content);
@@ -1475,7 +1539,7 @@ extern "C" {
    /* smart callbacks called:
     * "animate,done" - when a flip animation is finished
     */
-   
+
    EAPI Evas_Object *elm_scrolled_entry_add(Evas_Object *parent);
    EAPI void         elm_scrolled_entry_single_line_set(Evas_Object *obj, Eina_Bool single_line);
    EAPI Eina_Bool    elm_scrolled_entry_single_line_get(const Evas_Object *obj);
@@ -1516,16 +1580,39 @@ extern "C" {
 
    EAPI Evas_Object *elm_conformant_add(Evas_Object *parent);
    EAPI void         elm_conformant_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_conformant_content_unset(Evas_Object *obj);
+
 
    EAPI Evas_Object *elm_mapbuf_add(Evas_Object *parent);
    EAPI void         elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content);
+   EAPI Evas_Object *elm_mapbuf_content_unset(Evas_Object *obj);
    EAPI void         elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled);
    EAPI Eina_Bool    elm_mapbuf_enabled_get(const Evas_Object *obj);
    EAPI void         elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth);
    EAPI Eina_Bool    elm_mapbuf_smooth_get(const Evas_Object *obj);
    EAPI void         elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha);
    EAPI Eina_Bool    elm_mapbuf_alpha_get(const Evas_Object *obj);
-       
+
+   /* animator */
+   typedef struct _Animator Elm_Animator;
+
+   typedef enum {ELM_ANIMATOR_CURVE_LINEAR, ELM_ANIMATOR_CURVE_IN_OUT, ELM_ANIMATOR_CURVE_IN, ELM_ANIMATOR_CURVE_OUT} Elm_Animator_Curve_Style; 
+
+   EAPI Elm_Animator* elm_animator_add(Evas_Object *parent);
+   EAPI void elm_animator_del(Elm_Animator *animator);
+   EAPI void elm_animator_duration_set(Elm_Animator *animator, double duration);
+   EAPI void elm_animator_operation_callback_set(Elm_Animator *animator, void (*func)(void *data, Elm_Animator *animator, double frame), void *data); 
+   EAPI void elm_animator_completion_callback_set(Elm_Animator *animator, void (*func)(void *data), void *data);
+   EAPI void elm_animator_stop(Elm_Animator *animator);
+   EAPI void elm_animator_repeat_set(Elm_Animator *animator, unsigned int repeat_cnt);
+   EAPI void elm_animator_animate(Elm_Animator *animator);
+   EAPI void elm_animator_curve_style_set(Elm_Animator *animator, Elm_Animator_Curve_Style cs);
+   EAPI void elm_animator_auto_reverse_set(Elm_Animator *animator, Eina_Bool reverse);
+   EAPI Eina_Bool elm_animator_auto_reverse_get(Elm_Animator *animator);
+   EAPI Eina_Bool elm_animator_operating_get(Elm_Animator *animator);
+   EAPI unsigned int elm_animator_repeat_get(Elm_Animator *animator);
+
+
 #ifdef __cplusplus
 }
 #endif
index b8a515d..ce96d9c 100644 (file)
@@ -25,7 +25,8 @@ endif
 
 lib_LTLIBRARIES = libelementary.la
 
-include_HEADERS = Elementary.h
+includes_HEADERS = Elementary.h
+includesdir = $(includedir)/elementary-@VMAJ@
 
 libelementary_la_SOURCES = \
 elm_priv.h \
@@ -69,12 +70,14 @@ elm_notify.c \
 elm_slideshow.c \
 elm_menu.c \
 elm_panel.c \
+elm_panes.c \
 elm_map.c \
 elm_flip.c \
 elm_conform.c \
 elm_mapbuf.c \
 elm_thumb.c \
 elm_config.c \
+elm_animator.c \
 \
 elc_anchorblock.c \
 elc_anchorview.c \
@@ -91,7 +94,9 @@ els_scroller.h \
 els_box.c \
 els_box.h \
 els_icon.c \
-els_icon.h
+els_icon.h \
+\
+elm_cnp_helper.c
 
 
 libelementary_la_CFLAGS =
index 11d21f3..0bf439d 100644 (file)
@@ -152,15 +152,16 @@ _parent_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
 }
 
 static Evas_Object *
-_item_provider(void *data, Evas_Object *entry, const char *item)
+_item_provider(void *data, Evas_Object *entry __UNUSED__, const char *item)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   Evas_Object *o;
    Eina_List *l;
    Elm_Anchorblock_Item_Provider *ip;
-   
+
    EINA_LIST_FOREACH(wd->item_providers, l, ip)
      {
+        Evas_Object *o;
+
         o = ip->func(ip->data, data, item);
         if (o) return o;
      }
index 2055bd3..049e7da 100644 (file)
@@ -143,15 +143,16 @@ _parent_del(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *e
 }
 
 static Evas_Object *
-_item_provider(void *data, Evas_Object *entry, const char *item)
+_item_provider(void *data, Evas_Object *entry __UNUSED__, const char *item)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   Evas_Object *o;
    Eina_List *l;
    Elm_Anchorview_Item_Provider *ip;
    
    EINA_LIST_FOREACH(wd->item_providers, l, ip)
      {
+        Evas_Object *o;
+
         o = ip->func(ip->data, data, item);
         if (o) return o;
      }
index 90a2e09..fceded7 100644 (file)
@@ -172,7 +172,7 @@ _contract_req(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_in
 }
 
 /***  PRIVATES  ***/
-static int
+static Eina_Bool
 _sel_do(void *data)
 {
    struct sel_data *sd;
index 08ba775..500f981 100644 (file)
@@ -216,7 +216,7 @@ _new_window_add(Widget_Data *wd)
 static void
 _fs_launch(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
 {
-   Evas_Object *fs_btn, *win, *iw;
+   Evas_Object *fs_btn, *win = NULL, *iw = NULL;
    Eina_Bool win_fallback;
    Widget_Data *wd;
 
@@ -695,6 +695,8 @@ elm_fileselector_button_inwin_mode_get(const Evas_Object *obj)
 /**
  * Set the icon used for the button
  *
+ * Once the icon object is set, a previously set one will be deleted.
+ *
  * @param obj The button object
  * @param icon  The image for the button
  *
@@ -706,21 +708,19 @@ elm_fileselector_button_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
-   if ((icon) && (wd->icon != icon))
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
+   wd->icon = icon;
+   if (icon)
      {
-       wd->icon = icon;
        elm_widget_sub_object_add(obj, icon);
        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
        edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
        edje_object_message_signal_process(wd->btn);
-       _sizing_eval(obj);
      }
-   else
-     wd->icon = icon;
+   _sizing_eval(obj);
 }
 
 /**
index ddcb156..4659721 100644 (file)
@@ -260,6 +260,7 @@ elm_hoversel_add(Evas_Object *parent)
    evas_object_event_callback_add(wd->btn, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                  _changed_size_hints, obj);
    evas_object_smart_callback_add(wd->btn, "clicked", _button_clicked, obj);
+   elm_hoversel_hover_parent_set(obj, parent);
    _sizing_eval(obj);
    return obj;
 }
index 743303e..2204b4e 100644 (file)
@@ -25,7 +25,7 @@ struct _Widget_Data
    Elm_Text_Format format;
    Ecore_Timer *delay_write;
    Eina_Bool can_write : 1;
-   Eina_Bool auto_write : 1;
+   Eina_Bool autosave : 1;
 };
 
 static const char *widtype = NULL;
@@ -44,7 +44,7 @@ _del_hook(Evas_Object *obj)
    if (wd->delay_write)
      {
        ecore_timer_del(wd->delay_write);
-       _save(obj);
+        if (wd->autosave) _save(obj);
      }
    free(wd);
 }
@@ -75,7 +75,7 @@ _buf_append(char *buf, const char *str, int *len, int *alloc)
        char *buf2 = realloc(buf, *alloc + len2 + 512);
        if (!buf2) return NULL;
        buf = buf2;
-       *alloc += 512 + len2;
+       *alloc += (512 + len2);
      }
    strcpy(buf + *len, str);
    *len += len2;
@@ -88,7 +88,7 @@ _load_file(const char *file)
    FILE *f;
    size_t size;
    int alloc = 0, len = 0;
-   char *text = NULL, buf[4096];
+   char *text = NULL, buf[PATH_MAX];
 
    f = fopen(file, "rb");
    if (!f) return NULL;
@@ -104,11 +104,13 @@ _load_file(const char *file)
 static char *
 _load_plain(const char *file)
 {
-   char *text, *text2;
+   char *text;
 
    text = _load_file(file);
    if (text)
      {
+        char *text2;
+
        text2 = elm_entry_utf8_to_markup(text);
        free(text);
        return text2;
@@ -136,8 +138,8 @@ _load(Evas_Object *obj)
        text = _load_file(wd->file);
        break;
      default:
-       elm_entry_entry_set(wd->entry, "Unknown Text Format");
        text = NULL;
+        break;
      }
    if (text)
      {
@@ -200,14 +202,14 @@ _save(Evas_Object *obj)
      }
 }
 
-static int
+static Eina_Bool
 _delay_write(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    _save(data);
    wd->delay_write = NULL;
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -220,7 +222,7 @@ _entry_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSE
        ecore_timer_del(wd->delay_write);
        wd->delay_write = NULL;
      }
-   if (!wd->auto_write) return;
+   if (!wd->autosave) return;
    wd->delay_write = ecore_timer_add(2.0, _delay_write, data);
 }
 
@@ -284,6 +286,7 @@ elm_notepad_add(Evas_Object *parent)
 
    wd->scr = elm_scroller_add(parent);
    elm_widget_resize_object_set(obj, wd->scr);
+
    wd->entry = elm_entry_add(parent);
    evas_object_size_hint_weight_set(wd->entry, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
    evas_object_size_hint_align_set(wd->entry, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -298,7 +301,7 @@ elm_notepad_add(Evas_Object *parent)
    evas_object_smart_callback_add(obj, "scroll-freeze-on", _freeze_on, obj);
    evas_object_smart_callback_add(obj, "scroll-freeze-off", _freeze_off, obj);
    
-   wd->auto_write = EINA_TRUE;
+   wd->autosave = EINA_TRUE;
 
    _sizing_eval(obj);
    return obj;
@@ -306,13 +309,13 @@ elm_notepad_add(Evas_Object *parent)
 
 /**
  * This sets the file (and implicitly loads it) for the text to display and
- * then edit. All changes are written back to the file after a short delay.
+ * then edit. All changes are written back to the file after a short delay if
+ * the notepad object is set to autosave.
  *
  * @param obj The notepad object
  * @param file The path to the file to load and save
  * @param format The file format
  *
- *
  * @ingroup Notepad
  */
 EAPI void
@@ -326,13 +329,39 @@ elm_notepad_file_set(Evas_Object *obj, const char *file, Elm_Text_Format format)
        ecore_timer_del(wd->delay_write);
        wd->delay_write = NULL;
      }
-   _save(obj);
+   if (wd->autosave) _save(obj);
    eina_stringshare_replace(&wd->file, file);
    wd->format = format;
    _load(obj);
 }
 
 /**
+ * This function writes any changes made to the file.
+ * All changes are written back to the file after a short delay.
+ *
+ * @param obj The notepad object
+ * @param file The path to the file to save
+ * @param format The file format
+ *
+ * @ingroup Notepad
+ */
+EAPI void 
+elm_notepad_file_save(Evas_Object *obj, const char *file, Elm_Text_Format format) 
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if ((!wd) || (!file)) return;
+   if (wd->delay_write)
+     {
+       ecore_timer_del(wd->delay_write);
+       wd->delay_write = NULL;
+     }
+   wd->format = format;
+   eina_stringshare_replace(&wd->file, file);
+   wd->delay_write = ecore_timer_add(2.0, _delay_write, obj);
+}
+
+/**
  * This will enable or disable the scroller bounce mode for the notepad. See
  * elm_scroller_bounce_set() for details
  *
@@ -350,3 +379,20 @@ elm_notepad_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce)
    if (!wd) return;
    elm_scroller_bounce_set(wd->scr, h_bounce, v_bounce);
 }
+
+/**
+ * This sets the notepad object to 'autosave' the loaded text file or not.
+ *
+ * @param obj The notepad object
+ * @param autosave Autosave the loaded file or not
+ *
+ * @ingroup Notepad
+ */
+EAPI void 
+elm_notepad_autosave_set(Evas_Object *obj, Eina_Bool autosave) 
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   wd->autosave = autosave;
+}
index 664cce7..c63d08e 100644 (file)
@@ -127,6 +127,16 @@ _disable_hook(Evas_Object *obj)
 }
 
 static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   elm_object_signal_emit(wd->entry, emission, source);
+   elm_object_signal_emit(wd->scroller, emission, source);
+}
+
+
+static void
 _entry_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    _sizing_eval(data);
@@ -251,6 +261,7 @@ elm_scrolled_entry_add(Evas_Object *parent)
    elm_widget_disable_hook_set(obj, _disable_hook);
    elm_widget_can_focus_set(obj, 1);
    elm_widget_theme_hook_set(obj, _theme_hook);
+   elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
 
    wd->scroller = elm_scroller_add(parent);
    elm_widget_resize_object_set(obj, wd->scroller);
@@ -657,7 +668,10 @@ elm_scrolled_entry_cursor_end_set(Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
+   int x, y, w, h;
+   elm_scroller_region_get(wd->scroller, &x, &y, &w, &h);
    elm_entry_cursor_end_set(wd->entry);
+   elm_scroller_region_show(wd->scroller, x, y, w, h);
 }
 
 /**
diff --git a/src/lib/elm_animator.c b/src/lib/elm_animator.c
new file mode 100644 (file)
index 0000000..07598bc
--- /dev/null
@@ -0,0 +1,398 @@
+#include <Elementary.h>
+#include "elm_priv.h"
+
+/**
+ * @addtogroup Animator Animator
+ * @ingroup Elementary
+ *
+ * Support normalized frame value for animation.  
+*/
+
+struct _Animator
+{
+   Evas_Object *parent;
+   Ecore_Animator *animator;
+   double begin_time;
+   double cur_time;
+   double duration;
+   unsigned int repeat_cnt;
+   unsigned int cur_repeat_cnt;
+   double (*curve_op) (double frame);
+   void (*animator_op) (void *data, Elm_Animator *animator, double frame);
+   void *animator_arg;
+   void (*completion_op) (void *data);
+   void *completion_arg;
+   Eina_Bool auto_reverse:1;
+   Eina_Bool on_animating:1;
+};
+
+static double _animator_curve_linear(double frame);
+static double _animator_curve_in_out(double frame);
+static double _animator_curve_in(double frame);
+static double _animator_curve_out(double frame);
+static unsigned int _animator_compute_reverse_repeat_count(unsigned int cnt);
+static unsigned int _animator_compute_no_reverse_repeat_count(unsigned int cnt);
+static Eina_Bool _animator_animate_cb(void *data);
+static void _delete_animator(Elm_Animator *animator);
+static void _animator_parent_del(void *data, Evas *evas, Evas_Object *obj, void *event);
+
+static unsigned int
+_animator_compute_reverse_repeat_count(unsigned int cnt)
+{
+   return ((cnt + 1) * 2) - 1;
+}
+
+static unsigned int
+_animator_compute_no_reverse_repeat_count(unsigned int cnt)
+{
+   return cnt / 2;
+}
+
+static double
+_animator_curve_linear(double frame)
+{
+   return frame;
+}
+
+static double
+_animator_curve_in_out(double frame)
+{
+   if (frame < 0.5)
+     return _animator_curve_out(frame * 2) * 0.5;
+   else
+     return (_animator_curve_in(frame * 2 - 1) * 0.5) + 0.5;
+}
+
+static double
+_animator_curve_in(double frame)
+{
+   return sqrt(1 - pow(frame - 1, 2));
+}
+
+static double
+_animator_curve_out(double frame)
+{
+   return 1 - sqrt(1 - pow(frame, 2));
+}
+
+static void
+_delete_animator(Elm_Animator *animator)
+{
+   if (animator->animator)
+     {
+       ecore_animator_del(animator->animator);
+       animator->animator = NULL;
+     }
+}
+
+static Eina_Bool
+_animator_animate_cb(void *data)
+{
+   Elm_Animator *animator = (Elm_Animator *) data;
+
+   animator->cur_time = ecore_loop_time_get();
+   double elapsed_time = animator->cur_time - animator->begin_time;
+
+   if (elapsed_time > animator->duration)
+     elapsed_time = animator->duration;
+
+   double frame = animator->curve_op(elapsed_time / animator->duration);
+
+   //Reverse?
+   if (animator->auto_reverse)
+     {
+       if ((animator->cur_repeat_cnt % 2) == 0)
+         frame = 1 - frame;
+     }
+
+   if (animator->duration > 0)
+     animator->animator_op(animator->animator_arg, animator, frame);
+
+   //Not end. Keep going.
+   if (elapsed_time < animator->duration)
+     return ECORE_CALLBACK_RENEW;
+
+   //Repeat and reverse and time done! 
+   if (animator->cur_repeat_cnt == 0)
+     {
+       animator->on_animating = EINA_FALSE;
+       _delete_animator(animator);
+       if (animator->completion_op)
+         animator->completion_op(animator->completion_arg);
+       return ECORE_CALLBACK_CANCEL;
+     }
+
+   //Repeat Case
+   --animator->cur_repeat_cnt;
+   animator->begin_time = ecore_loop_time_get();
+
+   return ECORE_CALLBACK_RENEW;
+}
+
+static void 
+_animator_parent_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
+{
+   elm_animator_del(data);
+}
+
+/**
+ * Get the value of reverse mode. 
+ *
+ * @param animator Animator object
+ * @return EINA_TRUE is reverse mode 
+ *
+ * @ingroup Animator 
+ */
+EAPI Eina_Bool
+elm_animator_auto_reverse_get(Elm_Animator *animator)
+{
+   if (!animator) return EINA_FALSE;
+   return animator->auto_reverse;
+}
+
+/**
+ * Get the value of repeat count.
+ *
+ * @param animator Animator object
+ * @return Repeat count
+ *
+ * @ingroup Animator 
+ */
+EAPI unsigned int
+elm_animator_repeat_get(Elm_Animator *animator)
+{
+   if (!animator) return EINA_FALSE;
+   return animator->repeat_cnt;
+}
+
+/**
+ * Set auto reverse function.  
+ *
+ * @param animator Animator object
+ * @param reverse Reverse or not
+ * 
+ * @ingroup Animator 
+ */
+EAPI void
+elm_animator_auto_reverse_set(Elm_Animator *animator, Eina_Bool reverse)
+{
+   if (!animator) return;
+   if (animator->auto_reverse == reverse) return;
+   animator->auto_reverse = reverse;
+   if (reverse) 
+     {
+       animator->repeat_cnt =
+         _animator_compute_reverse_repeat_count(animator->repeat_cnt);
+     }
+   else 
+     {
+       animator->repeat_cnt =
+         _animator_compute_no_reverse_repeat_count(animator->repeat_cnt);
+     }
+}
+
+/**
+ * Set the animation acceleration style. 
+ *
+ * @param animator Animator object
+ * @param cs Curve style. Default is ELM_ANIMATOR_CURVE_LINEAR 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_curve_style_set(Elm_Animator *animator, Elm_Animator_Curve_Style cs)
+{
+   if (!animator) return;
+   switch (cs)
+     {
+      case ELM_ANIMATOR_CURVE_LINEAR:
+       animator->curve_op = _animator_curve_linear;
+       break;
+      case ELM_ANIMATOR_CURVE_IN_OUT:
+       animator->curve_op = _animator_curve_in_out;
+       break;
+      case ELM_ANIMATOR_CURVE_IN:
+       animator->curve_op = _animator_curve_in;
+       break;
+      case ELM_ANIMATOR_CURVE_OUT:
+       animator->curve_op = _animator_curve_out;
+       break;
+      default:
+       animator->curve_op = _animator_curve_linear;
+       break;
+     }
+}
+
+/**
+ * Set the operation duration.  
+ *
+ * @param animator Animator object
+ * @param duration Duration in second 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_duration_set(Elm_Animator *animator, double duration)
+{
+   if (!animator) return;
+   if (animator->on_animating) return;
+   animator->duration = duration;
+}
+
+/**
+ * Set the callback function for animator operation.  
+ * The range of callback function frame data is to 0 ~ 1
+ * User can refer this frame value for one's animation frame data. 
+ * @param animator Animator object
+ * @param op Callback function pointer 
+ * @param data Callback function user argument 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_operation_callback_set(Elm_Animator *animator,
+                                   void (*func) (void *data,
+                                                 Elm_Animator *animator,
+                                                 double frame), void *data)
+{
+   if (!animator) return;
+   if (animator->on_animating) return;
+   animator->animator_op = func;
+   animator->animator_arg = data;
+}
+
+/**
+ * Add new animator. 
+ *
+ * @param parent Parent object
+ * @return animator object 
+ *
+ * @ingroup Animator
+ */
+EAPI Elm_Animator *
+elm_animator_add(Evas_Object *parent)
+{
+   Elm_Animator *animator = calloc(1, sizeof(Elm_Animator));
+
+   if (!animator) return NULL;
+   elm_animator_auto_reverse_set(animator, EINA_FALSE);
+   elm_animator_curve_style_set(animator, ELM_ANIMATOR_CURVE_LINEAR);
+
+   if (parent)
+     evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
+                                   _animator_parent_del, animator);
+
+   animator->parent = parent;
+
+   return animator;
+}
+
+/**
+ * Get the status for the animator operation.
+ *
+ * @param animator Animator object 
+ * @return EINA_TRUE is animator is operating. 
+ *
+ * @ingroup Animator
+ */
+EAPI Eina_Bool
+elm_animator_operating_get(Elm_Animator *animator)
+{
+   if (!animator) return EINA_FALSE;
+   return animator->on_animating;
+}
+
+/**
+ * Delete animator. 
+ *
+ * @param animator Animator object 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_del(Elm_Animator *animator)
+{
+   if (!animator) return;
+   _delete_animator(animator);
+
+   if(animator->parent) 
+     evas_object_event_callback_del(animator->parent, EVAS_CALLBACK_DEL, 
+                                   _animator_parent_del);
+   free(animator);
+}
+
+/**
+ * Set the callback function for the animator end.  
+ *
+ * @param  animator Animator object 
+ * @param  op Callback function pointer
+ * @param  data Callback function user argument 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_completion_callback_set(Elm_Animator *animator, 
+                                    void (*func) (void *data), void *data)
+{
+   if (!animator) return;
+   if (animator->on_animating) return;
+   animator->completion_op = func;
+   animator->completion_arg = data;
+}
+
+/**
+ * Stop animator.
+ *
+ * @param animator Animator object 
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_stop(Elm_Animator *animator)
+{
+   if (!animator) return;
+   animator->on_animating = EINA_FALSE;
+   _delete_animator(animator);
+}
+
+/**
+ * Set the animator repeat count.
+ *
+ * @param  animator Animator object
+ * @param  repeat_cnt Repeat count
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_repeat_set(Elm_Animator *animator, unsigned int repeat_cnt)
+{
+   if (!animator) return;
+   if (!animator->auto_reverse)
+      animator->repeat_cnt = repeat_cnt;
+   else 
+     {
+       animator->repeat_cnt = 
+         _animator_compute_reverse_repeat_count(repeat_cnt);
+     }
+}
+
+/**
+ * Animate now.
+ *
+ * @param animator Animator object
+ *
+ * @ingroup Animator
+ */
+EAPI void
+elm_animator_animate(Elm_Animator *animator)
+{
+   if (!animator) return;
+   if (!animator->animator_op) return;
+   animator->begin_time = ecore_loop_time_get();
+   animator->on_animating = EINA_TRUE;
+   animator->cur_repeat_cnt = animator->repeat_cnt;
+   if (!animator->animator) 
+     animator->animator = ecore_animator_add(_animator_animate_cb, animator);
+   if (!animator->animator)
+     animator->on_animating = EINA_FALSE;
+}
index 264fe87..9721ae2 100644 (file)
@@ -74,7 +74,12 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                   _changed_size_hints, obj);
    if (sub == wd->content) wd->content = NULL;
-   else if (sub == wd->icon) wd->icon = NULL;
+   else if (sub == wd->icon)
+     {
+       edje_object_signal_emit(wd->bbl, "elm,state,icon,hidden", "elm");
+       wd->icon = NULL;
+       edje_object_message_signal_process(wd->bbl);
+     }
    _sizing_eval(obj);
 }
 
@@ -204,13 +209,17 @@ elm_bubble_info_get(const Evas_Object *obj)
 }
 
 /**
- * Set the text to be showed in the bubble
+ * Set the content to be shown in the bubble
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep the old content object, use the
+ * elm_bubble_content_unset() function.
  *
  * @param obj The bubble object
- * @param content The given info about the bubble
+ * @param content The given content of the bubble
  *
- * This function sets the text shown on the top right of bubble. In
- * the Anchorblock example of the Elementary tests application it
+ * This function sets the content shown on the middle of the bubble.
+ * In the Anchorblock example of the Elementary tests application it
  * shows time.
  *
  * @ingroup Bubble
@@ -221,14 +230,13 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->content != content) && (wd->content))
-     elm_widget_sub_object_del(obj, wd->content);
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
    if (content)
      {
        elm_widget_sub_object_add(obj, content);
-       evas_object_event_callback_add(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->bbl, "elm.swallow.content", content);
      }
@@ -236,13 +244,38 @@ elm_bubble_content_set(Evas_Object *obj, Evas_Object *content)
 }
 
 /**
+ * Unset the content shown in the bubble
+ *
+ * Unparent and return the content object which was set for this widget.
+ *
+ * @param obj The bubble object
+ * @return The content that was being used
+ *
+ * @ingroup Bubble
+ */
+EAPI Evas_Object *
+elm_bubble_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->bbl, wd->content);
+   wd->content = NULL;
+   return content;
+}
+
+/**
  * Set the icon of the bubble
  *
+ * Once the icon object is set, a previously set one will be deleted.
+ *
  * @param obj The bubble object
  * @param icon The given icon for the bubble
  *
- * This function sets the icon shown on the top left of bubble.
- *
  * @ingroup Bubble
  */
 EAPI void
@@ -251,8 +284,8 @@ elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
    if (icon)
      {
@@ -260,6 +293,8 @@ elm_bubble_icon_set(Evas_Object *obj, Evas_Object *icon)
        edje_object_part_swallow(wd->bbl, "elm.swallow.icon", icon);
        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
+       edje_object_signal_emit(wd->bbl, "elm,state,icon,visible", "elm");
+       edje_object_message_signal_process(wd->bbl);
      }
    _sizing_eval(obj);
 }
index 3bccbef..f7f134b 100644 (file)
@@ -1,7 +1,3 @@
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -18,7 +14,6 @@ struct _Widget_Data
 {
    Evas_Object *btn, *icon;
    const char *label;
-
    Eina_Bool autorepeat;
    Eina_Bool repeating;
    double ar_threshold;
@@ -162,7 +157,7 @@ _signal_clicked(void *data, Evas_Object *obj, const char *emission, const char *
    _signal_unpressed(data, obj, emission, source); /* safe guard when the theme does not emit the 'unpress' signal */
 }
 
-static int
+static Eina_Bool
 _autorepeat_send(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -178,7 +173,7 @@ _autorepeat_send(void *data)
    return ECORE_CALLBACK_RENEW;
 }
 
-static int
+static Eina_Bool
 _autorepeat_initial_send(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -305,8 +300,10 @@ elm_button_label_get(const Evas_Object *obj)
 /**
  * Set the icon used for the button
  *
+ * Once the icon object is set, a previously set one will be deleted
+ *
  * @param obj The button object
- * @param icon  The image for the button
+ * @param icon The image for the button
  *
  * @ingroup Button
  */
@@ -316,21 +313,19 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
-   if ((icon) && (wd->icon != icon))
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
+   wd->icon = icon;
+   if (icon)
      {
-       wd->icon = icon;
        elm_widget_sub_object_add(obj, icon);
        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
        edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
        edje_object_message_signal_process(wd->btn);
-       _sizing_eval(obj);
      }
-   else
-     wd->icon = icon;
+   _sizing_eval(obj);
 }
 
 /**
index c91956a..188ed3f 100644 (file)
@@ -127,6 +127,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
                                        _changed_size_hints, obj);
        wd->icon = NULL;
        _sizing_eval(obj);
+       edje_object_message_signal_process(wd->chk);
      }
 }
 
@@ -256,10 +257,7 @@ elm_check_label_get(const Evas_Object *obj)
 /**
  * Set the icon object of the check object
  *
- * Once the icon object is set, it will become a child of the check object and
- * be deleted when the check object is deleted. If another icon object is set
- * then the previous one becomes orophaned and will no longer be deleted along
- * with the check.
+ * Once the icon object is set, a previously set one will be deleted.
  *
  * @param obj The check object
  * @param icon The icon object
@@ -272,8 +270,8 @@ elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
    if (icon)
      {
@@ -282,8 +280,9 @@ elm_check_icon_set(Evas_Object *obj, Evas_Object *icon)
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
        edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
-       _sizing_eval(obj);
+       edje_object_message_signal_process(wd->chk);
      }
+   _sizing_eval(obj);
 }
 
 /**
index 6606ba5..9f86fd3 100644 (file)
@@ -14,7 +14,7 @@ typedef struct _Widget_Data Widget_Data;
 struct _Widget_Data
 {
    Evas_Object *clk;
-   double interval;
+   double interval, first_interval;
    Eina_Bool seconds : 1;
    Eina_Bool am_pm : 1;
    Eina_Bool edit : 1;
@@ -38,9 +38,9 @@ struct _Widget_Data
 static const char *widtype = NULL;
 static void _del_hook(Evas_Object *obj);
 static void _theme_hook(Evas_Object *obj);
-static int _ticker(void *data);
-static int _signal_clock_val_up(void *data);
-static int _signal_clock_val_down(void *data);
+static Eina_Bool _ticker(void *data);
+static Eina_Bool _signal_clock_val_up(void *data);
+static Eina_Bool _signal_clock_val_down(void *data);
 static void _time_update(Evas_Object *obj);
 
 static void
@@ -83,7 +83,50 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
      edje_object_signal_emit(wd->clk, "elm,action,unfocus", "elm");
 }
 
-static int
+static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   int i;
+   if (!wd) return;
+   edje_object_signal_emit(wd->clk, emission, source);
+   for (i = 0; i < 6; i++)
+     {
+       if (wd->digit[i])
+         edje_object_signal_emit(wd->digit[i], emission, source);
+     }
+}
+
+static void
+_signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   int i;
+   if (!wd) return;
+   edje_object_signal_callback_add(wd->clk, emission, source, func_cb, data);
+   for (i = 0; i < 6; i++)
+     {
+       if (wd->digit[i])
+         edje_object_signal_callback_add(wd->digit[i], emission, source,
+               func_cb, data);
+     }
+}
+
+static void *
+_signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source))
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   int i;
+   if (!wd) return NULL;
+   for (i = 0; i < 6; i++)
+     {
+       edje_object_signal_callback_del(wd->digit[i], emission, source,
+             func_cb);
+     }
+   return edje_object_signal_callback_del(wd->clk, emission, source, func_cb);
+}
+
+static Eina_Bool
 _ticker(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -91,7 +134,7 @@ _ticker(void *data)
    struct timeval timev;
    struct tm *tm;
    time_t tt;
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    gettimeofday(&timev, NULL);
    t = ((double)(1000000 - timev.tv_usec)) / 1000000.0;
    wd->ticker = ecore_timer_add(t, _ticker, data);
@@ -108,16 +151,16 @@ _ticker(void *data)
             _time_update(data);
          }
      }
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
-static int
+static Eina_Bool
 _signal_clock_val_up(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return;
-   if (!wd->edit) return;
-   if (!wd->sel_obj) return;
+   if (!wd) goto clock_val_up_exit_on_error;
+   if (!wd->edit) goto clock_val_up_cancel;
+   if (!wd->sel_obj) goto clock_val_up_cancel;
    if (wd->sel_obj == wd->digit[0])
      {
        wd->hrs = wd->hrs + 10;
@@ -158,15 +201,19 @@ _signal_clock_val_up(void *data)
    _time_update(data);
    evas_object_smart_callback_call(data, "changed", NULL);
    return ECORE_CALLBACK_RENEW;
+clock_val_up_cancel:
+   wd->spin = NULL;
+clock_val_up_exit_on_error:
+   return ECORE_CALLBACK_CANCEL;
 }
 
-static int
+static Eina_Bool
 _signal_clock_val_down(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return;
-   if (!wd->edit) return;
-   if (!wd->sel_obj) return;
+   if (!wd) goto clock_val_down_exit_on_error;
+   if (!wd->edit) goto clock_val_down_cancel;
+   if (!wd->sel_obj) goto clock_val_down_cancel;
    if (wd->sel_obj == wd->digit[0])
      {
        wd->hrs = wd->hrs - 10;
@@ -207,6 +254,10 @@ _signal_clock_val_down(void *data)
    _time_update(data);
    evas_object_smart_callback_call(data, "changed", NULL);
    return ECORE_CALLBACK_RENEW;
+clock_val_down_cancel:
+   wd->spin = NULL;
+clock_val_down_exit_on_error:
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -214,7 +265,7 @@ _signal_clock_val_up_start(void *data, Evas_Object *obj, const char *emission __
 {
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->sel_obj = obj;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = ecore_timer_add(wd->interval, _signal_clock_val_up, data);
@@ -226,7 +277,7 @@ _signal_clock_val_down_start(void *data, Evas_Object *obj, const char *emission
 {
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->sel_obj = obj;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = ecore_timer_add(wd->interval, _signal_clock_val_down, data);
@@ -468,6 +519,9 @@ elm_clock_add(Evas_Object *parent)
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
+   elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
+   elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
+   elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
 
    wd->clk = edje_object_add(e);
    elm_widget_resize_object_set(obj, wd->clk);
@@ -477,6 +531,7 @@ elm_clock_add(Evas_Object *parent)
    wd->cur.am_pm = EINA_TRUE;
    wd->cur.edit = EINA_TRUE;
    wd->cur.digedit = ELM_CLOCK_NONE;
+   wd->first_interval = 0.85;
 
    _time_update(obj);
    _ticker(obj);
@@ -709,3 +764,45 @@ elm_clock_show_seconds_get(const Evas_Object *obj)
    if (!wd) return EINA_FALSE;
    return wd->seconds;
 }
+
+/**
+ * Set the interval for the clock
+ *
+ * @param obj The clock object
+ * @param interval The interval value in seconds
+ *
+ * The interval value is decreased while the user increments or decrements
+ * the clock value. The next interval value is the previous interval / 1.05,
+ * so it speed up a bit. Default value is 0.85 seconds.
+ *
+ * @ingroup Clock
+ */
+EAPI void
+elm_clock_interval_set(Evas_Object *obj, double interval)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   wd->first_interval = interval;
+}
+
+/**
+ * Get the interval of the clock
+ *
+ * @param obj The clock object
+ * @return The value of the first interval in seconds
+ *
+ * The interval value is decreased while the user increments or decrements
+ * the clock value. The next interval value is the previous interval / 1.05,
+ * so it speed up a bit. Default value is 0.85 seconds.
+ *
+ * @ingroup Clock
+ */
+EAPI double
+elm_clock_interval_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return 0.0;
+   return wd->first_interval;
+}
diff --git a/src/lib/elm_cnp_helper.c b/src/lib/elm_cnp_helper.c
new file mode 100644 (file)
index 0000000..d403887
--- /dev/null
@@ -0,0 +1,839 @@
+#include <stdbool.h>
+
+#include <stdio.h> // debug
+
+#include <Elementary.h>
+
+#include "elm_priv.h"
+
+#ifdef HAVE_ELEMENTARY_X
+
+# include <X11/X.h>
+# include <X11/Xatom.h>
+
+
+# define ARRAYINIT(foo)  [foo]=
+
+#define DEBUGON        0
+
+#if DEBUGON
+#define cnp_debug(x...) printf(__FILE__": " x)
+#else
+#define cnp_debug(x...)
+#endif
+
+
+enum {
+     CNP_ATOM_TARGETS = 0,
+     CNP_ATOM_text_uri,
+     CNP_ATOM_image_png,
+     CNP_ATOM_XELM,
+     CNP_ATOM_text_html_utf8,
+     CNP_ATOM_text_html,
+     CNP_ATOM_UTF8STRING,
+     CNP_ATOM_STRING,
+     CNP_ATOM_TEXT,
+     CNP_ATOM_text_plain_utf8,
+     CNP_ATOM_text_plain,
+
+     CNP_N_ATOMS,
+};
+struct pasteimage {
+     Evas_Object *entry;
+     const char *tag;
+     const char *file;
+     Evas_Object *img;
+};
+
+
+struct _elm_cnp_selection {
+   const char *debug;
+   Evas_Object *widget;
+
+   enum _elm_sel_format format;
+   char *selbuf;
+
+   unsigned int active : 1;
+
+   Ecore_X_Selection ecore_sel;
+
+   Evas_Object *requestwidget;
+   enum _elm_sel_format requestformat;
+
+   int (*set)(Ecore_X_Window, const void *data, int size);
+   int (*clear)(void);
+   void (*request)(Ecore_X_Window, const char *target);
+};
+
+/* Optimisation: Turn this into a 256 byte table:
+ *     then can lookup in one index, not N checks */
+static const struct escapes {
+   const char *escape;
+   const char value;
+} escapes[] = {
+   { "<br>",   '\n' },
+   { "<\t>",   '\t' },
+   { "gt;",    '>' },
+   { "lt;",    '<' },
+   { "amp;",'&' },
+   { "quot;",'\'' },
+   { "dquot;", '"' },
+};
+#define N_ESCAPES ((int)(sizeof(escapes)/sizeof(escapes[0])))
+
+
+static Eina_Bool _elm_cnp_init(void);
+static Eina_Bool selection_clear(void *udata __UNUSED__, int type, void *event);
+//static Eina_Bool selection_request(void *udata __UNUSED__, int type, void *event);
+static Eina_Bool selection_notify(void *udata __UNUSED__, int type, void *event);
+static char *remove_tags(const char *p, int *len);
+static char *mark_up(const char *start, int *lenp);
+
+static Evas_Object *image_provider(void *images, Evas_Object *entry, const char *item);
+
+
+typedef int (*converter_fn)(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+
+static int targets_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+static int text_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+static int html_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+static int edje_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+static int uri_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+static int png_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize);
+
+/* FIXME: Which way should this be: Notify or response */
+typedef int (*response_handler)(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *);
+static int response_handler_targets(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *);
+
+typedef int (*notify_handler)(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *);
+static int notify_handler_targets(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *notify);
+static int notify_handler_text(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *notify);
+static int notify_handler_png(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *notify);
+static int notify_handler_uri(struct _elm_cnp_selection *sel,
+      Ecore_X_Event_Selection_Notify *notify);
+
+
+static struct {
+   const char *name;
+   enum _elm_sel_format formats;
+   /* Called by ecore to do conversion */
+   converter_fn converter;
+   response_handler response;
+   notify_handler notify;
+   /* Atom */
+   Ecore_X_Atom atom;
+} atoms[CNP_N_ATOMS] = {
+   [CNP_ATOM_TARGETS] = {
+       "TARGETS",
+       (enum _elm_sel_format)-1,
+       targets_converter,
+       response_handler_targets,
+       notify_handler_targets,
+       0
+   },
+   [CNP_ATOM_XELM] =  {
+       "application/x-elementary-markup",
+       ELM_SEL_MARKUP,
+       edje_converter,
+       NULL,
+       NULL,
+       0
+   },
+   [CNP_ATOM_text_uri] = {
+       "text/uri",
+       ELM_SEL_MARKUP | ELM_SEL_IMAGE, /* Either images or entries */
+       uri_converter,
+       NULL,
+       notify_handler_uri,
+       0
+   },
+   [CNP_ATOM_image_png] = {
+       "image/png",
+       ELM_SEL_IMAGE | ELM_SEL_IMAGE,
+       png_converter,
+       NULL,
+       notify_handler_png,
+       0
+   },
+   [CNP_ATOM_text_html_utf8] = {
+       "text/html;charset=utf-8",
+       ELM_SEL_MARKUP,
+       html_converter,
+       NULL,
+       NULL,
+       0
+   },
+   [CNP_ATOM_text_html] = {
+       "text/html",
+       ELM_SEL_MARKUP,
+       html_converter,
+       NULL,
+       NULL,
+       0
+   },
+   [CNP_ATOM_UTF8STRING] = {
+       "UTF8_STRING",
+       ELM_SEL_MARKUP,
+       text_converter,
+       NULL,
+       notify_handler_text,
+       0
+   },
+   [CNP_ATOM_STRING] = {
+       "STRING",
+       ELM_SEL_MARKUP | ELM_SEL_IMAGE,
+       text_converter,
+       NULL,
+       notify_handler_text,
+       0
+   },
+   [CNP_ATOM_TEXT] = {
+       "TEXT",
+       ELM_SEL_MARKUP | ELM_SEL_IMAGE,
+       text_converter,
+       NULL,
+       NULL,
+       0
+   },
+   [CNP_ATOM_text_plain_utf8] = {
+       "text/plain;charset=ut-8",
+       ELM_SEL_MARKUP,
+       text_converter,
+       NULL,
+       NULL,
+       0
+   },
+   [CNP_ATOM_text_plain] = {
+       "text/plain",
+       ELM_SEL_MARKUP,
+       text_converter,
+       NULL,
+       NULL,
+       0
+   },
+};
+
+static struct _elm_cnp_selection selections[ELM_SEL_MAX] = {
+   ARRAYINIT(ELM_SEL_PRIMARY) {
+       .debug = "Primary",
+       .ecore_sel = ECORE_X_SELECTION_PRIMARY,
+       .set = ecore_x_selection_primary_set,
+       .clear = ecore_x_selection_primary_clear,
+       .request = ecore_x_selection_primary_request,
+   },
+   ARRAYINIT(ELM_SEL_SECONDARY) {
+       .debug = "Secondary",
+       .ecore_sel = ECORE_X_SELECTION_SECONDARY,
+       .set = ecore_x_selection_secondary_set,
+       .clear = ecore_x_selection_secondary_clear,
+       .request = ecore_x_selection_secondary_request,
+   },
+   ARRAYINIT(ELM_SEL_CLIPBOARD) {
+       .debug = "Clipboard",
+       .ecore_sel = ECORE_X_SELECTION_CLIPBOARD,
+       .set = ecore_x_selection_clipboard_set,
+       .clear = ecore_x_selection_clipboard_clear,
+       .request = ecore_x_selection_clipboard_request,
+   }
+};
+
+static int _elm_cnp_init_count = 0;
+  /* Gah... who left this out of XAtoms.h */
+static Ecore_X_Atom clipboard_atom;
+
+Eina_List *pastedimages;
+#endif
+
+
+Eina_Bool
+elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget,
+                       enum _elm_sel_format format, const char *selbuf)
+{
+#ifdef HAVE_ELEMENTARY_X
+   struct _elm_cnp_selection *sel;
+
+   if ((unsigned int)selection >= (unsigned int)ELM_SEL_MAX) return EINA_FALSE;
+   if (!_elm_cnp_init_count) _elm_cnp_init();
+   if (!selbuf && format != ELM_SEL_IMAGE)
+     return elm_selection_clear(selection, widget);
+
+   sel = selections + selection;
+
+   sel->active = 1;
+   sel->widget = widget;
+
+   sel->set(elm_win_xwindow_get(widget),&selection,sizeof(enum _elm_sel_type));
+   sel->format = format;
+   sel->selbuf = selbuf ? strdup(selbuf) : NULL;
+
+   return EINA_TRUE;
+#else
+   return EINA_FALSE;
+#endif
+}
+
+Eina_Bool
+elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget)
+{
+#ifdef HAVE_ELEMENTARY_X
+   struct _elm_cnp_selection *sel;
+
+   if ((unsigned int)selection >= (unsigned int)ELM_SEL_MAX) return EINA_FALSE;
+   if (!_elm_cnp_init_count) _elm_cnp_init();
+
+   sel = selections + selection;
+
+   /* No longer this selection: Consider it gone! */
+   if (!sel->active || sel->widget != widget) return EINA_TRUE;
+
+   sel->active = 0;
+   sel->widget = NULL;
+   sel->clear();
+
+   return EINA_TRUE;
+#else
+   return EINA_FALSE;
+#endif
+}
+
+Eina_Bool
+elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format,
+                       Evas_Object *widget)
+{
+#ifdef HAVE_ELEMENTARY_X
+   Evas_Object *top;
+   struct _elm_cnp_selection *sel;
+
+   if ((unsigned int)selection >= (unsigned int)ELM_SEL_MAX) return EINA_FALSE;
+   if (!_elm_cnp_init_count) _elm_cnp_init();
+
+   sel = selections + selection;
+   top = elm_widget_top_get(widget);
+   if (!top) return EINA_FALSE;
+
+   sel->requestformat = format;
+   sel->requestwidget = widget;
+   sel->request(elm_win_xwindow_get(top), ECORE_X_SELECTION_TARGET_UTF8_STRING);
+
+   return EINA_TRUE;
+#else
+   return EINA_FALSE;
+#endif
+}
+
+#ifdef HAVE_ELEMENTARY_X
+
+static Eina_Bool
+_elm_cnp_init(void){
+   int i;
+   if (_elm_cnp_init_count ++) return EINA_TRUE;
+
+   /* FIXME: Handle XCB */
+   for (i = 0 ; i < CNP_N_ATOMS ; i ++)
+     {
+       atoms[i].atom = ecore_x_atom_get(atoms[i].name);
+       ecore_x_selection_converter_atom_add(atoms[i].atom,
+             atoms[i].converter);
+     }
+   clipboard_atom = ecore_x_atom_get("CLIPBOARD");
+
+   ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR, selection_clear,NULL);
+   ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,selection_notify,NULL);
+    return EINA_TRUE;
+}
+
+static Eina_Bool
+selection_clear(void *udata __UNUSED__, int type __UNUSED__, void *event){
+   Ecore_X_Event_Selection_Clear *ev = event;
+   struct _elm_cnp_selection *sel;
+   int i;
+
+   for (i = 0 ; i < ELM_SEL_MAX ; i ++)
+     {
+       if (selections[i].ecore_sel == ev->selection) break;
+     }
+   /* Not me... Don't care */
+   if (i == ELM_SEL_MAX) return ECORE_CALLBACK_PASS_ON;
+
+   sel = selections + i;
+   sel->active = 0;
+   sel->widget = NULL;
+   sel->selbuf = NULL;
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+#if 0
+/**
+ * Response to a selection request
+ */
+static Eina_Bool
+selection_request(void *udata __UNUSED__, int type, void *event){
+   Ecore_X_Event_Selection_Request *ev = event;
+   struct _elm_cnp_selection *sel;
+   int i;
+printf("selection request callback: %d\n",ev->selection);
+printf("selection request callback: %d\n",ev->target);
+
+   if (ev->selection == clipboard_atom){
+        sel = selections + ELM_SEL_CLIPBOARD;
+   } else if (ev->selection == XA_PRIMARY){
+        sel = selections + ELM_SEL_PRIMARY;
+   } else if (ev->selection ==  XA_SECONDARY){
+        sel = selections + ELM_SEL_SECONDARY;
+   } else {
+        return ECORE_CALLBACK_PASS_ON;
+   }
+   return ECORE_CALLBACK_PASS_ON;
+
+   for (i = 0 ; i < CNP_N_ATOMS ; i ++)
+     {
+       if (ev->target == atoms[i].atom)
+         {
+            if (atoms[i].response){
+                 atoms[i].response(sel, ev);
+            } else {
+                 printf("Ignored: No handler!\n");
+            }
+         }
+     }
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+#endif
+
+
+/*
+ * Response to a selection notify:
+ *     - So we have asked for the selection list.
+ *     - If it's the targets list, parse it, and fire of what we want,
+ *     else it's the data we want.
+ */
+static Eina_Bool
+selection_notify(void *udata __UNUSED__, int type __UNUSED__, void *event){
+   Ecore_X_Event_Selection_Notify *ev = event;
+   struct _elm_cnp_selection *sel;
+   int i;
+
+   cnp_debug("selection notify callback: %d\n",ev->selection);
+   switch (ev->selection){
+      case ECORE_X_SELECTION_CLIPBOARD:
+        sel = selections + ELM_SEL_CLIPBOARD;
+        break;
+
+      case ECORE_X_SELECTION_PRIMARY:
+        sel = selections + ELM_SEL_PRIMARY;
+        break;
+      case ECORE_X_SELECTION_SECONDARY:
+        sel = selections + ELM_SEL_SECONDARY;
+        break;
+      default:
+        return ECORE_CALLBACK_PASS_ON;
+   }
+   cnp_debug("Target is %s\n",ev->target);
+
+   for (i = 0 ; i < CNP_N_ATOMS ; i ++)
+     {
+       if (strcmp(ev->target, atoms[i].name) == 0)
+         {
+            if (atoms[i].notify){
+                 cnp_debug("Found something: %s\n", atoms[i].name);
+                 atoms[i].notify(sel, ev);
+            } else {
+                 printf("Ignored: No handler!\n");
+            }
+         }
+     }
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+
+
+static int
+targets_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
+                  void **data_ret, int *size_ret,
+                  Ecore_X_Atom *ttype, int *typesize){
+   int i,count;
+   Ecore_X_Atom *aret;
+   struct _elm_cnp_selection *sel;
+
+   if (!data_ret) return -1;
+
+   sel = selections + *(int*)data;
+
+   for (i = 0, count = 0 ; i < CNP_N_ATOMS ; i ++)
+       if (sel->format & atoms[i].formats)
+          count ++;
+
+   aret = malloc(sizeof(Ecore_X_Atom) * count);
+   for (i = 0, count = 0 ; i < CNP_N_ATOMS ; i ++)
+       if (sel->format & atoms[i].formats)
+         aret[count ++] = atoms[i].atom;
+
+   *data_ret = aret;
+   if (typesize) *typesize = 32 /* urk */;
+   if (ttype) *ttype = XA_ATOM;
+   if (size_ret) *size_ret = count;
+
+   return 1;
+}
+
+static int
+png_converter(char *target __UNUSED__, void *data __UNUSED__, int size __UNUSED__,
+              void **data_ret __UNUSED__, int *size_ret __UNUSED__,
+              Ecore_X_Atom *ttype __UNUSED__, int *typesize __UNUSED__)
+{
+     return 1;
+}
+
+/*
+ * Callback to handle a targets response on a selection request:
+ * So pick the format we'd like; and then request it.
+ */
+static int
+notify_handler_targets(struct _elm_cnp_selection *sel,
+                       Ecore_X_Event_Selection_Notify *notify)
+{
+   Ecore_X_Selection_Data_Targets *targets;
+   Ecore_X_Atom *atomlist;
+   int i,j;
+
+   targets = notify->data;
+   atomlist = (Ecore_X_Atom *)(targets->data.data);
+
+   for (j = 1; j < CNP_N_ATOMS ; j ++)
+     {
+       cnp_debug("\t%s %d\n",atoms[j].name, atoms[j].atom);
+       if (!(atoms[j].formats & sel->requestformat)) continue;
+       for (i = 0 ; i < targets->data.length ; i ++)
+         {
+            if (atoms[j].atom == atomlist[i])
+              {
+                 cnp_debug("Atom %s matches\n",atoms[j].name);
+                 goto done;
+              }
+         }
+     }
+
+   cnp_debug("Couldn't find anything that matches\n");
+   return ECORE_CALLBACK_PASS_ON;
+
+   done:
+   cnp_debug("Sending request for %s\n",atoms[j].name);
+   sel->request(elm_win_xwindow_get(sel->requestwidget), atoms[j].name);
+
+   return ECORE_CALLBACK_PASS_ON;
+}
+
+static int
+response_handler_targets(struct _elm_cnp_selection *sel,
+                         Ecore_X_Event_Selection_Notify *notify)
+{
+   Ecore_X_Selection_Data_Targets *targets;
+   Ecore_X_Atom *atomlist;
+   Evas_Object *top;
+   int i,j;
+   int prio, selected;
+
+   targets = notify->data;
+   atomlist = (Ecore_X_Atom *)(targets->data.data);
+
+   prio = -1;
+   selected = -1;
+   /* Start from 1: Skip targets */
+   for (j = 1 ; j < CNP_N_ATOMS ; j ++)
+     {
+       if (!(atoms[j].formats & sel->requestformat)) continue;
+       for (i = 0 ; i < targets->data.length ; i ++)
+         {
+            if (atoms[j].atom == atomlist[i] && atoms[j].response){
+                 /* Found a match: Use it */
+                 goto found;
+            }
+       }
+     }
+       found:
+   if (j == CNP_N_ATOMS)
+     {
+       cnp_debug("No matching type found\n");
+       return 0;
+     }
+
+   top = elm_widget_top_get(sel->requestwidget);
+   if (!top) return 0;
+
+   sel->request(elm_win_xwindow_get(top), atoms[j].name);
+   return 0;
+}
+
+
+static int
+notify_handler_text(struct _elm_cnp_selection *sel,
+                    Ecore_X_Event_Selection_Notify *notify)
+{
+   Ecore_X_Selection_Data *data;
+   char *str;
+
+   data = notify->data;
+   str = mark_up((char*)data->data, NULL);
+   elm_entry_entry_insert(sel->requestwidget, str);
+   free(str);
+
+   return 0;
+}
+
+
+/**
+ * So someone is pasting an image into my entry or widget...
+ */
+static int
+notify_handler_uri(struct _elm_cnp_selection *sel,
+        Ecore_X_Event_Selection_Notify *notify)
+{
+   Ecore_X_Selection_Data *data;
+   struct pasteimage *pi;
+   char entrytag[100];
+   char *p;
+
+   data = notify->data;
+   p = (char *)data->data;
+   cnp_debug("Got %s\n",p);
+   if (strncmp(p,"file://",7) != 0){
+       cnp_debug("Doesn't start with ;file;  %s\n",p);
+       return 0;
+   }
+
+   p += strlen("file://");
+
+   pi = calloc(1,sizeof(struct pasteimage));
+   snprintf(entrytag, sizeof(entrytag), "pasteimage-%p",pi);
+   pi->tag = strdup(entrytag);
+   pi->file = strndup(p,data->length - strlen("file://"));
+
+   elm_entry_item_provider_append(sel->requestwidget, image_provider, pi);
+   pastedimages = eina_list_append(pastedimages, pi);
+
+   snprintf(entrytag, sizeof(entrytag), "<item absize=240x180 href=%s>",pi->tag);
+   elm_entry_entry_insert(sel->requestwidget, entrytag);
+
+   return 0;
+}
+
+static int
+notify_handler_png(struct _elm_cnp_selection *sel __UNUSED__,
+                   Ecore_X_Event_Selection_Notify *notify __UNUSED__)
+{
+   cnp_debug("got a png!\n");
+   return 0;
+}
+
+
+static int
+text_converter(char *target __UNUSED__, void *data, int size __UNUSED__,
+               void **data_ret, int *size_ret,
+               Ecore_X_Atom *ttype __UNUSED__, int *typesize __UNUSED__)
+{
+   struct _elm_cnp_selection *sel;
+
+   sel = selections + *(int *)data;
+   if (!sel->active)
+     {
+       return 1;
+     }
+
+   if (sel->format == ELM_SEL_MARKUP){
+       *data_ret = remove_tags(sel->selbuf, size_ret);
+   } else if (sel->format == ELM_SEL_IMAGE){
+       cnp_debug("Image %s\n",evas_object_type_get(sel->widget));
+       cnp_debug("Elm type: %s\n",elm_object_widget_type_get(sel->widget));
+       evas_object_image_file_get(elm_photocam_internal_image_get(sel->widget), (const char **)data_ret, NULL);
+       if (!*data_ret) *data_ret = strdup("No file");
+       else *data_ret = strdup(*data_ret);
+       *size_ret = strlen(*data_ret);
+   }
+   return 1;
+}
+
+static int
+edje_converter(char *target __UNUSED__, void *data, int size __UNUSED__, 
+               void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__, 
+               int *typesize __UNUSED__)
+{
+   struct _elm_cnp_selection *sel;
+
+   sel = selections + *(int *)data;
+   if (data_ret) *data_ret = strdup(sel->selbuf);
+   if (size_ret) *size_ret = strlen(sel->selbuf);
+
+   return 1;
+}
+
+
+static int
+html_converter(char *target __UNUSED__, void *data, int size __UNUSED__, 
+               void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__, 
+               int *typesize __UNUSED__)
+{
+   struct _elm_cnp_selection *sel;
+
+   sel = selections + *(int *)data;
+   if (data_ret) *data_ret = strdup(sel->selbuf);
+   if (size_ret) *size_ret = strlen(sel->selbuf);
+
+   return 1;
+}
+
+static int
+uri_converter(char *target __UNUSED__, void *data, int size __UNUSED__, 
+              void **data_ret, int *size_ret, Ecore_X_Atom *ttype __UNUSED__, 
+              int *typesize __UNUSED__)
+{
+    struct _elm_cnp_selection *sel;
+    sel = selections + *(int *)data;
+    cnp_debug("Uri converter\n");
+    if (data_ret) *data_ret = strdup(sel->selbuf);
+    if (size_ret) *size_ret = strlen(sel->selbuf);
+    return 1;
+}
+
+
+/*
+ * Image paste provide
+ */
+
+/* FIXME: Should add provider for each pated item: Use data to store it
+ * much easier */
+static Evas_Object *
+image_provider(void *images __UNUSED__, Evas_Object *entry, const char *item)
+{
+   struct pasteimage *pi;
+   Eina_List *l;
+
+   cnp_debug("image provider for %s called\n",item);
+   EINA_LIST_FOREACH(pastedimages, l, pi)
+     {
+       cnp_debug("is it %s?\n",pi->tag);
+       if (strcmp(pi->tag,item) == 0){
+            /* Found it */
+            Evas_Object *o;
+            o = evas_object_image_filled_add(evas_object_evas_get(entry));
+            /* FIXME: Handle eets */
+            cnp_debug("file is %s (object is %p)\n",pi->file,o);
+            evas_object_image_file_set(o, pi->file, NULL);
+            evas_object_show(o);
+            return o;
+       }
+     }
+   return NULL;
+}
+
+static void
+entry_deleted(void *images __UNUSED__, Evas *e __UNUSED__, Evas_Object *entry, void *unused __UNUSED__)
+{
+   struct pasteimage *pi;
+   Eina_List *l,*next;
+
+   EINA_LIST_FOREACH_SAFE(pastedimages, l, next, pi)
+     {
+       if (pi->entry == entry){
+            pastedimages = eina_list_remove_list(pastedimages, l);
+       }
+     }
+}
+
+
+static char *
+remove_tags(const char *p, int *len){
+   char *q,*ret;
+   int i;
+   if (!p) return NULL;
+
+   q = malloc(strlen(p) + 1);
+   if (!q) return NULL;
+   ret = q;
+
+   while (*p)
+     {
+       if (*p != '<' && *p != '&'){
+            *q ++ = *p ++;
+       } else if (*p == '<') {
+            if (p[1] == 'b' && p[2] == 'r' &&
+                       (p[3] == ' ' || p[3] == '/' || p[3] == '>'))
+               *q++ = '\n';
+            while (*p && *p != '>') p ++;
+            p ++;
+       } else if (*p == '&') {
+            p ++;
+            for (i = 0 ; i < N_ESCAPES ; i ++){
+                 if (!strncmp(p,escapes[i].escape, strlen(escapes[i].escape))){
+                      p += strlen(escapes[i].escape);
+                      *q = escapes[i].value;
+                      q ++;
+                      break;
+                 }
+            }
+            if (i == N_ESCAPES)
+              *q ++ = '&';
+       }
+     }
+   *q = 0;
+   if (len) *len = q - ret;
+   return ret;
+}
+
+/* Mark up */
+static char *
+mark_up(const char *start, int *lenp){
+  int l,i;
+  const char *p;
+  char *q,*ret;
+
+  if (!start) return NULL;
+  /* First pass: Count characters */
+  for (l = 0, p = start ; *p ; p ++)
+    {
+    for (i = 0 ; i < N_ESCAPES ; i ++)
+      {
+        if (*p == escapes[i].value)
+          {
+             l += strlen(escapes[i].escape);
+             break;
+          }
+      }
+    if (i == N_ESCAPES)
+        l ++;
+  }
+
+  q = ret = malloc(l + 1);
+
+  /* Second pass: Change characters */
+  for (p = start ; *p ; )
+    {
+    for (i = 0 ; i < N_ESCAPES ; i ++)
+      {
+        if (*p == escapes[i].value)
+          {
+             strcpy(q, escapes[i].escape);
+             q += strlen(escapes[i].escape);
+             p ++;
+             break;
+          }
+      }
+    if (i == N_ESCAPES)
+        *q ++ = *p ++;
+  }
+  *q = 0;
+
+  if (lenp) *lenp = l;
+  return ret;
+}
+
+
+#endif
index 44b36be..a8315e3 100644 (file)
@@ -43,7 +43,7 @@ static const char *_atom_names[ATOM_COUNT] =
 #define ATOM_E_CONFIG 4
 
 static Eina_Bool _prop_config_get(void);
-static int _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev);
+static Eina_Bool _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev);
 
 static Eina_Bool
 _prop_config_get(void)
@@ -51,8 +51,9 @@ _prop_config_get(void)
    int size = 0;
    Ecore_X_Atom atom;
    char buf[512];
-   unsigned char *data = NULL, *config_data;
-   
+   unsigned char *data = NULL;
+   Elm_Config *config_data;
+
    snprintf(buf, sizeof(buf), "ENLIGHTENMENT_CONFIG_%s", _elm_profile);
    atom = ecore_x_atom_get(buf);
    _atom_config = atom;
@@ -85,7 +86,7 @@ _prop_config_get(void)
    return EINA_TRUE;
 }
 
-static int
+static Eina_Bool
 _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
 {
    Ecore_X_Event_Window_Property *event = ev;
@@ -171,7 +172,7 @@ _prop_change(void *data __UNUSED__, int ev_type __UNUSED__, void *ev)
              _prop_config_get();
           }
      }
-   return 1;
+   return ECORE_CALLBACK_PASS_ON;
 }
 #endif
 
index 85bceb9..9d26116 100644 (file)
@@ -29,7 +29,7 @@ static const char *widtype = NULL;
 static void _del_hook(Evas_Object *obj);
 static void _theme_hook(Evas_Object *obj);
 static void _sizing_eval(Evas_Object *obj);
-static int _prop_change(void *data, int type, void *event);
+static Eina_Bool _prop_change(void *data, int type, void *event);
 
 /* local functions */
 static void 
@@ -139,13 +139,13 @@ _autoscroll_mode_disable(Evas_Object *obj)
 }
 */
 
-static int 
+static Eina_Bool
 _prop_change(void *data, int type __UNUSED__, void *event) 
 {
 #ifdef HAVE_ELEMENTARY_X
    Ecore_X_Event_Window_Property *ev;
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 1;
+   if (!wd) return ECORE_CALLBACK_PASS_ON;
    ev = event;
    if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE) 
      {
@@ -197,7 +197,7 @@ _prop_change(void *data, int type __UNUSED__, void *event)
      }
 #endif
 
-   return 1;
+   return ECORE_CALLBACK_PASS_ON;
 }
 
 /**
@@ -268,28 +268,56 @@ elm_conformant_add(Evas_Object *parent)
 
 /**
  * Set the content of the conformant widget
- * 
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_conformat_content_unset() function.
+ *
  * @param obj The conformant object
- * @param content The content that will be used inside this conformant object
- * 
+ * @return The content that was being used
+ *
  * @ingroup Conformant
  */
-EAPI void 
-elm_conformant_content_set(Evas_Object *obj, Evas_Object *content) 
+EAPI void
+elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->content != content) && (wd->content))
-     elm_widget_sub_object_del(obj, wd->content);
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
-   if (content) 
+   if (content)
      {
-        elm_widget_sub_object_add(obj, content);
-        evas_object_event_callback_add(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
-        edje_object_part_swallow(wd->base, "elm.swallow.content", content);
-        _sizing_eval(obj);
+       elm_widget_sub_object_add(obj, content);
+       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                      _changed_size_hints, obj);
+       edje_object_part_swallow(wd->base, "elm.swallow.content", content);
      }
+   _sizing_eval(obj);
+}
+
+/**
+ * Unset the content of the conformant widget
+ *
+ * Unparent and return the content object which was set for this widget;
+ *
+ * @param obj The conformant object
+ * @return The content that was being used
+ *
+ * @ingroup Conformant
+ */
+EAPI Evas_Object *
+elm_conformant_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->base, wd->content);
+   wd->content = NULL;
+   return content;
 }
index 063cbb7..22f2b09 100644 (file)
@@ -99,6 +99,7 @@ struct _Widget_Data
    Ecore_Event_Handler *sel_notify_handler;
    Ecore_Event_Handler *sel_clear_handler;
    Ecore_Timer *longpress_timer;
+   /* Only for clipboard */
    const char *cut_sel;
    const char *text;
    Evas_Coord lastw;
@@ -106,6 +107,7 @@ struct _Widget_Data
    Evas_Coord cx, cy, cw, ch;
    Eina_List *items;
    Eina_List *item_providers;
+   Ecore_Job *hovdeljob;
    Mod_Api *api; // module api if supplied
    Eina_Bool changed : 1;
    Eina_Bool linewrap : 1;
@@ -226,6 +228,7 @@ _del_hook(Evas_Object *obj)
    Elm_Entry_Context_Menu_Item *it;
    Elm_Entry_Item_Provider *ip;
 
+   if (wd->hovdeljob) ecore_job_del(wd->hovdeljob);
    if ((wd->api) && (wd->api->obj_unhook)) wd->api->obj_unhook(obj); // module - unhook
 
    entries = eina_list_remove(entries, obj);
@@ -356,6 +359,14 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
 }
 
 static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_signal_emit(wd->ent, emission, source);
+}
+
+static void
 _hoversel_position(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -402,10 +413,24 @@ _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event
 }
 
 static void
-_dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+_hover_del(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
+   
+   if (wd->hoversel)
+     {
+        evas_object_del(wd->hoversel);
+        wd->hoversel = NULL;
+     }
+   wd->hovdeljob = NULL;
+}
+
+static void
+_dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Widget_Data *wd = elm_widget_data_get(data);
+   if (!wd) return; 
    if (wd->hoversel) evas_object_hide(wd->hoversel);
    if (wd->selmode)
      {
@@ -413,6 +438,8 @@ _dismissed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
           edje_object_part_text_select_allow_set(wd->ent, "elm.text", 1);
      }
    elm_widget_scroll_freeze_pop(data);
+   if (wd->hovdeljob) ecore_job_del(wd->hovdeljob);
+   wd->hovdeljob = ecore_job_add(_hover_del, data);
 }
 
 static void
@@ -437,29 +464,23 @@ _paste(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    if (wd->sel_notify_handler)
      {
 #ifdef HAVE_ELEMENTARY_X
-       Evas_Object *top;
-
-       top = elm_widget_top_get(data);
-       if ((top) && (elm_win_xwindow_get(top)))
-         {
-            ecore_x_selection_primary_request
-              (elm_win_xwindow_get(top),
-               ECORE_X_SELECTION_TARGET_UTF8_STRING);
-            wd->selection_asked = EINA_TRUE;
-         }
+        wd->selection_asked = EINA_TRUE;
+       elm_selection_get(ELM_SEL_CLIPBOARD, ELM_SEL_MARKUP, data);
 #endif
      }
 }
 
 static void
-_store_selection(Evas_Object *obj)
+_store_selection(enum _elm_sel_type seltype, Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    const char *sel;
 
    if (!wd) return;
    sel = edje_object_part_text_selection_get(wd->ent, "elm.text");
-   eina_stringshare_replace(&wd->cut_sel, sel);
+   elm_selection_set(seltype, obj, ELM_SEL_MARKUP, sel);
+   if (seltype == ELM_SEL_CLIPBOARD)
+          eina_stringshare_replace(&wd->cut_sel, sel);
 }
 
 static void
@@ -467,11 +488,12 @@ _cut(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Widget_Data *wd = elm_widget_data_get(data);
 
+   /* Store it */
    wd->selmode = EINA_FALSE;
    edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
    edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
    elm_widget_scroll_hold_pop(data);
-   _store_selection(data);
+   _store_selection(ELM_SEL_CLIPBOARD, data);
    edje_object_part_text_insert(wd->ent, "elm.text", "");
    edje_object_part_text_select_none(wd->ent, "elm.text");
 }
@@ -485,8 +507,8 @@ _copy(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
    edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
    elm_widget_scroll_hold_pop(data);
-   _store_selection(data);
-   edje_object_part_text_select_none(wd->ent, "elm.text");
+   _store_selection(ELM_SEL_CLIPBOARD, data);
+//   edje_object_part_text_select_none(wd->ent, "elm.text");
 }
 
 static void
@@ -509,14 +531,14 @@ _item_clicked(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED
    if (it->func) it->func(it->data, obj2, NULL);
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    Evas_Object *top;
    const Eina_List *l;
    const Elm_Entry_Context_Menu_Item *it;
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    if ((wd->api) && (wd->api->obj_longpress))
      {
         wd->api->obj_longpress(data);
@@ -583,7 +605,7 @@ _long_press(void *data)
      }
    wd->longpress_timer = NULL;
    evas_object_smart_callback_call(data, SIG_LONGPRESSED, NULL);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -724,6 +746,10 @@ _str_append(char *str, const char *txt, int *len, int *alloc)
    return str;
 }
 
+/*FIXME: Sholud be implemented somewhere else, it really depends on the context
+ * because some markups can be implemented otherwise according to style.
+ * probably doing it in textblock and making it translate according to it's
+ * style is correct. */
 static char *
 _mkup_to_text(const char *mkup)
 {
@@ -761,6 +787,8 @@ _mkup_to_text(const char *mkup)
                         str = _str_append(str, "\t", &str_len, &str_alloc);
                       else if (!strcmp(ttag, "\\t"))
                         str = _str_append(str, "\t", &str_len, &str_alloc);
+                      else if (!strcmp(ttag, "ps")) /* Unicode paragraph separator */
+                        str = _str_append(str, "\xE2\x80\xA9", &str_len, &str_alloc);
                       free(ttag);
                    }
                  tag_start = tag_end = NULL;
@@ -848,6 +876,7 @@ _mkup_to_text(const char *mkup)
    return str;
 }
 
+
 static char *
 _text_to_mkup(const char *text)
 {
@@ -908,23 +937,17 @@ _signal_selection_start(void *data, Evas_Object *obj __UNUSED__, const char *emi
      }
    wd->have_selection = EINA_TRUE;
    evas_object_smart_callback_call(data, SIG_SELECTION_START, NULL);
+#ifdef HAVE_ELEMENTARY_X
    if (wd->sel_notify_handler)
      {
-       char *txt = _mkup_to_text(elm_entry_selection_get(data));
-
-       if (txt)
-         {
-#ifdef HAVE_ELEMENTARY_X
-            Evas_Object *top;
+       const char *txt = elm_entry_selection_get(data);
+       Evas_Object *top;
 
-            top = elm_widget_top_get(data);
-            if ((top) && (elm_win_xwindow_get(top)))
-              ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt,
-                                             strlen(txt));
-#endif
-            free(txt);
-         }
+       top = elm_widget_top_get(data);
+       if ((top) && (elm_win_xwindow_get(top)))
+            elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP, txt);
      }
+#endif
 }
 
 static void
@@ -934,23 +957,8 @@ _signal_selection_changed(void *data, Evas_Object *obj __UNUSED__, const char *e
    if (!wd) return;
    wd->have_selection = EINA_TRUE;
    evas_object_smart_callback_call(data, SIG_SELECTION_CHANGED, NULL);
-   if (wd->sel_notify_handler)
-     {
-       char *txt = _mkup_to_text(elm_entry_selection_get(data));
-
-       if (txt)
-         {
-#ifdef HAVE_ELEMENTARY_X
-            Evas_Object *top;
-
-            top = elm_widget_top_get(data);
-            if ((top) && (elm_win_xwindow_get(top)))
-              ecore_x_selection_primary_set(elm_win_xwindow_get(top), txt,
-                                             strlen(txt));
-#endif
-            free(txt);
-         }
-     }
+   elm_selection_set(ELM_SEL_PRIMARY, obj, ELM_SEL_MARKUP,
+                  elm_entry_selection_get(data));
 }
 
 static void
@@ -970,17 +978,8 @@ _signal_selection_cleared(void *data, Evas_Object *obj __UNUSED__, const char *e
 
             top = elm_widget_top_get(data);
             if ((top) && (elm_win_xwindow_get(top)))
-              {
-                 char *t;
-
-                 t = _mkup_to_text(wd->cut_sel);
-                 if (t)
-                   {
-                      ecore_x_selection_primary_set(elm_win_xwindow_get(top),
-                                                     t, strlen(t));
-                      free(t);
-                   }
-              }
+                elm_selection_set(ELM_SEL_PRIMARY, data, ELM_SEL_MARKUP,
+                                      wd->cut_sel);
 #endif
             eina_stringshare_del(wd->cut_sel);
             wd->cut_sel = NULL;
@@ -992,7 +991,7 @@ _signal_selection_cleared(void *data, Evas_Object *obj __UNUSED__, const char *e
 
             top = elm_widget_top_get(data);
             if ((top) && (elm_win_xwindow_get(top)))
-              ecore_x_selection_primary_clear();
+               elm_selection_clear(ELM_SEL_PRIMARY, data);
 #endif
          }
      }
@@ -1012,9 +1011,8 @@ _signal_entry_paste_request(void *data, Evas_Object *obj __UNUSED__, const char
        top = elm_widget_top_get(data);
        if ((top) && (elm_win_xwindow_get(top)))
          {
-            ecore_x_selection_primary_request(elm_win_xwindow_get(top),
-                                               ECORE_X_SELECTION_TARGET_UTF8_STRING);
-            wd->selection_asked = EINA_TRUE;
+             wd->selection_asked = EINA_TRUE;
+             elm_selection_get(ELM_SEL_CLIPBOARD, ELM_SEL_MARKUP, data);
          }
 #endif
      }
@@ -1026,18 +1024,18 @@ _signal_entry_copy_notify(void *data, Evas_Object *obj __UNUSED__, const char *e
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
    evas_object_smart_callback_call(data, SIG_SELECTION_COPY, NULL);
+   elm_selection_set(ELM_SEL_CLIPBOARD, obj, ELM_SEL_MARKUP,
+                       elm_entry_selection_get(data));
 }
 
 static void
 _signal_entry_cut_notify(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   char *txt;
    if (!wd) return;
    evas_object_smart_callback_call(data, SIG_SELECTION_CUT, NULL);
-   txt = _mkup_to_text(elm_entry_selection_get(data));
-   eina_stringshare_replace(&wd->cut_sel, txt);
-   if (txt) free(txt);
+   elm_selection_set(ELM_SEL_CLIPBOARD, obj, ELM_SEL_MARKUP,
+                       elm_entry_selection_get(data));
    edje_object_part_text_insert(wd->ent, "elm.text", "");
    wd->changed = EINA_TRUE;
    _sizing_eval(data);
@@ -1179,13 +1177,14 @@ _signal_mouse_double(void *data, Evas_Object *obj __UNUSED__, const char *emissi
 }
 
 #ifdef HAVE_ELEMENTARY_X
-static int
+static Eina_Bool
 _event_selection_notify(void *data, int type __UNUSED__, void *event)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    Ecore_X_Event_Selection_Notify *ev = event;
-   if (!wd) return 1;
-   if (!wd->selection_asked) return 1;
+   if (!wd) return ECORE_CALLBACK_PASS_ON;
+   if (!wd->selection_asked) return ECORE_CALLBACK_PASS_ON;
+
    if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
        (ev->selection == ECORE_X_SELECTION_PRIMARY))
      {
@@ -1207,12 +1206,13 @@ _event_selection_notify(void *data, int type __UNUSED__, void *event)
          }
        wd->selection_asked = EINA_FALSE;
      }
-   return 1;
+   return ECORE_CALLBACK_PASS_ON;
 }
 
-static int
-_event_selection_clear(void *data, int type __UNUSED__, void *event)
+static Eina_Bool
+_event_selection_clear(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
 {
+/*
    Widget_Data *wd = elm_widget_data_get(data);
    Ecore_X_Event_Selection_Clear *ev = event;
    if (!wd) return 1;
@@ -1222,12 +1222,13 @@ _event_selection_clear(void *data, int type __UNUSED__, void *event)
      {
        elm_entry_select_none(data);
      }
-   return 1;
+   return 1;*/
+   return ECORE_CALLBACK_PASS_ON;
 }
 #endif
 
 static Evas_Object *
-_get_item(void *data, Evas_Object *edje, const char *part, const char *item)
+_get_item(void *data, Evas_Object *edje __UNUSED__, const char *part __UNUSED__, const char *item)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    Evas_Object *o;
@@ -1274,6 +1275,7 @@ elm_entry_add(Evas_Object *parent)
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
    elm_widget_disable_hook_set(obj, _disable_hook);
+   elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
    elm_widget_can_focus_set(obj, 1);
 
    wd->linewrap     = EINA_TRUE;
index 0bca0b3..9c744c1 100644 (file)
@@ -114,7 +114,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
      }
 }
 
-static int
+static Eina_Bool
 _flip(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -124,11 +124,11 @@ _flip(Evas_Object *obj)
    Evas_Map *mf, *mb;
    Evas_Coord cx, cy, px, py, foc;
    int lx, ly, lz, lr, lg, lb, lar, lag, lab;
-   if (!wd->animator) return 0;
+   if (!wd->animator) return ECORE_CALLBACK_CANCEL;
    t = t / wd->len;
    if (t > 1.0) t = 1.0;
 
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    evas_object_geometry_get(obj, &x, &y, &w, &h);
 
    mf = evas_map_new(4);
@@ -192,6 +192,37 @@ _flip(Evas_Object *obj)
         evas_map_util_3d_rotate(mf, 0.0, deg, deg, cx, cy, 0);
         evas_map_util_3d_rotate(mb, 0.0, deg + 180.0, deg + 180.0, cx, cy, 0);
         break;
+     case ELM_FLIP_CUBE_LEFT:
+        p = 1.0 - t;
+        p = 1.0 - (p * p);
+        deg = -90.0 * p;
+        if (wd->state)
+          {
+            evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
+            evas_map_util_3d_rotate(mb, 0.0, deg + 90, 0.0, cx, cy, w / 2);
+          }
+        else
+          {
+            evas_map_util_3d_rotate(mf, 0.0, deg + 90, 0.0, cx, cy, w / 2);
+            evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
+          }
+        break;
+     case ELM_FLIP_CUBE_RIGHT:
+        p = 1.0 - t;
+        p = 1.0 - (p * p);
+        deg = 90.0 * p;
+        if (wd->state)
+          {
+            evas_map_util_3d_rotate(mf, 0.0, deg, 0.0, cx, cy, w / 2);
+            evas_map_util_3d_rotate(mb, 0.0, deg - 90, 0.0, cx, cy, w / 2);
+          }
+        else
+          {
+            evas_map_util_3d_rotate(mf, 0.0, deg - 90, 0.0, cx, cy, w / 2);
+            evas_map_util_3d_rotate(mb, 0.0, deg, 0.0, cx, cy, w / 2);
+          }
+        break;
+    
      default:
         break;
      }
@@ -228,9 +259,9 @@ _flip(Evas_Object *obj)
         wd->state = !wd->state;
         _configure(obj);
         evas_object_smart_callback_call(obj, "animate,done", NULL);
-        return 0;
+        return ECORE_CALLBACK_CANCEL;
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -267,7 +298,7 @@ _resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event
    _configure(obj);
 }
 
-static int
+static Eina_Bool
 _animate(void *data)
 {
    return _flip(data);
@@ -479,6 +510,8 @@ elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc __UNUSED__, Evas_Coord
  * ELM_FLIP_ROTATE_X_CENTER_AXIS
  * ELM_FLIP_ROTATE_XZ_CENTER_AXIS
  * ELM_FLIP_ROTATE_YZ_CENTER_AXIS
+ * ELM_FLIP_CUBE_LEFT
+ * ELM_FLIP_CUBE_RIGHT
  *
  * @ingroup Flip
  */
index 3acd071..bc4ea4d 100644 (file)
@@ -152,7 +152,11 @@ elm_frame_label_get(const Evas_Object *obj)
 }
 
 /**
- * Set the frame content
+ * Set the content of the frame widget
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_frame_content_unset() function.
  *
  * @param obj The frame object
  * @param content The content will be filled in this frame object
@@ -165,16 +169,40 @@ elm_frame_content_set(Evas_Object *obj, Evas_Object *content)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->content != content) && (wd->content))
-     elm_widget_sub_object_del(obj, wd->content);
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
    if (content)
      {
        elm_widget_sub_object_add(obj, content);
-       evas_object_event_callback_add(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
+}
+
+/**
+ * Unset the content of the frame widget
+ *
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The frame object
+ * @return The content that was being used
+ *
+ * @ingroup Frame
+ */
+EAPI Evas_Object *
+elm_frame_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->frm, wd->content);
+   wd->content = NULL;
+   return content;
 }
index 6a54fa1..b442d58 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -224,10 +221,9 @@ _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (wd->calc_job) ecore_job_del(wd->calc_job);
+   elm_gengrid_clear(obj);
    evas_object_del(wd->pan_smart);
    wd->pan_smart = NULL;
-   elm_gengrid_clear(obj);
    free(wd);
 }
 
@@ -240,10 +236,12 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
 
    if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
      {
-       if (!item->wd->on_hold) {
+       if (!item->wd->on_hold) 
+         {
             item->wd->on_hold = EINA_TRUE;
-            _item_unselect(item);
-       }
+             if (!item->wd->wasselected)
+               _item_unselect(item);
+         }
      }
    if ((item->dragging) && (item->down))
      {
@@ -285,9 +283,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
             ecore_timer_del(item->long_timer);
             item->long_timer = NULL;
          }
-       if (item->wd->wasselected)
+       if (!item->wd->wasselected)
          _item_unselect(item);
-       item->wd->wasselected = 0;
        if (dy < 0)
          {
             if (ady > adx)
@@ -318,16 +315,16 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
      }
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Elm_Gengrid_Item *item = data;
 
    item->long_timer = NULL;
-   if ((item->disabled) || (item->dragging)) return 0;
+   if ((item->disabled) || (item->dragging)) return ECORE_CALLBACK_CANCEL;
    item->wd->longpressed = EINA_TRUE;
    evas_object_smart_callback_call(item->wd->self, "longpressed", item);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -388,15 +385,13 @@ _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *
    if (item->wd->longpressed)
      {
        item->wd->longpressed = EINA_FALSE;
-       if (!item->wd->wasselected)
-         _item_unselect(item);
+       if (!item->wd->wasselected) _item_unselect(item);
        item->wd->wasselected = EINA_FALSE;
        return;
      }
    if (dragged)
      {
-       if (item->want_unrealize)
-            _item_unrealize(item);
+       if (item->want_unrealize) _item_unrealize(item);
      }
    if ((item->disabled) || dragged) return;
    if (item->wd->multi)
@@ -412,7 +407,8 @@ _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *
      {
        if (!item->selected)
          {
-            while (item->wd->selected) _item_unselect(item->wd->selected->data);
+            while (item->wd->selected) 
+              _item_unselect(item->wd->selected->data);
          }
        else
          {
@@ -420,7 +416,7 @@ _mouse_up(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *
             Elm_Gengrid_Item *item2;
 
             EINA_LIST_FOREACH_SAFE(item->wd->selected, l, l_next, item2)
-               if (item2 != item) _item_unselect(item2);
+              if (item2 != item) _item_unselect(item2);
          }
        _item_hilight(item);
        _item_select(item);
@@ -439,6 +435,7 @@ static void
 _item_realize(Elm_Gengrid_Item *item)
 {
    char buf[1024];
+   char style[1024];
 
    if ((item->realized) || (item->delete_me)) return;
    item->base = edje_object_add(evas_object_evas_get(item->wd->self));
@@ -446,7 +443,9 @@ _item_realize(Elm_Gengrid_Item *item)
                         _elm_config->scale);
    evas_object_smart_member_add(item->base, item->wd->pan_smart);
    elm_widget_sub_object_add(item->wd->self, item->base);
-   _elm_theme_object_set(item->wd->self, item->base, "gengrid", "item/default",
+   snprintf(style, sizeof(style), "item/%s",
+           item->gic->item_style ? item->gic->item_style : "default");
+   _elm_theme_object_set(item->wd->self, item->base, "gengrid", style,
                          elm_widget_style_get(item->wd->self));
    item->spacer = evas_object_rectangle_add(evas_object_evas_get(item->wd->self));
    evas_object_color_set(item->spacer, 0, 0, 0, 0);
@@ -505,7 +504,7 @@ _item_realize(Elm_Gengrid_Item *item)
        EINA_LIST_FOREACH(item->states, l, key)
          {
             Eina_Bool on = item->gic->func.state_get(item->data,
-                  item->wd->self, l->data);
+                                                     item->wd->self, l->data);
             if (on)
               {
                  snprintf(buf, sizeof(buf), "elm,state,%s,active", key);
@@ -514,11 +513,11 @@ _item_realize(Elm_Gengrid_Item *item)
          }
      }
 
-   if (!item->wd->item_width && !item->wd->item_height)
+   if ((!item->wd->item_width) && (!item->wd->item_height))
      {
        edje_object_size_min_restricted_calc(item->base,
-             &item->wd->item_width, &item->wd->item_height,
-             item->wd->item_width, item->wd->item_height);
+                                            &item->wd->item_width, &item->wd->item_height,
+                                            item->wd->item_width, item->wd->item_height);
        elm_coords_finger_size_adjust(1, &item->wd->item_width,
                                      1, &item->wd->item_height);
      }
@@ -562,7 +561,7 @@ _item_unrealize(Elm_Gengrid_Item *item)
    _elm_stringlist_free(item->states);
 
    EINA_LIST_FREE(item->icon_objs, icon)
-      evas_object_del(icon);
+     evas_object_del(icon);
 
    item->states = NULL;
    item->realized = EINA_FALSE;
@@ -577,15 +576,15 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
 
    item->x = cx;
    item->y = cy;
-   evas_object_geometry_get(item->wd->self, &ox, &oy, &vw, &vh);
+   evas_object_geometry_get(item->wd->pan_smart, &ox, &oy, &vw, &vh);
    evas_output_viewport_get(evas_object_evas_get(item->wd->self),
                            &cvx, &cvy, &cvw, &cvh);
 
    /* Preload rows/columns at each side of the Gengrid */
-   cvx -= PRELOAD * item->wd->item_width;
-   cvy -= PRELOAD * item->wd->item_height;
-   cvw += 2 * PRELOAD * item->wd->item_width;
-   cvh += 2 * PRELOAD * item->wd->item_height;
+   cvx = ox - PRELOAD * item->wd->item_width;
+   cvy = oy - PRELOAD * item->wd->item_height;
+   cvw = vw + 2 * PRELOAD * item->wd->item_width;
+   cvh = vh + 2 * PRELOAD * item->wd->item_height;
 
    tch = ((vh/item->wd->item_height)*item->wd->item_height);
    alignh = (vh - tch)*item->wd->align_y;
@@ -593,32 +592,32 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
    tcw = ((vw/item->wd->item_width)*item->wd->item_width);
    alignw = (vw - tcw)*item->wd->align_x;
 
-   if (item->wd->horizontal && item->wd->minw < vw)
+   if ((item->wd->horizontal) && (item->wd->minw < vw))
      {
         int columns;
 
         columns = eina_list_count(item->wd->items)/(vh/item->wd->item_height);
         if (eina_list_count(item->wd->items) % (vh/item->wd->item_height))
-             columns++;
+         columns++;
 
         tcw = item->wd->item_width * columns;
        alignw = (vw - tcw)*item->wd->align_x;
      }
-   else if (item->wd->horizontal && item->wd->minw > vw)
-        alignw = 0;   
-   if (!item->wd->horizontal && item->wd->minh < vh)
+   else if ((item->wd->horizontal) && (item->wd->minw > vw))
+     alignw = 0;
+   if ((!item->wd->horizontal) && (item->wd->minh < vh))
      {
         int rows;
 
         rows = eina_list_count(item->wd->items)/(vw/item->wd->item_width);
         if (eina_list_count(item->wd->items) % (vw/item->wd->item_width))
-             rows++;
+         rows++;
 
         tch = item->wd->item_height * rows;
         alignh = (vh - tch)*item->wd->align_y;
      }
-   else if (!item->wd->horizontal && item->wd->minh > vh)
-        alignh = 0;
+   else if ((!item->wd->horizontal) && (item->wd->minh > vh))
+     alignh = 0;
    x = cx * item->wd->item_width - item->wd->pan_x + ox + alignw;
    y = cy * item->wd->item_height - item->wd->pan_y + oy + alignh;
 
@@ -626,6 +625,7 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
                           cvx, cvy, cvw, cvh))
      {
        Eina_Bool was_realized = item->realized;
+
        _item_realize(item);
        if (!was_realized)
          evas_object_smart_callback_call(item->wd->self, "realized", item);
@@ -638,8 +638,7 @@ _item_place(Elm_Gengrid_Item *item, Evas_Coord cx, Evas_Coord cy)
 }
 
 static Elm_Gengrid_Item *
-_item_create(Widget_Data *wd, const Elm_Gengrid_Item_Class *gic,
-      const void *data, Evas_Smart_Cb func, const void *func_data)
+_item_create(Widget_Data *wd, const Elm_Gengrid_Item_Class *gic, const void *data, Evas_Smart_Cb func, const void *func_data)
 {
    Elm_Gengrid_Item *item;
 
@@ -680,8 +679,8 @@ _item_select(Elm_Gengrid_Item *item)
    item->wd->selected = eina_list_append(item->wd->selected, item);
 call:
    item->walking++;
-   if (item->func.func) item->func.func((void *)item->func.data, item->wd->self,
-                                       item);
+   if (item->func.func) 
+     item->func.func((void *)item->func.data, item->wd->self, item);
    if (!item->delete_me)
      evas_object_smart_callback_call(item->wd->self, "selected", item);
    item->walking--;
@@ -710,8 +709,8 @@ _calc_job(void *data)
    Evas_Coord minw = 0, minh = 0, nmax = 0, cvw, cvh;
    int count;
 
-   evas_object_geometry_get(wd->self, NULL, NULL, &cvw, &cvh);
-   if (wd->horizontal && wd->item_height)
+   evas_object_geometry_get(wd->pan_smart, NULL, NULL, &cvw, &cvh);
+   if ((wd->horizontal) && (wd->item_height))
      nmax = cvh / wd->item_height;
    else if (wd->item_width)
      nmax = cvw / wd->item_width;
@@ -924,7 +923,6 @@ elm_gengrid_add(Evas_Object *parent)
 {
    Evas_Object *obj;
    Evas *e;
-   Evas_Coord minw, minh;
    Widget_Data *wd;
    static Evas_Smart *smart = NULL;
 
@@ -1004,7 +1002,7 @@ elm_gengrid_item_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (wd->item_width == w && wd->item_height == h) return;
+   if ((wd->item_width == w) && (wd->item_height == h)) return;
    wd->item_width = w;
    wd->item_height = h;
    if (wd->calc_job) ecore_job_del(wd->calc_job);
@@ -1137,7 +1135,8 @@ elm_gengrid_item_del(Elm_Gengrid_Item *item)
        item->delete_me = EINA_TRUE;
        if (item->selected)
          item->wd->selected = eina_list_remove(item->wd->selected, item);
-       if (item->gic->func.del) item->gic->func.del(item->data, item->wd->self);
+       if (item->gic->func.del) 
+         item->gic->func.del(item->data, item->wd->self);
        return;
      }
 
@@ -1382,7 +1381,7 @@ elm_gengrid_item_selected_set(Elm_Gengrid_Item *item, Eina_Bool selected)
 {
    Widget_Data *wd = elm_widget_data_get(item->wd->self);
    if (!wd) return;
-   if (!item || item->delete_me) return;
+   if ((!item) || (item->delete_me)) return;
    selected = !!selected;
    if (item->selected == selected) return;
 
@@ -1577,3 +1576,23 @@ elm_gengrid_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v
    if (!wd) return;
    elm_smart_scroller_bounce_allow_get(wd->scr, h_bounce, v_bounce);
 }
+
+/**
+ * Get all items in the Gengrid.
+ *
+ * This returns a list of the Gengrid items. The list contains
+ * Elm_Gengrid_Item pointers.
+ *
+ * @param obj The Gengrid object.
+ * @return The list of items, or NULL if none.
+ *
+ * @ingroup Gengrid
+ */
+EAPI const Eina_List *
+elm_gengrid_items_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return wd->items;
+}
index fac0cff..c71d4a8 100644 (file)
@@ -1,7 +1,3 @@
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -266,9 +262,12 @@ struct _Widget_Data
    Eina_Bool bring_in : 1;
    Eina_Bool compress : 1;
    Eina_Bool homogeneous : 1;
+   Eina_Bool clear_me : 1;
+   int walking;
    int item_width;
    int item_height;
    int max_items_per_block;
+   double longpress_timeout;
 };
 
 struct _Item_Block
@@ -509,6 +508,7 @@ static void
 _item_del(Elm_Genlist_Item *it)
 {
    elm_genlist_item_subitems_clear(it);
+   it->wd->walking -= it->walking;
    if (it->wd->show_item == it) it->wd->show_item = NULL;
    if (it->selected) it->wd->selected = eina_list_remove(it->wd->selected, it);
    if (it->realized) _item_unrealize(it);
@@ -538,13 +538,20 @@ _item_select(Elm_Genlist_Item *it)
    it->wd->selected = eina_list_append(it->wd->selected, it);
    call:
    it->walking++;
+   it->wd->walking++;
    if (it->func.func) it->func.func((void *)it->func.data, it->wd->obj, it);
    if (!it->delete_me)
      evas_object_smart_callback_call(it->wd->obj, "selected", it);
    it->walking--;
-   if ((it->walking == 0) && (it->delete_me))
+   it->wd->walking--;
+   if ((it->wd->clear_me) && (it->wd->walking == 0))
+      elm_genlist_clear(it->wd->obj);
+   else
      {
-        if (it->relcount == 0) _item_del(it);
+        if ((it->walking == 0) && (it->delete_me))
+          {
+             if (it->relcount == 0) _item_del(it);
+          }
      }
 }
 
@@ -583,7 +590,8 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
        if (!it->wd->on_hold)
          {
             it->wd->on_hold = EINA_TRUE;
-            _item_unselect(it);
+             if (!it->wd->wasselected)
+               _item_unselect(it);
          }
      }
    if ((it->dragging) && (it->down))
@@ -628,7 +636,6 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
           }
         if (!it->wd->wasselected)
           _item_unselect(it);
-        it->wd->wasselected = 0;
         if (dy < 0)
           {
              if (ady > adx)
@@ -661,16 +668,16 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
      }
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Elm_Genlist_Item *it = data;
 
    it->long_timer = NULL;
-   if ((it->disabled) || (it->dragging)) return 0;
+   if ((it->disabled) || (it->dragging)) return ECORE_CALLBACK_CANCEL;
    it->wd->longpressed = EINA_TRUE;
    evas_object_smart_callback_call(it->wd->obj, "longpressed", it);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -681,6 +688,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
    Evas_Coord x, y;
 
    if (ev->button != 1) return;
+
    it->down = 1;
    it->dragging  = 0;
    evas_object_geometry_get(obj, &x, &y, NULL, NULL);
@@ -695,7 +703,7 @@ _mouse_down(void *data, Evas *evas __UNUSED__, Evas_Object *obj, void *event_inf
      evas_object_smart_callback_call(it->wd->obj, "clicked", it);
    if (it->long_timer) ecore_timer_del(it->long_timer);
    if (it->realized)
-     it->long_timer = ecore_timer_add(1.0, _long_press, it);
+     it->long_timer = ecore_timer_add(it->wd->longpress_timeout, _long_press, it);
    else
      it->long_timer = NULL;
 }
@@ -1495,6 +1503,7 @@ elm_genlist_add(Evas_Object *parent)
    wd->obj = obj;
    wd->mode = ELM_LIST_SCROLL;
    wd->max_items_per_block = 32;
+   wd->longpress_timeout = 1.0;
 
    evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
    evas_object_smart_callback_add(obj, "scroll-hold-off", _hold_off, obj);
@@ -1732,7 +1741,7 @@ _queue_proecess(Widget_Data *wd, int norender)
    return n;
 }
 
-static int
+static Eina_Bool
 _item_idler(void *data)
 {
    Widget_Data *wd = data;
@@ -1745,9 +1754,9 @@ _item_idler(void *data)
    if (!wd->queue)
      {
        wd->queue_idler = NULL;
-       return 0;
+       return ECORE_CALLBACK_CANCEL;
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -1959,6 +1968,18 @@ elm_genlist_clear(Evas_Object *obj)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
+   if (wd->walking > 0)
+     {
+       Elm_Genlist_Item *it;
+        
+        wd->clear_me = 1;
+        EINA_INLIST_FOREACH(wd->items, it)
+          {
+             it->delete_me = 1;
+          }
+       return;
+     }
+   wd->clear_me = 0;
    while (wd->items)
      {
        Elm_Genlist_Item *it = (Elm_Genlist_Item *)(wd->items);
@@ -3145,3 +3166,37 @@ elm_genlist_block_count_get(const Evas_Object *obj)
    if (!wd) return 0;
    return wd->max_items_per_block;
 }
+
+/**
+ * Set the timeout in seconds for the longpress event
+ * 
+ * @param obj The genlist object
+ * @param timeout timeout in seconds
+ * 
+ * @ingroup Genlist
+ */
+EAPI void
+elm_genlist_longpress_timeout_set(const Evas_Object *obj, double timeout)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   wd->longpress_timeout = timeout;
+}
+
+/**
+ * Get the timeout in seconds for the longpress event
+ * 
+ * @param obj The genlist object
+ * @return timeout in seconds
+ * 
+ * @ingroup Genlist
+ */
+EAPI double
+elm_genlist_longpress_timeout_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) 0;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return 0;
+   return wd->longpress_timeout;
+}
index 9e0d43c..8b555c9 100644 (file)
@@ -240,7 +240,7 @@ _parent_hide(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *
 {
    Widget_Data *wd = elm_widget_data_get(data);
    if (!wd) return;
-   if (wd) evas_object_hide(wd->cov);
+   evas_object_hide(wd->cov);
 }
 
 static void
@@ -308,6 +308,8 @@ elm_hover_add(Evas_Object *parent)
 
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
 
+   elm_hover_parent_set(obj, parent);
+
    _sizing_eval(obj);
    return obj;
 }
@@ -426,6 +428,10 @@ elm_hover_parent_get(Evas_Object *obj)
  * Sets the content of the hover object and the direction in which
  * it will pop out.
  *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_hover_content_unset() function.
+ *
  * @param obj The hover object
  * @param swallow The direction that the object will display in. Multiple
  * objects can have the same swallow location. Objects placed in the same
@@ -451,7 +457,8 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
        if (!strcmp(buf, si->swallow))
          {
             if (content == si->obj) return;
-            elm_widget_sub_object_del(obj, si->obj);
+            evas_object_del(si->obj);
+            si->obj = NULL;
             break;
          }
      }
@@ -463,8 +470,49 @@ elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conten
        si->swallow = eina_stringshare_add(buf);
        si->obj = content;
        wd->subs = eina_list_append(wd->subs, si);
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
+}
+
+/**
+ * Unset the content of the hover object
+ *
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The hover object
+ * @param swallow The direction that the object will display in. Multiple
+ * objects can have the same swallow location. Objects placed in the same
+ * swallow will be placed starting at the middle of the hover and ending
+ * farther from the middle.
+ * Accepted values are "left" "right" "top" "bottom" "middle"
+ * @return The content that was being used
+ *
+ * @ingroup Hover
+ */
+EAPI Evas_Object *
+elm_hover_content_unset(Evas_Object *obj, const char *swallow)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Subinfo *si;
+   const Eina_List *l;
+   char buf[1024];
+   if (!wd) return NULL;
+   snprintf(buf, sizeof(buf), "elm.swallow.slot.%s", swallow);
+   EINA_LIST_FOREACH(wd->subs, l, si)
+     {
+       if (!strcmp(buf, si->swallow))
+         {
+            Evas_Object *content;
+            if (!si->obj) return NULL;
+            content = si->obj;
+            elm_widget_sub_object_del(obj, si->obj);
+            edje_object_part_unswallow(wd->cov, si->obj);
+            si->obj = NULL;
+            return content;
+         }
+     }
+   return NULL;
 }
 
 /**
index c4ae4b6..ebcfda9 100644 (file)
@@ -49,7 +49,7 @@ _theme_hook(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->stdicon)
-     _elm_theme_object_icon_set(obj, wd->img, wd->stdicon, "default");
+     _elm_theme_object_icon_set(obj, wd->img, wd->stdicon, elm_widget_style_get(obj));
    _sizing_eval(obj);
 }
 
@@ -288,3 +288,5 @@ elm_icon_prescale_set(Evas_Object *obj, int size)
    if (!wd) return;
    _els_smart_icon_scale_size_set(wd->img, size);
 }
+
+
index d04df56..699c50f 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2,t0,(0
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
index 48c547f..a8083da 100644 (file)
@@ -196,9 +196,9 @@ _index_box_auto_fill(Evas_Object *obj, Evas_Object *box, int level)
         o = edje_object_add(evas_object_evas_get(obj));
         it->base = o;
         if (i & 0x1)
-          _elm_theme_object_set(obj, o, "index", "item_odd/vertical", "default");
+          _elm_theme_object_set(obj, o, "index", "item_odd/vertical", elm_widget_style_get(obj));
         else
-          _elm_theme_object_set(obj, o, "index", "item/vertical", "default");
+          _elm_theme_object_set(obj, o, "index", "item/vertical", elm_widget_style_get(obj));
         edje_object_part_text_set(o, "elm.text", it->letter);
         edje_object_size_min_restricted_calc(o, &mw, &mh, 0, 0);
         evas_object_size_hint_min_set(o, mw, mh);
@@ -247,16 +247,16 @@ _index_box_clear(Evas_Object *obj, Evas_Object *box __UNUSED__, int level)
    wd->level_active[level] = 0;
 }
 
-static int
+static Eina_Bool
 _delay_change(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    void *d;
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->delay = NULL;
    d = (void *)elm_index_item_selected_get(data, wd->level);
    if (d) evas_object_smart_callback_call(data, "delay,changed", d);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
index ad2b37b..a7161b8 100644 (file)
@@ -13,18 +13,26 @@ typedef struct _Widget_Data Widget_Data;
 struct _Widget_Data
 {
    Evas_Object *lbl;
+   Evas_Object *bg;
    const char *label;
    Evas_Coord lastw;
    Ecore_Job *deferred_recalc_job;
    Evas_Coord wrap_w;
    Eina_Bool linewrap : 1;
    Eina_Bool changed : 1;
+   Eina_Bool bgcolor : 1;
+   Eina_Bool ellipsis : 1;
 };
 
 static const char *widtype = NULL;
 static void _del_hook(Evas_Object *obj);
 static void _theme_hook(Evas_Object *obj);
 static void _sizing_eval(Evas_Object *obj);
+static int _get_value_in_key_string(const char *oldstring, char *key, char **value);
+static int _strbuf_key_value_replace(Eina_Strbuf *srcbuf, char *key, const char *value, int deleteflag);
+static int _stringshare_key_value_replace(const char **srcstring, char *key, const char *value, int deleteflag);
+static int _is_width_over(Evas_Object *obj);
+static void _ellipsis_label_to_width(Evas_Object *obj);
 
 static void
 _elm_win_recalc_job(void *data)
@@ -62,6 +70,7 @@ _del_hook(Evas_Object *obj)
    if (!wd) return;
    if (wd->deferred_recalc_job) ecore_job_del(wd->deferred_recalc_job);
    if (wd->label) eina_stringshare_del(wd->label);
+   if (wd->bg) evas_object_del(wd->bg);
    free(wd);
 }
 
@@ -105,6 +114,9 @@ _sizing_eval(Evas_Object *obj)
         evas_object_size_hint_min_set(obj, minw, minh);
         maxh = minh;
         evas_object_size_hint_max_set(obj, maxw, maxh);
+        
+        if (wd->ellipsis && _is_width_over(obj) == 1) 
+          _ellipsis_label_to_width(obj);
      }
 }
 
@@ -115,6 +127,284 @@ _resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event
    if (!wd) return;
    if (wd->linewrap) _sizing_eval(data);
 }
+
+static int
+_get_value_in_key_string(const char *oldstring, char *key, char **value)
+{
+   char *curlocater, *starttag, *endtag;
+   int firstindex = 0, foundflag = -1;
+   
+   curlocater = strstr(oldstring, key);
+   if (curlocater)
+     {
+        starttag = curlocater;
+        endtag = curlocater + strlen(key);
+        if ((endtag == NULL) || (*endtag != '='))
+          {
+             foundflag = 0;
+             return -1;
+          }
+        
+        firstindex = abs(oldstring - curlocater);
+        firstindex += strlen(key) + 1; // strlen("key") + strlen("=")
+        *value = (char *)oldstring + firstindex;
+        
+        while (oldstring != starttag)
+          {
+             if (*starttag == '>')
+               {
+                  foundflag = 0;
+                  break;
+               }
+             if (*starttag == '<') 
+               break;
+             else 
+               starttag--;
+             if (starttag == NULL) break;
+          }
+        
+        while (NULL != endtag)
+          {
+             if (*endtag == '<')
+               {
+                  foundflag = 0;
+                  break;
+               }
+             if (*endtag == '>') 
+               break;
+             else 
+               endtag++;
+             if (endtag == NULL) break;
+          }
+        
+        if ((foundflag != 0) && (*starttag == '<') && (*endtag == '>'))
+          foundflag = 1;
+        else 
+          foundflag = 0;
+     }
+   else
+     {
+        foundflag = 0;
+     }
+   
+   if (foundflag == 1) return 0;
+   
+   return -1;
+}
+
+
+static int
+_strbuf_key_value_replace(Eina_Strbuf *srcbuf, char *key, const char *value, int deleteflag)
+{
+   const char *srcstring = NULL;
+   Eina_Strbuf *repbuf = NULL, *diffbuf = NULL;
+   char *curlocater, *replocater;
+   char *starttag, *endtag;
+   int tagtxtlen = 0, insertflag = 0;
+   
+   srcstring = eina_strbuf_string_get(srcbuf);
+   curlocater = strstr(srcstring, key);
+   
+   if (curlocater == NULL)
+     insertflag = 1;
+   else
+     {
+        do 
+          {
+             starttag = strchr(srcstring, '<');
+             endtag = strchr(srcstring, '>');
+             tagtxtlen = endtag - starttag;
+             if (tagtxtlen <= 0) tagtxtlen = 0;
+             if ((starttag < curlocater) && (curlocater < endtag)) break;
+             if ((endtag != NULL) && ((endtag + 1) != NULL))
+               srcstring = endtag + 1;
+             else
+               break;
+          } while (strlen(srcstring) > 1);
+        
+        if (starttag && endtag && tagtxtlen > strlen(key))
+          {
+             repbuf = eina_strbuf_new();
+             diffbuf = eina_strbuf_new();
+             eina_strbuf_append_n(repbuf, starttag, tagtxtlen);
+             srcstring = eina_strbuf_string_get(repbuf);
+             curlocater = strstr(srcstring, key);
+             if (curlocater != NULL)
+               {
+                  replocater = curlocater + strlen(key) + 1;
+                  while ((*replocater != '=') && (replocater != NULL))
+                    replocater++;
+                  if (replocater != NULL)
+                    {
+                       replocater++;
+                       while ((*replocater != ' ') && 
+                              (*replocater != '>') && 
+                              (replocater == NULL))
+                         replocater++;
+                    }
+                  if (replocater != NULL)
+                    {
+                       replocater--;
+                       eina_strbuf_append_n(diffbuf, curlocater, 
+                                            replocater-curlocater);
+                    }
+                  else
+                    insertflag = 1;
+               }
+             else
+               insertflag = 1;
+             eina_strbuf_reset(repbuf);
+          }
+        else
+          insertflag = 1; 
+     }
+   
+   if (repbuf == NULL) repbuf = eina_strbuf_new();
+   if (diffbuf == NULL) diffbuf = eina_strbuf_new();
+   
+   if (insertflag)
+     {
+        eina_strbuf_append_printf(repbuf, "<%s=%s>", key, value);
+        eina_strbuf_prepend(srcbuf, eina_strbuf_string_get(repbuf));
+     }
+   else
+     {
+        if (deleteflag)
+          {
+             eina_strbuf_prepend(diffbuf, "<");
+             eina_strbuf_append(diffbuf, ">");
+             eina_strbuf_replace_first(srcbuf, eina_strbuf_string_get(diffbuf), "");
+          }
+        else
+          {
+             eina_strbuf_append_printf(repbuf, "%s=%s", key, value);
+             eina_strbuf_replace_first(srcbuf, eina_strbuf_string_get(diffbuf), eina_strbuf_string_get(repbuf));
+          }
+     }
+
+   if (repbuf) eina_strbuf_free(repbuf);
+   if (diffbuf) eina_strbuf_free(diffbuf);
+  
+   return 0;           
+}
+
+static int
+_stringshare_key_value_replace(const char **srcstring, char *key, const char *value, int deleteflag)
+{
+   Eina_Strbuf *sharebuf = NULL;   
+   
+   sharebuf = eina_strbuf_new();
+   eina_strbuf_append(sharebuf, *srcstring);
+   _strbuf_key_value_replace(sharebuf, key, value, deleteflag);
+   eina_stringshare_del(*srcstring);
+   *srcstring = eina_stringshare_add(eina_strbuf_string_get(sharebuf));
+   eina_strbuf_free(sharebuf);
+
+   return 0;
+}
+
+static int
+_is_width_over(Evas_Object *obj)
+{
+   Evas_Coord x, y, w, h;
+   Evas_Coord vx, vy, vw, vh;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   const char *ellipsis_string = "...";
+   size_t ellen = strlen(ellipsis_string)+1;
+   
+   if (!wd) return 0;
+
+   edje_object_part_geometry_get(wd->lbl,"elm.text",&x,&y,&w,&h);
+
+   evas_object_geometry_get (obj, &vx,&vy,&vw,&vh);
+
+   if (x >= 0 && y >= 0) return 0;
+
+   if (ellen < wd->wrap_w && w > wd->wrap_w) return 1;
+
+   return 0;
+}
+
+static void
+_ellipsis_label_to_width(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   int cur_fontsize = 0, len, showcount;
+   Eina_Strbuf *fontbuf = NULL, *txtbuf = NULL;
+   char *kvalue = NULL;
+   const char *minfont, *deffont, *maxfont;
+   const char *ellipsis_string = "...";
+   int minfontsize, maxfontsize, minshowcount;
+
+   minshowcount = strlen(ellipsis_string) + 1;
+   minfont = edje_object_data_get(wd->lbl, "min_font_size");
+   if (minfont) minfontsize = atoi(minfont);
+   else minfontsize = 1;
+   maxfont = edje_object_data_get(wd->lbl, "max_font_size");
+   if (maxfont) maxfontsize = atoi(maxfont);
+   else maxfontsize = 1;
+   deffont = edje_object_data_get(wd->lbl, "default_font_size");
+   if (deffont) cur_fontsize = atoi(deffont);
+   else cur_fontsize = 1;
+   if (minfontsize == maxfontsize || cur_fontsize == 1) return; // theme is not ready for ellipsis
+   if (eina_stringshare_strlen(wd->label) <= 0) return;
+
+   if (_get_value_in_key_string(wd->label, "font_size", &kvalue) == 0)
+     {
+        if (kvalue != NULL) cur_fontsize = atoi((char *)kvalue);
+     }
+   
+   txtbuf = eina_strbuf_new();
+   eina_strbuf_append(txtbuf, wd->label);
+   
+   while (_is_width_over(obj) == 1)
+     {
+        if (cur_fontsize > minfontsize)
+          {
+             cur_fontsize--;
+             if (fontbuf != NULL)
+               {
+                  eina_strbuf_free(fontbuf);
+                  fontbuf = NULL;
+               }
+             fontbuf = eina_strbuf_new();
+             eina_strbuf_append_printf(fontbuf, "%d", cur_fontsize);
+             _strbuf_key_value_replace(txtbuf, "font_size", eina_strbuf_string_get(fontbuf), 0);
+             edje_object_part_text_set(wd->lbl, "elm.text", eina_strbuf_string_get(txtbuf));
+             eina_strbuf_free(fontbuf);
+             fontbuf = NULL;
+          }
+        else
+          {
+             if (txtbuf != NULL)
+               {
+                  eina_strbuf_free(txtbuf);
+                  txtbuf = NULL;
+               }
+             txtbuf = eina_strbuf_new();
+             eina_strbuf_append_printf(txtbuf, "%s", edje_object_part_text_get(wd->lbl, "elm.text"));
+             len = eina_strbuf_length_get(txtbuf);
+             showcount = len - 1;
+             while (showcount > minshowcount)
+               {
+                  len = eina_strbuf_length_get(txtbuf);
+                  eina_strbuf_remove(txtbuf, len - minshowcount, len);
+                  eina_strbuf_append(txtbuf, ellipsis_string);
+                  edje_object_part_text_set(wd->lbl, "elm.text", eina_strbuf_string_get(txtbuf));
+                  
+                  if (_is_width_over(obj) == 1) 
+                    showcount--;
+                  else 
+                    break;
+               }
+          }
+     }
+   
+   if (txtbuf) eina_strbuf_free(txtbuf);
+   wd->changed = 1;
+   _sizing_eval(obj);
+}
+
 /**
  * Add a new label to the parent
  *
@@ -132,6 +422,9 @@ elm_label_add(Evas_Object *parent)
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
+   wd->bgcolor = EINA_FALSE;
+   wd->bg = evas_object_rectangle_add(e);
+   evas_object_color_set(wd->bg, 0, 0, 0, 0);
    obj = elm_widget_add(e);
    ELM_SET_WIDTYPE(widtype, "label");
    elm_widget_type_set(obj, "label");
@@ -142,6 +435,7 @@ elm_label_add(Evas_Object *parent)
    elm_widget_can_focus_set(obj, 0);
 
    wd->linewrap = EINA_FALSE;
+   wd->ellipsis = EINA_FALSE;
 
    wd->lbl = edje_object_add(e);
    _elm_theme_object_set(obj, wd->lbl, "label", "base", "default");
@@ -269,3 +563,160 @@ elm_label_wrap_width_get(const Evas_Object *obj)
    if (!wd) return 0;
    return wd->wrap_w;
 }
+
+/**
+ * Set the font size on the label object.
+ * 
+ * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
+ * "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
+ *
+ * @param obj The label object
+ * @param size font size
+ *
+ * @ingroup Label
+ */
+EAPI void
+elm_label_fontsize_set(Evas_Object *obj, int fontsize)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   char *label, fontvalue[16];
+   int len;
+   
+   if (!wd) return;
+   _elm_dangerous_call_check(__FUNCTION__);
+   len = strlen(wd->label);
+   if (len <= 0) return;
+   label = alloca(sizeof(char) * (len + 32));
+   sprintf(fontvalue, "%i", fontsize);
+   
+   if (_stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 0) == 0)
+     edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
+   
+   if (fontsize == 0) // remove fontsize tag
+     _stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 1);
+   
+   wd->changed = 1;
+   _sizing_eval(obj);
+
+}
+
+/**
+ * Set the text align on the label object
+ *
+ * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
+ * "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
+ *
+ * @param obj The label object
+ * @param align align mode
+ *
+ * @ingroup Label
+ */
+EAPI void
+elm_label_text_align_set(Evas_Object *obj, const char *alignmode)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   int len;
+
+   if (!wd) return;
+   _elm_dangerous_call_check(__FUNCTION__);
+   len = strlen(wd->label);
+   if (len <= 0) return;
+
+   if (_stringshare_key_value_replace(&wd->label, "align", alignmode, 0) == 0)
+     edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
+
+   wd->changed = 1;
+   _sizing_eval(obj);
+}
+
+/**
+ * Set the text color on the label object
+ *
+ * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
+ * "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
+ *
+ * @param obj The label object
+ * @param r Red property background color of The label object 
+ * @param g Green property background color of The label object 
+ * @param b Blue property background color of The label object 
+ * @param a Alpha property background alpha of The label object 
+ *
+ * @ingroup Label
+ */
+EAPI void
+elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   char *label, colorstring[16];
+   int len;
+
+   if (!wd) return;
+   _elm_dangerous_call_check(__FUNCTION__);
+   len = strlen(wd->label);
+   if (len <= 0) return;
+   label = alloca(sizeof(char) * (len + 32));
+   sprintf(colorstring, "#%02x%02x%02x%02x", r, g, b, a);
+
+   if (_stringshare_key_value_replace(&wd->label, "color", colorstring, 0) == 0)
+     {
+        edje_object_part_text_set(wd->lbl, "elm.text", wd->label);
+        wd->changed = 1;
+        _sizing_eval(obj);
+     }
+}
+
+
+/**
+ * Set background color of the label
+ *
+ * NEVER use this. It is for hyper-special cases only. use styles instead. e.g.
+ * "big", "medium", "small" - or better name them by use:
+ * "title", "footnote", "quote" etc.
+ *
+ * @param obj The label object
+ * @param r Red property background color of The label object 
+ * @param g Green property background color of The label object 
+ * @param b Blue property background color of The label object 
+ * @param a Alpha property background alpha of The label object 
+ * @ingroup Label
+ */
+EAPI void
+elm_label_background_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsigned int b, unsigned int a)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   evas_object_color_set(wd->bg, r, g, b, a);
+   
+   if (!wd) return;
+   _elm_dangerous_call_check(__FUNCTION__);
+   if (wd->bgcolor == EINA_FALSE)
+     {
+        wd->bgcolor = 1;
+        edje_object_part_swallow(wd->lbl, "label.swallow.background", wd->bg);
+     }
+}
+
+/**
+ * Set the ellipsis behavior of the label
+ *
+ * @param obj The label object
+ * @param ellipsis To ellipsis text or not
+ * @ingroup Label
+ */
+EAPI void
+elm_label_ellipsis_set(Evas_Object *obj, Eina_Bool ellipsis)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   if (wd->ellipsis == ellipsis) return;
+   wd->ellipsis = ellipsis;
+   wd->changed = 1;
+   _sizing_eval(obj);
+}
index 9bd273a..02cd657 100644 (file)
@@ -211,6 +211,10 @@ elm_layout_theme_set(Evas_Object *obj, const char *clas, const char *group, cons
 /**
  * Set the layout content
  *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_layout_content_unset() function.
+ *
  * @param obj The layout object
  * @param swallow The swallow group name in the edje file
  * @param content The content will be filled in this layout object
@@ -230,7 +234,7 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
        if (!strcmp(swallow, si->swallow))
          {
             if (content == si->obj) return;
-            elm_widget_sub_object_del(obj, si->obj);
+            evas_object_del(si->obj);
             break;
          }
      }
@@ -245,8 +249,42 @@ elm_layout_content_set(Evas_Object *obj, const char *swallow, Evas_Object *conte
        si->swallow = eina_stringshare_add(swallow);
        si->obj = content;
        wd->subs = eina_list_append(wd->subs, si);
-       _request_sizing_eval(obj);
      }
+   _request_sizing_eval(obj);
+}
+
+/**
+ * Unset the layout content
+ *
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The layout object
+ * @param swallow The swallow group name in the edje file
+ * @return The content that was being used
+ *
+ * @ingroup Layout
+ */
+EAPI Evas_Object *
+elm_layout_content_unset(Evas_Object *obj, const char *swallow)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Subinfo *si;
+   const Eina_List *l;
+   if (!wd) return NULL;
+   EINA_LIST_FOREACH(wd->subs, l, si)
+     {
+       if (!strcmp(swallow, si->swallow))
+         {
+            Evas_Object *content;
+            if (!si->obj) return NULL;
+            content = si->obj; /* si will die in _sub_del due elm_widget_sub_object_del() */
+            elm_widget_sub_object_del(obj, content);
+            edje_object_part_unswallow(wd->lay, content);
+            return content;
+         }
+     }
+   return NULL;
 }
 
 /**
index b7844b2..fd41a28 100644 (file)
@@ -38,6 +38,7 @@ struct _Elm_List_Item
    Eina_Bool deleted : 1;
    Eina_Bool even : 1;
    Eina_Bool is_even : 1;
+   Eina_Bool is_separator : 1;
    Eina_Bool fixed : 1;
    Eina_Bool selected : 1;
    Eina_Bool hilighted : 1;
@@ -367,23 +368,24 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
                   ecore_timer_del(it->long_timer);
                   it->long_timer = NULL;
                }
-            _item_unselect(it);
+             if (!wd->wasselected)
+               _item_unselect(it);
          }
      }
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Elm_List_Item *it = data;
    Widget_Data *wd = elm_widget_data_get(it->obj);
 
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    it->long_timer = NULL;
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, 0);
    wd->longpressed = EINA_TRUE;
    evas_object_smart_callback_call(it->obj, "longpressed", it);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -565,7 +567,9 @@ _fix_items(Evas_Object *obj)
          {
             const char *stacking;
 
-            if (wd->mode == ELM_LIST_COMPRESS)
+            if (it->is_separator)
+              _elm_theme_object_set(obj, it->base, "list", "separator", style);
+            else if (wd->mode == ELM_LIST_COMPRESS)
               {
                  if (it->even)
                    _elm_theme_object_set(obj, it->base, "list", "item_compress", style);
@@ -1141,6 +1145,32 @@ elm_list_selected_items_get(const Evas_Object *obj)
 }
 
 /**
+ * Sets if item is a separator.
+ *
+ * @param it The list item object
+ * @param setting
+ */
+EAPI void
+elm_list_item_separator_set(Elm_List_Item *it, Eina_Bool setting)
+{
+   ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
+   it->is_separator = !!setting;
+}
+
+/**
+ * Returns EINA_TRUE if Elm_List_Item is a separator.
+ *
+ * @param it The list item object
+ */
+EAPI Eina_Bool
+elm_list_item_separator_get(const Elm_List_Item *it)
+{
+   ELM_LIST_ITEM_CHECK_DELETED_RETURN(it, EINA_FALSE);
+   return it->is_separator;
+}
+
+
+/**
  * Sets the selected state of @p it.
  *
  * @param it The list item
@@ -1296,6 +1326,10 @@ elm_list_item_icon_get(const Elm_List_Item *it)
 /**
  * Sets the left side icon associated with the item.
  *
+ * Once the icon object is set, a previously set one will be deleted.
+ * You probably don't want, then, to have the <b>same</b> icon object set
+ * for more than one item of the list.
+ *
  * @param it The list item
  * @param icon The left side icon object to associate with @p it
  *
@@ -1307,13 +1341,22 @@ elm_list_item_icon_set(Elm_List_Item *it, Evas_Object *icon)
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
    if (it->icon == icon) return;
    if (it->dummy_icon && !icon) return;
-   if (it->dummy_icon) evas_object_del(it->icon);
+   if (it->dummy_icon)
+     {
+       evas_object_del(it->icon);
+       it->dummy_icon = EINA_FALSE;
+     }
    if (!icon)
      {
        icon = evas_object_rectangle_add(evas_object_evas_get(it->obj));
        evas_object_color_set(icon, 0, 0, 0, 0);
        it->dummy_icon = EINA_TRUE;
      }
+   if (it->icon)
+     {
+       evas_object_del(it->icon);
+       it->icon = NULL;
+     }
    it->icon = icon;
    if (it->base)
      edje_object_part_swallow(it->base, "elm.swallow.icon", icon);
@@ -1336,7 +1379,11 @@ elm_list_item_end_get(const Elm_List_Item *it)
 }
 
 /**
- * Gets the right side icon associated with the item.
+ * Sets the right side icon associated with the item.
+ *
+ * Once the icon object is set, a previously set one will be deleted.
+ * You probably don't want, then, to have the <b>same</b> icon object set
+ * for more than one item of the list.
  *
  * @param it The list item
  * @param icon The right side icon object to associate with @p it
@@ -1349,13 +1396,22 @@ elm_list_item_end_set(Elm_List_Item *it, Evas_Object *end)
    ELM_LIST_ITEM_CHECK_DELETED_RETURN(it);
    if (it->end == end) return;
    if (it->dummy_end && !end) return;
-   if (it->dummy_end) evas_object_del(it->end);
+   if (it->dummy_end)
+     {
+       evas_object_del(it->end);
+       it->dummy_icon = EINA_FALSE;
+     }
    if (!end)
      {
        end = evas_object_rectangle_add(evas_object_evas_get(it->obj));
        evas_object_color_set(end, 0, 0, 0, 0);
        it->dummy_end = EINA_TRUE;
      }
+   if (it->end)
+     {
+       evas_object_del(it->end);
+       it->end = NULL;
+     }
    it->end = end;
    if (it->base)
      edje_object_part_swallow(it->base, "elm.swallow.end", end);
index e72bcf6..b07dd5b 100644 (file)
 static Elm_Version _version = { VMAJ, VMIN, VMIC, VREV };
 EAPI Elm_Version *elm_version = &_version;
 
+Eina_Bool
+_elm_dangerous_call_check(const char *call)
+{
+   char buf[256];
+   const char *eval;
+   
+   snprintf(buf, sizeof(buf), "%i.%i.%i.%i", VMAJ, VMIN, VMIC, VREV);
+   eval = getenv("ELM_NO_FINGER_WAGGLING");
+   if ((eval) && (!strcmp(eval, buf)))
+     return 0;
+   printf("ELEMENTARY FINGER WAGGLE!!!!!!!!!!\n"
+          "\n"
+          "  %s() used.\n"
+          "PLEASE see the API documentation for this function. This call\n"
+          "should almost never be used. Only in very special cases.\n"
+          "\n"
+          "To remove this warning please set the environment variable:\n"
+          "  ELM_NO_FINGER_WAGGLING\n"
+          "To the value of the Elementary version + revision number. e.g.:\n"
+          "  1.2.5.40295\n"
+          "\n"
+          ,
+          call);
+   return 1;
+}
+
 /**
  * @defgroup Start Getting Started
  *
@@ -256,13 +282,13 @@ myapp_CFLAGS =
  * applications. It is up to you to decide what is best for you. If you just
  * follow the template above, you can do it both ways and can decide at build
  * time. The more advanced of you may suggest making it a configure option.
- * That is perfectly valid, bu has been left out here for simplicity, as our
+ * That is perfectly valid, but has been left out here for simplicity, as our
  * aim to have an Elementary (and EFL) tutorial, not an autoconf & automake
  * document.
  *
  */
 
-static int _elm_signal_exit(void *data, int ev_type, void *ev);
+static Eina_Bool _elm_signal_exit(void *data, int ev_type, void *ev);
 
 char *_elm_appname = NULL;
 const char *_elm_data_dir = NULL;
@@ -275,11 +301,11 @@ static int _elm_init_count = 0;
 static int _elm_policies[ELM_POLICY_LAST];
 static Ecore_Event_Handler *_elm_exit_handler = NULL;
 
-static int
+static Eina_Bool
 _elm_signal_exit(void *data __UNUSED__, int ev_type __UNUSED__, void *ev __UNUSED__)
 {
    elm_exit();
-   return 1;
+   return ECORE_CALLBACK_PASS_ON;
 }
 
 void
@@ -289,6 +315,26 @@ _elm_rescale(void)
    _elm_win_rescale();
 }
 
+static Eina_List *widtypes = NULL;
+
+void
+_elm_widtype_register(const char **ptr)
+{
+   widtypes = eina_list_append(widtypes, (void *)ptr);
+}
+
+static void
+_elm_widtype_clear(void)
+{
+   const char **ptr;
+   
+   EINA_LIST_FREE(widtypes, ptr)
+     {
+        eina_stringshare_del(*ptr);
+        *ptr = NULL;
+     }
+}
+
 /**
  * @defgroup General General
  */
@@ -565,6 +611,8 @@ elm_quicklaunch_shutdown(void)
        _elm_log_dom = -1;
      }
 
+   _elm_widtype_clear();
+   
    eina_shutdown();
 }
 
@@ -1313,6 +1361,66 @@ elm_object_scroll_freeze_push(Evas_Object *obj)
 }
 
 /**
+ * Lock the scrolling of the given widget (and thus all parents)
+ *
+ * This locks the given object from scrolling in the X axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
+ *
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
+ */
+EAPI void
+elm_object_scroll_lock_x_set(Evas_Object *obj, Eina_Bool lock)
+{
+   elm_widget_drag_lock_x_set(obj, lock);
+}
+
+/**
+ * Lock the scrolling of the given widget (and thus all parents)
+ *
+ * This locks the given object from scrolling in the Y axis (and implicitly
+ * also locks all parent scrollers too from doing the same).
+ *
+ * @param obj The object
+ * @param lock The lock state (1 == locked, 0 == unlocked)
+ * @ingroup Scrollhints
+ */
+EAPI void
+elm_object_scroll_lock_y_set(Evas_Object *obj, Eina_Bool lock)
+{
+   elm_widget_drag_lock_y_set(obj, lock);
+}
+
+/**
+ * Get the scrolling lock of the given widget
+ *
+ * This gets the lock for X axis scrolling.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
+ */
+EAPI Eina_Bool
+elm_object_scroll_lock_x_get(const Evas_Object *obj)
+{
+   return elm_widget_drag_lock_x_get(obj);
+}
+
+/**
+ * Get the scrolling lock of the given widget
+ *
+ * This gets the lock for X axis scrolling.
+ *
+ * @param obj The object
+ * @ingroup Scrollhints
+ */
+EAPI Eina_Bool
+elm_object_scroll_lock_y_get(const Evas_Object *obj)
+{
+   return elm_widget_drag_lock_y_get(obj);
+}
+
+/**
  * Pop the scroll freeze by 1
  *
  * This decrements the scroll freeze count by one. If it is more than 0 it will
@@ -1362,6 +1470,19 @@ elm_object_parent_widget_get(const Evas_Object *obj)
 }
 
 /**
+ * Get the top level parent of an Elementary widget.
+ *
+ * @param obj The object to query.
+ * @return The top level Elementary widget, or @c NULL if parent cannot be
+ * found.
+ */
+EAPI Evas_Object *
+elm_object_top_widget_get(const Evas_Object *obj)
+{
+   return elm_widget_top_get(obj);
+}
+
+/**
  * Get the string that represents this Elementary widget.
  *
  * @note Elementary is weird and exposes itself as a single
@@ -1379,3 +1500,62 @@ elm_object_widget_type_get(const Evas_Object *obj)
 {
    return elm_widget_type_get(obj);
 }
+
+/**
+ * Send a signal to the widget edje object.
+ *
+ * This function sends a signal to the edje object of the obj. An edje program
+ * can respond to a signal by specifying matching 'signal' and
+ * 'source' fields.
+ *
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @ingroup General
+ */
+EAPI void elm_object_signal_emit(Evas_Object *obj, const char *emission, const char *source)
+{
+    elm_widget_signal_emit(obj, emission, source);
+}
+
+/**
+ * Add a callback for a signal emitted by widget edje object.
+ *
+ * This function connects a callback function to a signal emitted by the
+ * edje object of the obj.
+ * Globs can occur in either the emission or source name.
+ *
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @param func The callback function to be executed when the signal is
+ * emitted.
+ * @param data A pointer to data to pass in to the callback function.
+ * @ingroup General
+ */
+EAPI void elm_object_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+{
+    elm_widget_signal_callback_add(obj, emission, source, func, data);
+}
+
+/**
+ * Remove a signal-triggered callback from an widget edje object.
+ *
+ * This function removes a callback, previoulsy attached to a signal emitted
+ * by the edje object of the obj.
+ * The parameters emission, source and func must match exactly those passed to
+ * a previous call to elm_object_signal_callback_add(). The data pointer that
+ * was passed to this call will be returned.
+ *
+ * @param obj The object
+ * @param emission The signal's name.
+ * @param source The signal's source.
+ * @param func The callback function to be executed when the signal is
+ * emitted.
+ * @return The data pointer
+ * @ingroup General
+ */
+EAPI void *elm_object_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
+{
+    return elm_widget_signal_callback_del(obj, emission, source, func);
+}
index 945a2b2..7f59e5d 100644 (file)
@@ -1,7 +1,3 @@
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -197,6 +193,7 @@ struct _Widget_Data
    Evas_Object *scr;
    Evas_Object *pan_smart;
    Evas_Object *rect;
+   Evas_Object *sep_maps_markers; //map objects are below this object and marker objects are on top
    Pan *pan;
    Evas_Coord pan_x, pan_y, minw, minh;
 
@@ -796,10 +793,10 @@ grid_load(Evas_Object *obj, Grid *g)
                     (gi->img, EVAS_IMAGE_SCALE_HINT_DYNAMIC);
                  evas_object_image_filled_set(gi->img, 1);
                   
-                 evas_object_smart_member_add(gi->img,
-                                               wd->pan_smart);
+                 evas_object_smart_member_add(gi->img, wd->pan_smart);
                  elm_widget_sub_object_add(obj, gi->img);
                  evas_object_pass_events_set(gi->img, 1);
+                 evas_object_stack_below(gi->img, wd->sep_maps_markers);
                   
                  /*gi->txt = evas_object_text_add(evas_object_evas_get(obj));
                    evas_object_text_font_set(gi->txt, "Vera", 12);
@@ -914,15 +911,15 @@ _grid_raise(Grid *g)
    eina_iterator_free(it);
 }
 
-static int
+static Eina_Bool
 _scr_timeout(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->nosmooth--;
    if (wd->nosmooth == 0) _smooth_update(data);
    wd->scr_timer = NULL;
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -939,7 +936,7 @@ _scr(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
    wd->scr_timer = ecore_timer_add(0.5, _scr_timeout, data);
 }
 
-static int
+static Eina_Bool
 zoom_do(Evas_Object *obj, double t)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -980,12 +977,12 @@ zoom_do(Evas_Object *obj, double t)
    wd->calc_job = ecore_job_add(_calc_job, wd);
    if (t >= 1.0)
      {
-       return 0;
+       return ECORE_CALLBACK_CANCEL;
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
-static int
+static Eina_Bool
 _zoom_anim(void *data)
 {
    Evas_Object *obj = data;
@@ -993,7 +990,7 @@ _zoom_anim(void *data)
    double t;
    int go;
 
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    t = ecore_loop_time_get();
    if (t >= wd->t_end)
      t = 1.0;
@@ -1014,15 +1011,15 @@ _zoom_anim(void *data)
    return go;
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->long_timer = NULL;
    wd->longpressed = EINA_TRUE;
    evas_object_smart_callback_call(data, SIG_LONGPRESSED, NULL);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -1072,6 +1069,7 @@ _del_hook(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
+
    EINA_LIST_FREE(wd->groups_clas, group_clas)
      {
        if (group_clas->style)
@@ -1131,6 +1129,7 @@ _del_pre_hook(Evas_Object *obj)
        eina_matrixsparse_free(wd->markers[i]);
      }
 
+   evas_object_del(wd->sep_maps_markers);
    evas_object_del(wd->pan_smart);
    wd->pan_smart = NULL;
 }
@@ -1397,7 +1396,8 @@ _group_object_create(Marker_Group *group)
         
        evas_object_smart_member_add(group->obj, group->wd->pan_smart);
        elm_widget_sub_object_add(group->wd->obj, group->obj);
-        
+       evas_object_stack_above(group->obj, group->wd->sep_maps_markers);
+
        if (!group->delete_object)
          group->clas->priv.objs_used = eina_list_append(group->clas->priv.objs_used, group->obj);
      }
@@ -1743,6 +1743,9 @@ elm_map_add(Evas_Object *parent)
 
    wd->calc_job = ecore_job_add(_calc_job, wd);
 
+   wd->sep_maps_markers = evas_object_rectangle_add(evas_object_evas_get(obj));
+   evas_object_smart_member_add(wd->sep_maps_markers, wd->pan_smart);
+
    // TODO: convert Elementary to subclassing of Evas_Smart_Class
    // TODO: and save some bytes, making descriptions per-class and not instance!
    evas_object_smart_callbacks_descriptions_set(obj, _signals);
@@ -2458,9 +2461,11 @@ elm_map_marker_remove(Elm_Map_Marker *marker)
 {
    int i;
    Eina_List *groups;
-   Widget_Data *wd = marker->wd;
+   Widget_Data *wd;
 
    if (!marker) return;
+   wd = marker->wd;
+   if (!wd) return;
    for (i = 0; i <= ZOOM_MAX; i++)
      {
        marker->groups[i]->markers = eina_list_remove(marker->groups[i]->markers, marker);
index 023c4ae..2ddaad6 100644 (file)
@@ -175,6 +175,10 @@ elm_mapbuf_add(Evas_Object *parent)
 /**
  * Set the mapbuf front content
  *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_mapbuf_content_unset() function.
+ *
  * @param obj The mapbuf object
  * @param content The content will be filled in this mapbuf object
  *
@@ -187,25 +191,45 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    if (wd->content == content) return;
-   if ((wd->content != content) && (wd->content))
-     {
-        elm_widget_sub_object_del(obj, wd->content);
-        evas_object_smart_member_del(wd->content);
-     }
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
    if (content)
      {
        elm_widget_sub_object_add(content, obj);
-        evas_object_smart_member_add(content, obj);
-       evas_object_event_callback_add(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+       evas_object_smart_member_add(content, obj);
+       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
    _configure(obj);
 }
 
 /**
+ * Unset the mapbuf front content
+ *
+ * Unparent and return the content object which was set for this widget.
+ *
+ * @param obj The mapbuf object
+ * @return The content that was being used
+ *
+ * @ingroup Mapbuf
+ */
+EAPI Evas_Object *
+elm_mapbuf_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   evas_object_smart_member_del(wd->content);
+   wd->content = NULL;
+   return content;
+}
+
+/**
  * Set the mapbuf enabled state
  *
  * @param obj The mapbuf object
index 85d9ca9..8ef1459 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -80,7 +77,6 @@ _del_hook(Evas_Object *obj)
             ll = eina_list_append(ll, item->items);
             if (item->del_cb) item->del_cb((void*)item->data, item->o, item);
             if (item->label) eina_stringshare_del(item->label);
-            if (item->icon) evas_object_del(item->icon);
             if (item->hv) evas_object_del(item->hv);
             if (item->location) evas_object_del(item->location);
             free(item);
@@ -597,6 +593,8 @@ elm_menu_item_label_get(Elm_Menu_Item *item)
 /**
  * Set the icon of a menu item
  *
+ * Once the icon object is set, a previously set one will be deleted.
+ *
  * @param it The menu item object.
  * @param icon The icon object to set for @p item
  *
@@ -605,24 +603,21 @@ elm_menu_item_label_get(Elm_Menu_Item *item)
 EAPI void
 elm_menu_item_icon_set(Elm_Menu_Item *item, Evas_Object *icon)
 {
-   if ((item->icon != icon) && (item->icon))
-     elm_widget_sub_object_del(item->menu, item->icon);
-   if ((icon) && (item->icon != icon))
+   if(item->icon == icon) return;
+   if (item->icon) evas_object_del(item->icon);
+   item->icon = icon;
+   if (icon)
      {
-       item->icon = icon;
        elm_widget_sub_object_add(item->menu, icon);
        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, item->menu);
+                                       _changed_size_hints, item->menu);
        edje_object_part_swallow(item->o, "elm.swallow.content", icon);
        edje_object_signal_emit(item->o, "elm,state,icon,visible", "elm");
        edje_object_message_signal_process(item->o);
-       _sizing_eval(item->menu);
      }
-   else
-     item->icon = icon;
+   _sizing_eval(item->menu);
 }
 
-
 /**
  * Set the disabled state of @p item.
  *
index 1232a90..419e73c 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -54,7 +51,6 @@ _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   elm_notify_content_set(obj, NULL);
    elm_notify_parent_set(obj, NULL);
    elm_notify_repeat_events_set(obj, EINA_TRUE);
    if (wd->timer)
@@ -66,13 +62,60 @@ _del_hook(Evas_Object *obj)
 }
 
 static void
+_notify_theme_apply(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   const char *style = elm_widget_style_get(obj);
+
+   switch (wd->orient)
+     {
+      case ELM_NOTIFY_ORIENT_TOP:
+        _elm_theme_object_set(obj, wd->notify, "notify", "top", style);
+        break;
+      case ELM_NOTIFY_ORIENT_CENTER:
+        _elm_theme_object_set(obj, wd->notify, "notify", "center", style);
+        break;
+      case ELM_NOTIFY_ORIENT_BOTTOM:
+        _elm_theme_object_set(obj, wd->notify, "notify", "bottom", style);
+        break;
+      case ELM_NOTIFY_ORIENT_LEFT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "left", style);
+        break;
+      case ELM_NOTIFY_ORIENT_RIGHT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "right", style);
+        break;
+      case ELM_NOTIFY_ORIENT_TOP_LEFT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "top_left", style);
+        break;
+      case ELM_NOTIFY_ORIENT_TOP_RIGHT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "top_right", style);
+        break;
+      case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "bottom_left", style);
+        break;
+      case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
+        _elm_theme_object_set(obj, wd->notify, "notify", "bottom_right", style);
+        break;
+      case ELM_NOTIFY_ORIENT_LAST:
+        break;
+     }
+}
+
+static void
+_block_events_theme_apply(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   const char *style = elm_widget_style_get(obj);
+   _elm_theme_object_set(obj, wd->block_events, "notify", "block_events", style);
+}
+
+static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   _elm_theme_object_set(obj, wd->notify, "notify", "base", "default");
-   if (wd->block_events)
-     _elm_theme_object_set(obj, wd->block_events, "notify", "block_events", "default");
+   _notify_theme_apply(obj);
+   if (wd->block_events) _block_events_theme_apply(obj);
    edje_object_scale_set(wd->notify, elm_widget_scale_get(obj) *
                          _elm_config->scale);
    _sizing_eval(obj);
@@ -93,15 +136,24 @@ _sizing_eval(Evas_Object *obj)
 static void
 _changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
-   _sizing_eval(data);
+   _calc(data);
 }
 
 static void
 _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *sub = event_info;
    if (!wd) return;
-   if (event_info == wd->content) wd->content = NULL;
+
+   if (sub == wd->content)
+     {
+       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                            _changed_size_hints, obj);
+       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_RESIZE,
+                                            _content_resize, obj);
+       wd->content = NULL;
+     }
 }
 
 static void
@@ -130,9 +182,11 @@ _calc(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord minw = -1, minh = -1;
    Evas_Coord x, y, w, h;
+
    if (!wd) return;
    evas_object_geometry_get(obj, &x, &y, &w, &h);
-   edje_object_size_min_calc(wd->notify, &minw, &minh);
+   edje_object_size_min_get(wd->notify, &minw, &minh);
+   edje_object_size_min_restricted_calc(wd->notify, &minw, &minh, minw, minh);
 
    if (wd->content)
      {
@@ -168,21 +222,23 @@ _calc(Evas_Object *obj)
           case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
              evas_object_move(wd->notify, x + w - minw, y + h - minh);
              break;
+           case ELM_NOTIFY_ORIENT_LAST:
+             break;
          }
         evas_object_resize(wd->notify, minw, minh);
      }
     _sizing_eval(obj);
 }
 
-static int
+static Eina_Bool
 _timer_cb(void *data)
 {
    Evas_Object *obj = data;
    Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->timer = NULL;
    evas_object_hide(obj);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -264,6 +320,7 @@ elm_notify_add(Evas_Object *parent)
    wd->repeat_events = EINA_TRUE;
 
    wd->notify = edje_object_add(e);
+   wd->orient = -1;
    elm_notify_orient_set(obj, ELM_NOTIFY_ORIENT_TOP);
 
    elm_notify_parent_set(obj, parent);
@@ -279,7 +336,11 @@ elm_notify_add(Evas_Object *parent)
 }
 
 /**
- * Set the notify content
+ * Set the content of the notify widget
+ *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_notify_content_unset() function.
  *
  * @param obj The notify object
  * @param content The content will be filled in this notify object
@@ -292,34 +353,67 @@ elm_notify_content_set(Evas_Object *obj, Evas_Object *content)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (wd->content)
-     {
-       evas_object_event_callback_del_full(wd->content,
-                                            EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                            _changed_size_hints, obj);
-        evas_object_event_callback_del_full(wd->content, EVAS_CALLBACK_RESIZE,
-                                            _content_resize, obj);
-       evas_object_del(wd->content);
-       wd->content = NULL;
-     }
-   
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
+   wd->content = content;
+
    if (content)
      {
        elm_widget_sub_object_add(obj, content);
-       wd->content = content;
-       evas_object_event_callback_add(content,
-                                       EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                       _changed_size_hints, obj);
+       evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                      _changed_size_hints, obj);
        evas_object_event_callback_add(content, EVAS_CALLBACK_RESIZE,
-                                       _content_resize, obj);
+                                      _content_resize, obj);
        edje_object_part_swallow(wd->notify, "elm.swallow.content", content);
-        
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
    _calc(obj);
 }
 
 /**
+ * Unset the content of the notify widget
+ *
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The notify object
+ * @return The content that was being used
+ *
+ * @ingroup Notify
+ */
+EAPI Evas_Object *
+elm_notify_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->notify, wd->content);
+   wd->content = NULL;
+   return content;
+}
+
+/**
+ * Return the content of the notify widget
+ *
+ * @param obj The notify object
+ * @return The content that is being used
+ *
+ * @ingroup Notify
+ */
+EAPI Evas_Object *
+elm_notify_content_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   if ((!wd) || (!wd->content)) return NULL;
+   return wd->content;
+}
+
+/**
  * Set the notify parent
  *
  * @param obj The notify object
@@ -381,41 +475,26 @@ elm_notify_orient_set(Evas_Object *obj, Elm_Notify_Orient orient)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
+   if (wd->orient == orient) return;
    wd->orient = orient;
-   switch (orient)
-     {
-     case ELM_NOTIFY_ORIENT_TOP:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "default");
-        break;
-     case ELM_NOTIFY_ORIENT_CENTER:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "center");
-        break;
-     case ELM_NOTIFY_ORIENT_BOTTOM:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "bottom");
-        break;
-     case ELM_NOTIFY_ORIENT_LEFT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "left");
-        break;
-     case ELM_NOTIFY_ORIENT_RIGHT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "right");
-        break;
-     case ELM_NOTIFY_ORIENT_TOP_LEFT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "top_left");
-        break;
-     case ELM_NOTIFY_ORIENT_TOP_RIGHT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "top_right");
-        break;
-     case ELM_NOTIFY_ORIENT_BOTTOM_LEFT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "bottom_left");
-        break;
-     case ELM_NOTIFY_ORIENT_BOTTOM_RIGHT:
-        _elm_theme_object_set(obj, wd->notify, "notify", "base", "bottom_right");
-        break;
-     }
+   _notify_theme_apply(obj);
    _resize(obj, NULL, obj, NULL);
 }
 
 /**
+ * Return the orientation
+ * @param obj the notify objects
+ */
+EAPI Elm_Notify_Orient
+elm_notify_orient_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return -1;
+   return wd->orient;
+}
+
+/**
  * Set the time before the notify window is hidden. <br>
  * Set a value < 0 to disable the timer
  *
@@ -433,6 +512,19 @@ elm_notify_timeout_set(Evas_Object *obj, int timeout)
 }
 
 /**
+ * Return the timeout value (in seconds)
+ * @param obj the notify object
+ */
+EAPI int
+elm_notify_timeout_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) -1;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return -1;
+   return wd->timeout;
+}
+
+/**
  * Re-init the timer
  * @param obj The notify object
  */
@@ -469,7 +561,7 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
    if (!repeat)
      {
        wd->block_events = edje_object_add(evas_object_evas_get(obj));
-       _elm_theme_object_set(obj, wd->block_events, "notify", "block_events", "default");
+       _block_events_theme_apply(obj);
         elm_widget_resize_object_set(obj, wd->block_events);
        edje_object_signal_callback_add(wd->block_events, "elm,action,clicked", "elm", _signal_block_clicked, obj);
      }
@@ -477,3 +569,16 @@ elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat)
      evas_object_del(wd->block_events);
 }
 
+/**
+ * Return true if events are repeat below the notify object
+ * @param obj the notify object
+ */
+EAPI Eina_Bool
+elm_notify_repeat_events_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_FALSE;
+   return wd->repeat_events;
+}
+
index b1c0299..b04e533 100644 (file)
@@ -111,7 +111,10 @@ _eval_top(Evas_Object *obj)
        if (wd->top)
          {
             o = wd->top->base;
-            edje_object_signal_emit(o, "elm,action,hide", "elm");
+            if (wd->top->popme)
+               edje_object_signal_emit(o, "elm,action,pop", "elm");
+            else
+               edje_object_signal_emit(o, "elm,action,hide", "elm");
             onhide = edje_object_data_get(o, "onhide");
             if (onhide)
               {
@@ -119,10 +122,14 @@ _eval_top(Evas_Object *obj)
                  else if (!strcmp(onhide, "lower")) evas_object_lower(o);
               }
          }
+       wd->oldtop = wd->top;
        wd->top = ittop;
        o = wd->top->base;
        evas_object_show(o);
-       edje_object_signal_emit(o, "elm,action,show", "elm");
+       if (wd->oldtop && wd->oldtop->popme)
+           edje_object_signal_emit(o, "elm,action,show", "elm");
+       else
+           edje_object_signal_emit(o, "elm,action,push", "elm");
        onshow = edje_object_data_get(o, "onshow");
        if (onshow)
          {
@@ -271,7 +278,7 @@ elm_pager_content_push(Evas_Object *obj, Evas_Object *content)
                                    _signal_hide_finished, it);
    evas_object_event_callback_add(it->content,
                                   EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                 _changed_size_hints, it);
+                                  _changed_size_hints, it);
    edje_object_part_swallow(it->base, "elm.swallow.content", it->content);
    edje_object_size_min_calc(it->base, &it->minw, &it->minh);
    evas_object_show(it->content);
@@ -313,7 +320,7 @@ elm_pager_content_pop(Evas_Object *obj)
 
             wd->top = it;
             o = wd->top->base;
-            edje_object_signal_emit(o, "elm,action,hide", "elm");
+            edje_object_signal_emit(o, "elm,action,pop", "elm");
             onhide = edje_object_data_get(o, "onhide");
             if (onhide)
               {
index ee7b844..f06864f 100644 (file)
@@ -20,7 +20,7 @@
 typedef struct _Widget_Data Widget_Data;
 struct _Widget_Data 
 {
-   Evas_Object *scr, *bx;
+   Evas_Object *scr, *bx, *content;
    Elm_Panel_Orient orient;
    Eina_Bool hidden : 1;
 };
@@ -235,25 +235,58 @@ elm_panel_orient_get(Evas_Object *obj)
 /**
  * Set the content of the panel.
  *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_panel_content_unset() function.
+ *
  * @param obj The panel object
  * @param content The panel content
  *
  * @ingroup Panel
  */
-EAPI void 
-elm_panel_content_set(Evas_Object *obj, Evas_Object *content) 
+EAPI void
+elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   evas_object_box_remove_all(wd->bx, EINA_TRUE);
-   if (!content) return;
-   evas_object_box_append(wd->bx, content);
-   evas_object_show(content);
+   if (wd->content == content) return;
+   if (wd->content)
+     evas_object_box_remove_all(wd->bx, EINA_TRUE);
+   wd->content = content;
+   if (content)
+     {
+       evas_object_box_append(wd->bx, wd->content);
+       evas_object_show(wd->content);
+     }
    _sizing_eval(obj);
 }
 
 /**
+ * Unset the content of the panel.
+ *
+ * Unparent and return the content object which was set for this widget.
+ *
+ * @param obj The panel object
+ * @return The content that was being used
+ *
+ * @ingroup Panel
+ */
+EAPI Evas_Object *
+elm_panel_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   evas_object_box_remove_all(wd->bx, EINA_FALSE);
+   wd->content = NULL;
+   return content;
+}
+
+/**
  * Set the state of the panel.
  *
  * @param obj The panel object
diff --git a/src/lib/elm_panes.c b/src/lib/elm_panes.c
new file mode 100644 (file)
index 0000000..7d8ec4c
--- /dev/null
@@ -0,0 +1,279 @@
+#include <Elementary.h>
+#include "elm_priv.h"
+
+/**
+ * @defgroup Panes panes
+ *
+ */
+
+typedef struct _Widget_Data Widget_Data;
+
+struct _Widget_Data
+{
+   Evas_Object *panes;
+
+   struct
+     {
+       Evas_Object *left;
+       Evas_Object *right;
+     } contents;
+
+   struct
+     {
+       int x_diff;
+       int y_diff;
+       Eina_Bool move;
+     } move;
+
+   Eina_Bool clicked_double;
+   Eina_Bool horizontal;
+};
+
+static const char *widtype = NULL;
+static void _del_hook(Evas_Object *obj);
+static void _theme_hook(Evas_Object *obj);
+static void _sizing_eval(Evas_Object *obj);
+static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
+
+static void
+_del_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   free(wd);
+}
+
+static void
+_theme_hook(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   const char *style = elm_widget_style_get(obj);
+
+   if (!wd) return;
+   if (wd->horizontal)
+     _elm_theme_object_set(obj, wd->panes, "panes", "horizontal", style);
+   else
+     _elm_theme_object_set(obj, wd->panes, "panes", "vertical", style);
+
+   if (wd->contents.left)
+     edje_object_part_swallow(wd->panes, "elm.swallow.left", wd->contents.right);
+   if (wd->contents.right)
+     edje_object_part_swallow(wd->panes, "elm.swallow.right", wd->contents.right);
+
+   edje_object_scale_set(wd->panes, elm_widget_scale_get(obj) *
+                         _elm_config->scale);
+   _sizing_eval(obj);
+}
+
+static void
+_sizing_eval(Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+}
+
+static void
+_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   _sizing_eval(data);
+}
+
+static void
+_sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *sub = event_info;
+
+   if (!wd) return;
+   if (sub == wd->contents.left)
+     {
+       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                            _changed_size_hints, obj);
+       wd->contents.left = NULL;
+       _sizing_eval(obj);
+     }
+   else if (sub == wd->contents.right)
+     {
+       evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+                                            _changed_size_hints, obj);
+       wd->contents.right= NULL;
+       _sizing_eval(obj);
+     }
+}
+
+static void
+_clicked(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+   evas_object_smart_callback_call(data, "clicked", NULL);
+}
+
+static void
+_clicked_double(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+   Widget_Data *wd = elm_widget_data_get(data);
+
+   wd->clicked_double = EINA_TRUE;
+}
+
+static void
+_press(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+   evas_object_smart_callback_call(data, "press", NULL);
+}
+
+static void
+_unpress(void *data, Evas_Object *obj __UNUSED__ , const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+   Widget_Data *wd = elm_widget_data_get(data);
+   evas_object_smart_callback_call(data, "unpress", NULL);
+
+   if (wd->clicked_double)
+     {
+       evas_object_smart_callback_call(data, "clicked,double", NULL);
+       wd->clicked_double = EINA_FALSE;
+     }
+}
+
+/**
+ * Add a new panes to the parent
+ *
+ * @param parent The parent object
+ * @return The new object or NULL if it cannot be created
+ *
+ * @ingroup Panel
+ */
+EAPI Evas_Object *
+elm_panes_add(Evas_Object *parent)
+{
+   Evas_Object *obj;
+   Evas *e;
+   Widget_Data *wd;
+
+   wd = ELM_NEW(Widget_Data);
+   e = evas_object_evas_get(parent);
+   obj = elm_widget_add(e);
+   ELM_SET_WIDTYPE(widtype, "panes");
+   elm_widget_type_set(obj, "panes");
+   elm_widget_sub_object_add(parent, obj);
+   elm_widget_data_set(obj, wd);
+   elm_widget_del_hook_set(obj, _del_hook);
+   elm_widget_theme_hook_set(obj, _theme_hook);
+
+   wd->panes = edje_object_add(e);
+   _elm_theme_object_set(obj, wd->panes, "panes", "vertical", "default");
+   elm_widget_resize_object_set(obj, wd->panes);
+   evas_object_show(wd->panes);
+
+   elm_panes_content_left_size_set(obj, 0.5);
+
+   edje_object_signal_callback_add(wd->panes, "elm,action,click", "", 
+                                   _clicked, obj);
+   edje_object_signal_callback_add(wd->panes, "elm,action,click,double", "", 
+                                   _clicked_double, obj);
+   edje_object_signal_callback_add(wd->panes, "elm,action,press", "", 
+                                   _press, obj);
+   edje_object_signal_callback_add(wd->panes, "elm,action,unpress", "", 
+                                   _unpress, obj);
+
+   evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+   evas_object_event_callback_add(obj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 
+                                  _changed_size_hints, obj);
+
+   _sizing_eval(obj);
+   return obj;
+}
+
+EAPI void elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   if (wd->contents.left)
+     {
+       evas_object_del(wd->contents.left);
+       wd->contents.left = NULL;
+     }
+
+   if (content)
+     {
+       wd->contents.left = content;
+       elm_widget_sub_object_add(obj, content);
+       edje_object_part_swallow(wd->panes, "elm.swallow.left", content);
+     }
+}
+
+
+EAPI void elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   if (wd->contents.right)
+     {
+       evas_object_del(wd->contents.right);
+       wd->contents.right = NULL;
+     }
+
+   if (content)
+     {
+       wd->contents.right = content;
+       elm_widget_sub_object_add(obj, content);
+       edje_object_part_swallow(wd->panes, "elm.swallow.right", content);
+     }
+}
+
+
+EAPI Evas_Object
+*elm_panes_content_left_get(const Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   return wd->contents.left;
+}
+
+EAPI Evas_Object
+*elm_panes_content_right_get(const Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   return wd->contents.right;
+}
+
+EAPI double 
+elm_panes_content_left_size_get(const Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   double w, h;
+
+   edje_object_part_drag_value_get(wd->panes, "elm.bar", &w, &h);
+
+   if (wd->horizontal)
+     return h;
+   else
+     return w;
+}
+
+EAPI void 
+elm_panes_content_left_size_set(Evas_Object *obj, double size)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   if (wd->horizontal)
+     edje_object_part_drag_value_set(wd->panes, "elm.bar", 0.0, size);
+   else
+     edje_object_part_drag_value_set(wd->panes, "elm.bar", size, 0.0);
+}
+
+EAPI void 
+elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   wd->horizontal = horizontal;
+   _theme_hook(obj);
+   elm_panes_content_left_size_set(obj, 0.5);
+}
+
+EAPI Eina_Bool 
+elm_panes_horizontal_is(const Evas_Object *obj)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+
+   return wd->horizontal;
+}
index 8d8b8ab..7ab57f1 100644 (file)
@@ -20,6 +20,7 @@ struct _Widget_Data
    Evas_Object *frm;
    Evas_Object *img;
    int size;
+   Eina_Bool fill;
 };
 
 static const char *widtype = NULL;
@@ -41,6 +42,8 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
+   _elm_theme_object_set(obj, wd->frm, "photo", "base", elm_widget_style_get(obj));
+   edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->img);
    edje_object_scale_set(wd->frm, elm_widget_scale_get(obj) * _elm_config->scale);
    _sizing_eval(obj);
 }
@@ -51,19 +54,42 @@ _sizing_eval(Evas_Object *obj)
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
    if (!wd) return;
-   evas_object_size_hint_min_set(wd->img,
-                                wd->size * elm_widget_scale_get(obj) * _elm_config->scale,
-                                wd->size * elm_widget_scale_get(obj) * _elm_config->scale);
-   edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->img);
-   elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   edje_object_size_min_restricted_calc(wd->frm, &minw, &minh, minw, minh);
-   elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   maxw = minw;
-   maxh = minh;
-   evas_object_size_hint_min_set(obj, minw, minh);
-   evas_object_size_hint_max_set(obj, maxw, maxh);
+
+   if(wd->size > 0) {
+          evas_object_size_hint_min_set(wd->img,
+                          wd->size * elm_widget_scale_get(obj) * _elm_config->scale,
+                          wd->size * elm_widget_scale_get(obj) * _elm_config->scale);
+          edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->img);
+          elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+          edje_object_size_min_restricted_calc(wd->frm, &minw, &minh, minw, minh);
+          elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+          maxw = minw;
+          maxh = minh;
+          evas_object_size_hint_min_set(obj, minw, minh);
+          evas_object_size_hint_max_set(obj, maxw, maxh);
+   }
+}
+
+static void
+_icon_move_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+       Evas_Coord w, h;
+       Widget_Data *wd = elm_widget_data_get(data);
+       if (!wd) return;
+
+       if(wd->fill) {
+               Evas_Object *icon = _els_smart_icon_object_get(wd->img);
+               evas_object_geometry_get(icon, NULL, NULL, &w, &h);
+               Edje_Message_Int_Set *msg = alloca(sizeof(Edje_Message_Int_Set) + (sizeof(int)));
+               msg->count=2;
+               msg->val[0] = (int)w;
+               msg->val[1] = (int)h;
+
+               edje_object_message_send(wd->frm, EDJE_MESSAGE_INT_SET, 0, msg);
+       }
 }
 
+
 static void
 _mouse_up(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
@@ -84,6 +110,7 @@ elm_photo_add(Evas_Object *parent)
    Evas_Object *obj;
    Evas *e;
    Widget_Data *wd;
+   Evas_Object *icon;
 
    wd = ELM_NEW(Widget_Data);
    e = evas_object_evas_get(parent);
@@ -105,6 +132,8 @@ elm_photo_add(Evas_Object *parent)
    _els_smart_icon_scale_down_set(wd->img, 1);
    _els_smart_icon_smooth_scale_set(wd->img, 1);
    _els_smart_icon_fill_inside_set(wd->img, 0);
+   _els_smart_icon_scale_size_set(wd->img, 0);
+   wd->fill = EINA_FALSE;
    _els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) * _elm_config->scale);
    evas_object_event_callback_add(wd->img, EVAS_CALLBACK_MOUSE_UP,
                                  _mouse_up, obj);
@@ -113,8 +142,12 @@ elm_photo_add(Evas_Object *parent)
    evas_object_show(wd->img);
    elm_widget_sub_object_add(obj, wd->img);
 
-   wd->size = 40;
 
+   icon = _els_smart_icon_object_get(wd->img);
+   evas_object_event_callback_add(icon, EVAS_CALLBACK_MOVE,
+                                 _icon_move_resize, obj);
+   evas_object_event_callback_add(icon, EVAS_CALLBACK_RESIZE,
+                                 _icon_move_resize, obj);
    _sizing_eval(obj);
    return obj;
 }
@@ -134,9 +167,11 @@ elm_photo_file_set(Evas_Object *obj, const char *file)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
    Widget_Data *wd = elm_widget_data_get(obj);
+
    if (!wd) return EINA_FALSE;
    if (!_els_smart_icon_file_key_set(wd->img, file, NULL))
      return EINA_FALSE;
+
    _sizing_eval(obj);
    return EINA_TRUE;
 }
@@ -155,7 +190,32 @@ elm_photo_size_set(Evas_Object *obj, int size)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if (size < 0) size = 0;
    wd->size = size;
+
+   if(size >= 0)
+          _els_smart_icon_scale_size_set(wd->img, size);
+   else
+          _els_smart_icon_scale_size_set(wd->img, 0);
+
    _sizing_eval(obj);
 }
+
+/**
+ * Set if the photo should be completely visible or not.
+ *
+ * @param obj The photo object
+ * @param fill if true the photo will be completely visible
+ *
+ * @ingroup Photo
+ */
+EAPI void
+elm_photo_fill_inside_set(Evas_Object *obj, Eina_Bool fill)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   _els_smart_icon_fill_inside_set(wd->img, fill);
+   wd->fill = fill;
+   _sizing_eval(obj);
+}
+
index 183ec05..e9252ef 100644 (file)
@@ -501,15 +501,15 @@ _grid_raise(Grid *g)
      }
 }
 
-static int
+static Eina_Bool
 _scr_timeout(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->nosmooth--;
    if (wd->nosmooth == 0) _smooth_update(data);
    wd->scr_timer = NULL;
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -553,12 +553,12 @@ _main_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void
      }
 }
 
-static int
+static Eina_Bool
 zoom_do(Evas_Object *obj, double t)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    Evas_Coord xx, yy, ow, oh;
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->size.w = (wd->size.ow * (1.0 - t)) + (wd->size.nw * t);
    wd->size.h = (wd->size.oh * (1.0 - t)) + (wd->size.nh * t);
    elm_smart_scroller_child_viewport_size_get(wd->scr, &ow, &oh);
@@ -591,20 +591,20 @@ zoom_do(Evas_Object *obj, double t)
                   free(g);
                }
           }
-        return 0;
+        return ECORE_CALLBACK_CANCEL;
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 
-static int
+static Eina_Bool
 _zoom_anim(void *data)
 {
    Evas_Object *obj = data;
    Widget_Data *wd = elm_widget_data_get(obj);
    double t;
-   int go;
-   if (!wd) return 0;
+   Eina_Bool go;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    t = ecore_loop_time_get();
    if (t >= wd->t_end)
      t = 1.0;
@@ -633,15 +633,15 @@ _mouse_move(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void
    if (!wd) return;
 }
 
-static int
+static Eina_Bool
 _long_press(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->long_timer = NULL;
    wd->longpressed = EINA_TRUE;
    evas_object_smart_callback_call(data, "longpressed", NULL);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
index b1c7002..5a1524a 100644 (file)
@@ -93,6 +93,22 @@ struct _Elm_Module
    int references;
 };
 
+
+enum _elm_sel_type {
+   ELM_SEL_PRIMARY,
+   ELM_SEL_SECONDARY,
+   ELM_SEL_CLIPBOARD,
+
+   ELM_SEL_MAX,
+};
+
+enum _elm_sel_format {
+   ELM_SEL_MARKUP      = 0x01,
+   ELM_SEL_IMAGE       = 0x02,
+};
+
+
+
 #define ELM_NEW(t) calloc(1, sizeof(t))
 
 void _elm_win_shutdown(void);
@@ -122,6 +138,9 @@ EAPI void         elm_widget_activate_hook_set(Evas_Object *obj, void (*func) (E
 EAPI void         elm_widget_disable_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
 EAPI void         elm_widget_theme_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
 EAPI void         elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj));
+EAPI void         elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source));
+EAPI void         elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data));
+EAPI void         elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void *(*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source)));
 EAPI void         elm_widget_theme(Evas_Object *obj);
 EAPI void         elm_widget_on_focus_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
 EAPI void         elm_widget_on_change_hook_set(Evas_Object *obj, void (*func) (void *data, Evas_Object *obj), void *data);
@@ -132,6 +151,9 @@ EAPI void         elm_widget_sub_object_add(Evas_Object *obj, Evas_Object *sobj)
 EAPI void         elm_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj);
 EAPI void         elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj);
 EAPI void         elm_widget_hover_object_set(Evas_Object *obj, Evas_Object *sobj);
+EAPI void         elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source);
+EAPI void         elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data);
+EAPI void         *elm_widget_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source));
 EAPI void         elm_widget_can_focus_set(Evas_Object *obj, int can_focus);
 EAPI int          elm_widget_can_focus_get(const Evas_Object *obj);
 EAPI int          elm_widget_focus_get(const Evas_Object *obj);
@@ -164,10 +186,10 @@ EAPI void         elm_widget_type_set(Evas_Object *obj, const char *type);
 EAPI const char  *elm_widget_type_get(const Evas_Object *obj);
 EAPI void         elm_widget_drag_lock_x_set(Evas_Object *obj, Eina_Bool lock);
 EAPI void         elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock);
-EAPI Eina_Bool    elm_widget_drag_lock_x_get(Evas_Object *obj);
-EAPI Eina_Bool    elm_widget_drag_lock_y_get(Evas_Object *obj);
-EAPI int          elm_widget_drag_child_locked_x_get(Evas_Object *obj);
-EAPI int          elm_widget_drag_child_locked_y_get(Evas_Object *obj);
+EAPI Eina_Bool    elm_widget_drag_lock_x_get(const Evas_Object *obj);
+EAPI Eina_Bool    elm_widget_drag_lock_y_get(const Evas_Object *obj);
+EAPI int          elm_widget_drag_child_locked_x_get(const Evas_Object *obj);
+EAPI int          elm_widget_drag_child_locked_y_get(const Evas_Object *obj);
     
 EAPI Eina_Bool    elm_widget_is(const Evas_Object *obj);
 EAPI Evas_Object *elm_widget_parent_widget_get(const Evas_Object *obj);
@@ -185,7 +207,23 @@ void              _elm_config_init(void);
 void              _elm_config_sub_init(void);
 void              _elm_config_shutdown(void);
 
-#define ELM_SET_WIDTYPE(widtype, type) if (!widtype) widtype = eina_stringshare_add(type)
+Eina_Bool        elm_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *buf);
+Eina_Bool        elm_selection_clear(enum _elm_sel_type selection, Evas_Object *widget);
+Eina_Bool        elm_selection_get(enum _elm_sel_type selection, enum _elm_sel_format format, Evas_Object *widget);
+
+Eina_Bool         _elm_dangerous_call_check(const char *call);
+
+void              _elm_widtype_register(const char **ptr);
+
+
+#define ELM_SET_WIDTYPE(widtype, type) \
+   do { \
+      if (!widtype) { \
+         widtype = eina_stringshare_add(type); \
+         _elm_widtype_register(&widtype); \
+      } \
+   } while (0)
+
 //#define ELM_CHECK_WIDTYPE(obj, widtype) if (elm_widget_type_get(obj) != widtype) return
 #define ELM_CHECK_WIDTYPE(obj, widtype) if (!_elm_widget_type_check((obj), (widtype))) return
 
index d290f1d..8de8300 100644 (file)
@@ -139,6 +139,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
        evas_object_event_callback_del_full
          (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
        wd->icon = NULL;
+       edje_object_message_signal_process(wd->progressbar);
        _sizing_eval(obj);
      }
 }
@@ -372,10 +373,7 @@ elm_progressbar_label_get(const Evas_Object *obj)
 /**
  * Set the icon object of the progressbar object
  *
- * Once the icon object is set, it will become a child of the progressbar object and
- * be deleted when the progressbar object is deleted. If another icon object is set
- * then the previous one becomes orophaned and will no longer be deleted along
- * with the progressbar.
+ * Once the icon object is set, a previously set one will be deleted.
  *
  * @param obj The progressbar object
  * @param icon The icon object
@@ -388,8 +386,8 @@ elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
    if (icon)
      {
@@ -398,8 +396,9 @@ elm_progressbar_icon_set(Evas_Object *obj, Evas_Object *icon)
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->progressbar, "elm.swallow.content", icon);
        edje_object_signal_emit(wd->progressbar, "elm,state,icon,visible", "elm");
-       _sizing_eval(obj);
+       edje_object_message_signal_process(wd->progressbar);
      }
+   _sizing_eval(obj);
 }
 
 /**
index bcc2dda..c5c878c 100644 (file)
@@ -42,7 +42,7 @@ struct _Group
 
 struct _Widget_Data
 {
-   Evas_Object *chk;
+   Evas_Object *radio;
    Evas_Object *icon;
    int value;
    const char *label;
@@ -83,22 +83,22 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   _elm_theme_object_set(obj, wd->chk, "radio", "base", elm_widget_style_get(obj));
+   _elm_theme_object_set(obj, wd->radio, "radio", "base", elm_widget_style_get(obj));
    if (wd->icon)
-     edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
    else
-     edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,icon,hidden", "elm");
    if (wd->state)
-     edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,radio,on", "elm");
    else
-     edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,radio,off", "elm");
    if (wd->label)
-     edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,text,visible", "elm");
    else
-     edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
-   edje_object_part_text_set(wd->chk, "elm.text", wd->label);
-   edje_object_message_signal_process(wd->chk);
-   edje_object_scale_set(wd->chk, elm_widget_scale_get(obj) * _elm_config->scale);
+     edje_object_signal_emit(wd->radio, "elm,state,text,hidden", "elm");
+   edje_object_part_text_set(wd->radio, "elm.text", wd->label);
+   edje_object_message_signal_process(wd->radio);
+   edje_object_scale_set(wd->radio, elm_widget_scale_get(obj) * _elm_config->scale);
    _sizing_eval(obj);
 }
 
@@ -109,11 +109,11 @@ _disable_hook(Evas_Object *obj)
    if (!wd) return;
    if (elm_widget_disabled_get(obj))
      {
-        edje_object_signal_emit(wd->chk, "elm,state,disabled", "elm");
+        edje_object_signal_emit(wd->radio, "elm,state,disabled", "elm");
         if (wd->state) _state_set(obj, 0);
      }
    else
-     edje_object_signal_emit(wd->chk, "elm,state,enabled", "elm");
+     edje_object_signal_emit(wd->radio, "elm,state,enabled", "elm");
 }
 
 static void
@@ -123,7 +123,7 @@ _sizing_eval(Evas_Object *obj)
    Evas_Coord minw = -1, minh = -1;
    if (!wd) return;
    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
-   edje_object_size_min_restricted_calc(wd->chk, &minw, &minh, minw, minh);
+   edje_object_size_min_restricted_calc(wd->radio, &minw, &minh, minw, minh);
    elm_coords_finger_size_adjust(1, &minw, 1, &minh);
    evas_object_size_hint_min_set(obj, minw, minh);
    evas_object_size_hint_max_set(obj, -1, -1);
@@ -146,7 +146,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
    if (!wd) return;
    if (sub == wd->icon)
      {
-       edje_object_signal_emit(wd->chk, "elm,state,icon,hidden", "elm");
+       edje_object_signal_emit(wd->radio, "elm,state,icon,hidden", "elm");
        evas_object_event_callback_del_full
          (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
        wd->icon = NULL;
@@ -163,9 +163,9 @@ _state_set(Evas_Object *obj, Eina_Bool state)
      {
        wd->state = state;
        if (wd->state)
-         edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
+         edje_object_signal_emit(wd->radio, "elm,state,radio,on", "elm");
        else
-         edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
+         edje_object_signal_emit(wd->radio, "elm,state,radio,off", "elm");
      }
 }
 
@@ -227,11 +227,11 @@ elm_radio_add(Evas_Object *parent)
    elm_widget_theme_hook_set(obj, _theme_hook);
    elm_widget_disable_hook_set(obj, _disable_hook);
 
-   wd->chk = edje_object_add(e);
-   _elm_theme_object_set(obj, wd->chk, "radio", "base", "default");
-   edje_object_signal_callback_add(wd->chk, "elm,action,radio,on", "", _signal_radio_on, obj);
-   edje_object_signal_callback_add(wd->chk, "elm,action,radio,toggle", "", _signal_radio_on, obj);
-   elm_widget_resize_object_set(obj, wd->chk);
+   wd->radio = edje_object_add(e);
+   _elm_theme_object_set(obj, wd->radio, "radio", "base", "default");
+   edje_object_signal_callback_add(wd->radio, "elm,action,radio,on", "", _signal_radio_on, obj);
+   edje_object_signal_callback_add(wd->radio, "elm,action,radio,toggle", "", _signal_radio_on, obj);
+   elm_widget_resize_object_set(obj, wd->radio);
 
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
 
@@ -264,15 +264,15 @@ elm_radio_label_set(Evas_Object *obj, const char *label)
    eina_stringshare_replace(&wd->label, label);
    if (label)
      {
-       edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
-       edje_object_message_signal_process(wd->chk);
+       edje_object_signal_emit(wd->radio, "elm,state,text,visible", "elm");
+       edje_object_message_signal_process(wd->radio);
      }
    else
      {
-       edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
-       edje_object_message_signal_process(wd->chk);
+       edje_object_signal_emit(wd->radio, "elm,state,text,hidden", "elm");
+       edje_object_message_signal_process(wd->radio);
      }
-   edje_object_part_text_set(wd->chk, "elm.text", label);
+   edje_object_part_text_set(wd->radio, "elm.text", label);
    _sizing_eval(obj);
 }
 
@@ -296,10 +296,7 @@ elm_radio_label_get(const Evas_Object *obj)
 /**
  * Set the icon object of the radio object
  *
- * Once the icon object is set, it will become a child of the radio object and
- * be deleted when the radio object is deleted. If another icon object is set
- * then the previous one becomes orophaned and will no longer be deleted along
- * with the radio.
+ * Once the icon object is set, a previously set one will be deleted.
  *
  * @param obj The radio object
  * @param icon The icon object
@@ -312,18 +309,19 @@ elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
    if (icon)
      {
        elm_widget_sub_object_add(obj, icon);
        evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
-       edje_object_part_swallow(wd->chk, "elm.swallow.content", icon);
-       edje_object_signal_emit(wd->chk, "elm,state,icon,visible", "elm");
-       _sizing_eval(obj);
+       edje_object_part_swallow(wd->radio, "elm.swallow.content", icon);
+       edje_object_signal_emit(wd->radio, "elm,state,icon,visible", "elm");
+       edje_object_message_signal_process(wd->radio);
      }
+   _sizing_eval(obj);
 }
 
 /**
index 2c365c8..b9c86aa 100644 (file)
@@ -75,7 +75,6 @@ static const Evas_Smart_Cb_Description _signals[] = {
 static void
 _del_hook(Evas_Object *obj)
 {
-   
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    free(wd);
@@ -97,6 +96,15 @@ _theme_hook(Evas_Object *obj)
 }
 
 static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
+        emission, source);
+}
+
+static void
 _show_region_hook(void *data, Evas_Object *obj)
 {
    
@@ -300,6 +308,7 @@ elm_scroller_add(Evas_Object *parent)
    elm_widget_data_set(obj, wd);
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
+   elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
 
    wd->widget_name = eina_stringshare_add("scroller");
    wd->widget_base = eina_stringshare_add("base");
@@ -343,9 +352,11 @@ elm_scroller_add(Evas_Object *parent)
 
 
 /**
- * Set the content object
+ * Set the content of the scroller widget (the object to be scrolled around).
  *
- * Sets the content of the scroller (the object to be scrolled around)
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_scroller_content_unset() function.
  *
  * @param obj The scroller object
  * @param content The new content object
@@ -358,8 +369,8 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->content != content) && (wd->content))
-     elm_widget_sub_object_del(obj, wd->content);
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
    if (content)
      {
@@ -369,8 +380,33 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
           elm_smart_scroller_child_set(wd->scr, content);
        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
+}
+
+/**
+ * Unset the content of the scroller widget
+ *
+ * Unparent and return the content object which was set for this widget
+ *
+ * @param obj The slider objecet
+ * @return The content that was being used
+ *
+ * @ingroup Scroller
+ */
+EAPI Evas_Object *
+elm_scroller_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   Evas_Object *content;
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->scr, wd->content);
+   wd->content = NULL;
+   return content;
 }
 
 /**
@@ -379,6 +415,8 @@ elm_scroller_content_set(Evas_Object *obj, Evas_Object *content)
  * @param obj The scroller object
  * @param widget The widget name to use (default is "scroller")
  * @param base The base name to use (default is "base")
+ *
+ * @ingroup Scroller
  */
 EAPI void
 elm_scroller_custom_widget_base_theme_set(Evas_Object *obj, const char *widget, const char *base)
@@ -546,11 +584,7 @@ elm_scroller_child_size_get(const Evas_Object *obj, Evas_Coord *w, Evas_Coord *h
  *
  * @param obj The scroller object
  * @param h_bounce Will the scroller bounce horizontally or not
- y Y coordinate of the region
- w Width of the region
- h Height of the region
-
- EAPI void elm_scroller_region_show ( Evas_Object *  obj, * @param v_bounce Will the scroller bounce vertically or not
+ * @param v_bounce Will the scroller bounce vertically or not
  *
  * @ingroup Scroller
  */
index 5b4693c..81e1785 100644 (file)
@@ -160,18 +160,19 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
        evas_object_event_callback_del_full
          (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
        wd->icon = NULL;
+       edje_object_message_signal_process(wd->slider);
        _sizing_eval(obj);
      }
 }
 
-static int
+static Eina_Bool
 _delay_change(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->delay = NULL;
    evas_object_smart_callback_call(data, SIG_DELAY_CHANGED, NULL);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -396,10 +397,7 @@ elm_slider_label_get(const Evas_Object *obj)
 /**
  * Set the icon object of the slider object
  *
- * Once the icon object is set, it will become a child of the slider object and
- * be deleted when the slider object is deleted. If another icon object is set
- * then the previous one becomes orophaned and will no longer be deleted along
- * with the slider.
+ * Once the icon object is set, a previously set one will be deleted.
  *
  * @param obj The slider object
  * @param icon The icon object
@@ -412,8 +410,8 @@ elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
    if (icon)
      {
@@ -422,8 +420,9 @@ elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon)
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->slider, "elm.swallow.content", icon);
        edje_object_signal_emit(wd->slider, "elm,state,icon,visible", "elm");
-       _sizing_eval(obj);
+       edje_object_message_signal_process(wd->slider);
      }
+   _sizing_eval(obj);
 }
 
 /**
index ec734b3..c03fb57 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -15,8 +12,7 @@
  * The slideshow use 2 callbacks to create and delete the objects displayed. When an item
  * is displayed the function itc->func.get() is called. This function should create the object,
  * for example the object can be an evas_object_image or a photocam. When a object is no more
- * displayed the function itc->func.del() is called, the user can delete or hide the object here.
- * If itc->func.del is NULL the slideshow delete the object with evas_object_del().
+ * displayed the function itc->func.del() is called, the user can delete the dana associated to the item.
  */
 
 typedef struct _Widget_Data Widget_Data;
@@ -40,6 +36,7 @@ struct _Widget_Data
    // list of Elm_Slideshow_Item*
    Eina_List *items;
    Eina_List *items_built;
+
    Elm_Slideshow_Item *current;
    Elm_Slideshow_Item *previous;
 
@@ -49,6 +46,11 @@ struct _Widget_Data
    Ecore_Timer *timer;
    int timeout;
    Eina_Bool loop:1;
+
+   struct {
+          const char *current;
+          Eina_List *list; //list of const char *
+   } layout;
 };
 
 static const char *widtype = NULL;
@@ -56,16 +58,19 @@ static void _del_hook(Evas_Object *obj);
 static void _theme_hook(Evas_Object *obj);
 static void _sizing_eval(Evas_Object *obj);
 static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int _timer_cb(void *data);
+static Eina_Bool _timer_cb(void *data);
 
 static void
 _del_hook(Evas_Object *obj)
 {
+   const char *layout;
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
    elm_slideshow_clear(obj);
    _elm_stringlist_free(wd->transitions);
    if (wd->timer) ecore_timer_del(wd->timer);
+   EINA_LIST_FREE(wd->layout.list, layout)
+          eina_stringshare_del(layout);
    free(wd);
 }
 
@@ -74,7 +79,7 @@ _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   _elm_theme_object_set(obj, wd->slideshow, "slideshow", "base", "default");
+   _elm_theme_object_set(obj, wd->slideshow, "slideshow", "base", elm_widget_style_get(obj));
    edje_object_scale_set(wd->slideshow, elm_widget_scale_get(obj) *
                          _elm_config->scale);
    _sizing_eval(obj);
@@ -91,50 +96,35 @@ _sizing_eval(Evas_Object *obj)
    evas_object_size_hint_max_set(obj, minw, minh);
 }
 
-static void
-_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+
+static Elm_Slideshow_Item* _item_prev_get(Elm_Slideshow_Item* item)
 {
-   _sizing_eval(data);
+       Widget_Data *wd = elm_widget_data_get(item->obj);
+       Elm_Slideshow_Item* prev = eina_list_data_get(eina_list_prev(item->l));
+       if(!prev && wd->loop)
+               prev = eina_list_data_get(eina_list_last(item->l));
+       return prev;
 }
-
-static void
-_sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+static Elm_Slideshow_Item* _item_next_get(Elm_Slideshow_Item* item)
 {
-   ;
+       Widget_Data *wd = elm_widget_data_get(item->obj);
+       Elm_Slideshow_Item* next = eina_list_data_get(eina_list_next(item->l));
+       if(!next && wd->loop)
+               next = eina_list_data_get(wd->items);
+       return next;
 }
 
+
 static void
-_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+_changed_size_hints(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
-   Elm_Slideshow_Item *item;
-   Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return;
-   item = wd->previous;
-   if (item && item->o)
-     {
-       edje_object_part_unswallow(NULL, item->o);
-       evas_object_hide(item->o);
-     }
-   wd->previous = NULL;
-
-   item = wd->current;
-   if (!item || !item->o) return;
-
-   edje_object_part_unswallow(NULL, item->o);
-   edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->o);
-   evas_object_show(item->o);
+   _sizing_eval(data);
 }
 
-
-static int
-_timer_cb(void *data)
+static void
+_sub_del(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
-   Evas_Object *obj = data;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return 0;
-   wd->timer = NULL;
-   elm_slideshow_next(obj);
-   return 0;
+   ;
 }
 
 static void
@@ -143,66 +133,97 @@ _item_realize(Elm_Slideshow_Item *item)
    Elm_Slideshow_Item *_item;
    Evas_Object *obj = item->obj;
    Widget_Data *wd = elm_widget_data_get(obj);
-   Evas_Coord w, h;
 
    if (!wd) return;
-   if (!item->o && item->itc->func.get)
+   if ((!item->o) && (item->itc->func.get))
      {
         item->o = item->itc->func.get((void*)item->data, obj);
         evas_object_smart_member_add(item->o, obj);
         item->l_built = eina_list_append(NULL, item);
         wd->items_built = eina_list_merge(wd->items_built, item->l_built);
+        evas_object_hide(item->o);
      }
    else if (item->l_built)
      wd->items_built = eina_list_demote_list(wd->items_built, item->l_built);
-   
-   //we pre built the next and the previous item
-   evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-   
-   _item = eina_list_data_get(eina_list_prev(item->l));
-   if (!_item && wd->loop)
-     _item = eina_list_data_get(eina_list_last(item->l));
-   if (_item && !_item->o && _item->itc->func.get)
+
+   //pre-create previous and next item
+   _item = _item_next_get(item);
+   if ((_item) && (!_item->o) && (_item->itc->func.get))
      {
-       _item->o = _item->itc->func.get((void*)_item->data, obj);
-       evas_object_hide(_item->o);
-       evas_object_resize(_item->o, w, h);
-       evas_object_smart_member_add(_item->o, obj);
-       _item->l_built = eina_list_append(NULL, _item);
+        _item->o = _item->itc->func.get((void*)_item->data, obj);
+        evas_object_smart_member_add(_item->o, obj);
+        _item->l_built = eina_list_append(NULL, _item);
         wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
+        evas_object_hide(_item->o);
      }
-   else if (_item  && _item->l_built)
+   else if ((_item) && (_item->l_built))
      wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
-   
-   
-   _item = eina_list_data_get(eina_list_next(item->l));
-   if ( !_item && wd->loop)
-     _item = eina_list_data_get(wd->items);
-   if (_item && !_item->o && _item->itc->func.get)
+
+   _item = _item_prev_get(item);
+   if ((_item) && (!_item->o) && (_item->itc->func.get))
      {
         _item->o = _item->itc->func.get((void*)_item->data, obj);
-        evas_object_hide(_item->o);
-        evas_object_resize(_item->o, w, h);
         evas_object_smart_member_add(_item->o, obj);
         _item->l_built = eina_list_append(NULL, _item);
         wd->items_built = eina_list_merge(wd->items_built, _item->l_built);
+        evas_object_hide(_item->o);
      }
-   else if (_item && _item->l_built)
+   else if ((_item) && (_item->l_built))
      wd->items_built = eina_list_demote_list(wd->items_built, _item->l_built);
 
-   //only the three last items are keep
+   //delete unused items
    while (eina_list_count(wd->items_built) > 3)
      {
-       _item = eina_list_data_get(wd->items_built);
-       wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
-       if(item->itc->func.del)
-         item->itc->func.del((void*)item->data, _item->o);
-       else
-         evas_object_del(_item->o);
-       _item->o = NULL;
+        _item = eina_list_data_get(wd->items_built);
+        wd->items_built = eina_list_remove_list(wd->items_built, wd->items_built);
+        if(item->itc->func.del)
+          item->itc->func.del((void*)item->data, _item->o);
+        evas_object_del(_item->o);
+        _item->o = NULL;
      }
 }
 
+static void
+_end(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
+{
+       Elm_Slideshow_Item *item;
+       Widget_Data *wd = elm_widget_data_get(data);
+       if (!wd) return;
+
+       item = wd->previous;
+       if(item)
+       {
+               edje_object_part_unswallow(NULL, item->o);
+               evas_object_hide(item->o);
+               wd->previous = NULL;
+       }
+
+
+       item = wd->current;
+       if (!item || !item->o) return;
+
+       _item_realize(item);
+       edje_object_part_unswallow(NULL, item->o);
+       evas_object_show(item->o);
+
+       edje_object_signal_emit(wd->slideshow, "anim,end", "slideshow");
+       edje_object_part_swallow(wd->slideshow, "elm.swallow.1", item->o);
+}
+
+
+static Eina_Bool
+_timer_cb(void *data)
+{
+   Evas_Object *obj = data;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return ECORE_CALLBACK_CANCEL;
+   wd->timer = NULL;
+   elm_slideshow_next(obj);
+   return ECORE_CALLBACK_CANCEL;
+}
+
+
+
 /**
  * Add a new slideshow to the parent
  *
@@ -233,6 +254,7 @@ elm_slideshow_add(Evas_Object *parent)
 
    wd->slideshow = edje_object_add(e);
    _elm_theme_object_set(obj, wd->slideshow, "slideshow", "base", "default");
+   evas_object_smart_member_add(wd->slideshow, obj);
    elm_widget_resize_object_set(obj, wd->slideshow);
    evas_object_show(wd->slideshow);
 
@@ -240,6 +262,10 @@ elm_slideshow_add(Evas_Object *parent)
    if (eina_list_count(wd->transitions) > 0)
      wd->transition = eina_stringshare_add(eina_list_data_get(wd->transitions));
 
+   wd->layout.list = _elm_stringlist_get(edje_object_data_get(wd->slideshow, "layouts"));
+   if (eina_list_count(wd->layout.list) > 0)
+       wd->layout.current = eina_list_data_get(wd->layout.list);
+
    edje_object_signal_callback_add(wd->slideshow, "end", "slideshow", _end, obj);
 
    evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
@@ -253,7 +279,7 @@ elm_slideshow_add(Evas_Object *parent)
  * Add a object in the list. The object can be a evas object image or a elm photo for example.
  *
  * @param obj The slideshow object
- * @aram itc Callbacks used to create/delete the object. If itc->del.del is NULL, the object will be destroyed with evas_object_del()
+ * @aram itc Callbacks used to create the object and delete the data associated when the item is deleted.
  * @param data Data used by the user to identified the item
  * @return Returns The slideshow item
  *
@@ -291,17 +317,32 @@ elm_slideshow_item_add(Evas_Object *obj, const Elm_Slideshow_Item_Class *itc, co
 EAPI void
 elm_slideshow_show(Elm_Slideshow_Item *item)
 {
-   Widget_Data *wd = elm_widget_data_get(item->obj);
-   if (!wd) return;
-   if (item == wd->current) return;
-
+   char buf[1024];
+   Elm_Slideshow_Item *next = NULL;
+   Widget_Data *wd;
+   if (!item)
+     return;
+   ELM_CHECK_WIDTYPE(item->obj, widtype);
+   wd = elm_widget_data_get(item->obj);
+   if (!wd)
+     return;
+   if (item == wd->current)
+     return;
+
+   next = item;
    _end(item->obj, item->obj, NULL, NULL);
 
+   if (wd->timer) ecore_timer_del(wd->timer);
+   if (wd->timeout > 0)
+          wd->timer = ecore_timer_add(wd->timeout, _timer_cb, item->obj);
+   _item_realize(next);
+   edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->o);
+   evas_object_show(next->o);
+   snprintf(buf, sizeof(buf), "%s,next", wd->transition);
+   edje_object_signal_emit(wd->slideshow, buf, "slideshow");
    wd->previous = wd->current;
-   wd->current = item;
-   _item_realize(item);
+   wd->current = next;
 
-   _end(item->obj, item->obj, NULL, NULL);
 }
 
 /**
@@ -322,27 +363,23 @@ elm_slideshow_next(Evas_Object *obj)
    if (!wd) return;
    
    if (wd->current)
-     next = eina_list_data_get(eina_list_next(wd->current->l));
-   else
-     next = NULL;
-   
-   if (wd->current && !next && wd->loop)
-     next = eina_list_data_get(wd->items);
+          next = _item_next_get(wd->current);
 
    if (!next || next == wd->current) return;
    
+
    _end(obj, obj, NULL, NULL);
-   
+
    if (wd->timer) ecore_timer_del(wd->timer);
    if (wd->timeout > 0)
-     wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
-   
+          wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
+
    _item_realize(next);
 
    edje_object_part_swallow(wd->slideshow, "elm.swallow.2", next->o);
    evas_object_show(next->o);
-   
-   snprintf(buf, 1024, "%s,next", wd->transition);
+
+   snprintf(buf, sizeof(buf), "%s,next", wd->transition);
    edje_object_signal_emit(wd->slideshow, buf, "slideshow");
 
    wd->previous = wd->current;
@@ -360,19 +397,14 @@ EAPI void
 elm_slideshow_previous(Evas_Object *obj)
 {
    char buf[1024];
-   Elm_Slideshow_Item *prev;
+   Elm_Slideshow_Item *prev = NULL;
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
 
    if (!wd) return;
 
    if (wd->current)
-     prev = eina_list_data_get(eina_list_prev(wd->current->l));
-   else
-     prev = NULL;
-
-   if (wd->current && !prev && wd->loop)
-     prev = eina_list_data_get(eina_list_last(wd->items));
+     prev = _item_prev_get(wd->current);
 
    if (!prev ||  prev == wd->current) return;
 
@@ -380,10 +412,10 @@ elm_slideshow_previous(Evas_Object *obj)
 
    if (wd->timer) ecore_timer_del(wd->timer);
    if (wd->timeout > 0)
-     wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
+          wd->timer = ecore_timer_add(wd->timeout, _timer_cb, obj);
 
    _item_realize(prev);
-   
+
    edje_object_part_swallow(wd->slideshow, "elm.swallow.2", prev->o);
    evas_object_show(prev->o);
 
@@ -398,7 +430,7 @@ elm_slideshow_previous(Evas_Object *obj)
  * Returns the list of transitions available.
  *
  * @param obj The slideshow object
- * @return Returns the list of transitions (list of char*)
+ * @return Returns the list of transitions (list of const char*)
  *
  * @ingroup Slideshow
  */
@@ -412,6 +444,23 @@ elm_slideshow_transitions_get(const Evas_Object *obj)
 }
 
 /**
+ * Returns the list of layouts available.
+ *
+ * @param obj The slideshow object
+ * @return Returns the list of layout (list of const char*)
+ *
+ * @ingroup Slideshow
+ */
+const Eina_List *
+elm_slideshow_layouts_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return wd->layout.list;
+}
+
+/**
  * Set the transition to use
  *
  * @param obj The slideshow object
@@ -502,6 +551,44 @@ elm_slideshow_loop_set(Evas_Object *obj, Eina_Bool loop)
 }
 
 /**
+ * Returns the current layout name
+ *
+ * @param obj The slideshow object
+ * @returns Returns the layout name
+ *
+ * @ingroup Slideshow
+ */
+EAPI const char *
+elm_slideshow_layout_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return EINA_FALSE;
+   return wd->layout.current;
+}
+
+/**
+ * Set the layout
+ *
+ * @param obj The slideshow object
+ * @param layout the new layout
+ *
+ * @ingroup Slideshow
+ */
+EAPI void
+elm_slideshow_layout_set(Evas_Object *obj, const char *layout)
+{
+   char buf[PATH_MAX];
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+
+   wd->layout.current = layout;
+   snprintf(buf, sizeof(buf), "layout,%s", layout);
+   edje_object_signal_emit(wd->slideshow, buf, "slideshow");
+}
+
+/**
  * Return if the first item should follow the last and vice versa
  *
  * @param obj The slideshow object
@@ -528,24 +615,23 @@ elm_slideshow_loop_get(const Evas_Object *obj)
 EAPI void
 elm_slideshow_clear(Evas_Object *obj)
 {
-   Elm_Slideshow_Item *item;
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   if (!wd) return;
-   wd->previous = NULL;
-   wd->current = NULL;
-   EINA_LIST_FREE(wd->items_built, item)
-     {
-       if (item->itc->func.del)
-         item->itc->func.del((void*)item->data, item->o);
-       else
-         evas_object_del(item->o);
-     }
-
-   EINA_LIST_FREE(wd->items, item)
-     {
-       free(item);
-     }
+       Elm_Slideshow_Item *item;
+       ELM_CHECK_WIDTYPE(obj, widtype);
+       Widget_Data *wd = elm_widget_data_get(obj);
+       if (!wd) return;
+       wd->previous = NULL;
+       wd->current = NULL;
+       EINA_LIST_FREE(wd->items_built, item)
+       {
+               if (item->itc->func.del)
+                       item->itc->func.del((void*)item->data, item->o);
+               evas_object_del(item->o);
+       }
+
+       EINA_LIST_FREE(wd->items, item)
+       {
+               free(item);
+       }
 }
 
 
@@ -559,29 +645,29 @@ elm_slideshow_clear(Evas_Object *obj)
 EAPI void
 elm_slideshow_item_del(Elm_Slideshow_Item *item)
 {
-   if (!item) return;
-   Widget_Data *wd = elm_widget_data_get(item->obj);
-   if (!wd) return;
-   if (wd->previous == item) wd->previous = NULL;
-   if (wd->current == item)
-     {
-       Eina_List *l = eina_list_data_find_list(wd->items, item);
-       Eina_List *l2 = eina_list_next(l);
-       wd->current = NULL;
-       if (!l2)
-         l2 = eina_list_nth_list(wd->items, eina_list_count(wd->items) - 1);
-       if (l2)
-         elm_slideshow_show(eina_list_data_get(l2));
-     }
-   
-   wd->items = eina_list_remove_list(wd->items, item->l);
-   wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
-
-   if (item->o && item->itc->func.del)
-     item->itc->func.del((void*)item->data, wd->previous->o);
-   else if (item->o)
-     evas_object_del(item->o);
-   free(item);
+       if (!item) return;
+       Widget_Data *wd = elm_widget_data_get(item->obj);
+       if (!wd) return;
+       if (wd->previous == item) wd->previous = NULL;
+       if (wd->current == item)
+       {
+               Eina_List *l = eina_list_data_find_list(wd->items, item);
+               Eina_List *l2 = eina_list_next(l);
+               wd->current = NULL;
+               if (!l2)
+                       l2 = eina_list_nth_list(wd->items, eina_list_count(wd->items) - 1);
+               if (l2)
+                       elm_slideshow_show(eina_list_data_get(l2));
+       }
+
+       wd->items = eina_list_remove_list(wd->items, item->l);
+       wd->items_built = eina_list_remove_list(wd->items_built, item->l_built);
+
+       if (item->o && item->itc->func.del)
+               item->itc->func.del((void*)item->data, wd->previous->o);
+       if (item->o)
+               evas_object_del(item->o);
+       free(item);
 }
 
 /**
@@ -647,4 +733,3 @@ elm_slideshow_item_data_get(Elm_Slideshow_Item * item)
    if (!item) return NULL;
    return (void *)item->data;
 }
-
index 4ba970b..76e4d7b 100644 (file)
@@ -30,7 +30,7 @@ struct _Widget_Data
    Evas_Object *spinner, *ent;
    const char *label;
    double val, val_min, val_max, orig_val, step;
-   double drag_start_pos, spin_speed, interval;
+   double drag_start_pos, spin_speed, interval, first_interval;
    Ecore_Timer *delay, *spin;
    Eina_List *special_values;
    Eina_Bool wrap : 1;
@@ -82,6 +82,32 @@ _disable_hook(Evas_Object *obj)
 }
 
 static void
+_signal_emit_hook(Evas_Object *obj, const char *emission, const char *source)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_signal_emit(wd->spinner, emission, source);
+}
+
+static void
+_signal_callback_add_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   edje_object_signal_callback_add(wd->spinner, emission,
+        source, func_cb, data);
+}
+
+static void *
+_signal_callback_del_hook(Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source))
+{
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   return edje_object_signal_callback_del(wd->spinner, emission, source,
+        func_cb);
+}
+
+static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
@@ -109,14 +135,14 @@ _on_focus_hook(void *data __UNUSED__, Evas_Object *obj)
      edje_object_signal_emit(wd->spinner, "elm,action,unfocus", "elm");
 }
 
-static int
+static Eina_Bool
 _delay_change(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
-   if (!wd) return 0;
+   if (!wd) return ECORE_CALLBACK_CANCEL;
    wd->delay = NULL;
    evas_object_smart_callback_call(data, "delay,changed", NULL);
-   return 0;
+   return ECORE_CALLBACK_CANCEL;
 }
 
 static void
@@ -199,7 +225,7 @@ _value_set(Evas_Object *obj, double delta)
         while (new_val < wd->val_min)
           new_val = wd->val_max + new_val + 1 - wd->val_min;
         while (new_val > wd->val_max)
-          new_val = wd->val_min + new_val - wd->val_max;
+          new_val = wd->val_min + new_val - wd->val_max - 1;
      }
    else
      {
@@ -349,7 +375,7 @@ _toggle_entry(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
      }
 }
 
-static int
+static Eina_Bool
 _spin_value(void *data)
 {
    Widget_Data *wd = elm_widget_data_get(data);
@@ -365,7 +391,7 @@ _val_inc_start(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->spin_speed = wd->step;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = ecore_timer_add(wd->interval, _spin_value, obj);
@@ -377,7 +403,7 @@ _val_inc_stop(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->spin_speed = 0;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = NULL;
@@ -388,7 +414,7 @@ _val_dec_start(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->spin_speed = -wd->step;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = ecore_timer_add(wd->interval, _spin_value, obj);
@@ -400,7 +426,7 @@ _val_dec_stop(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   wd->interval = 0.85;
+   wd->interval = wd->first_interval;
    wd->spin_speed = 0;
    if (wd->spin) ecore_timer_del(wd->spin);
    wd->spin = NULL;
@@ -508,12 +534,16 @@ elm_spinner_add(Evas_Object *parent)
    elm_widget_on_focus_hook_set(obj, _on_focus_hook, NULL);
    elm_widget_theme_hook_set(obj, _theme_hook);
    elm_widget_disable_hook_set(obj, _disable_hook);
+   elm_widget_signal_emit_hook_set(obj, _signal_emit_hook);
+   elm_widget_signal_callback_add_hook_set(obj, _signal_callback_add_hook);
+   elm_widget_signal_callback_del_hook_set(obj, _signal_callback_del_hook);
 
    wd->val = 0.0;
    wd->val_min = 0.0;
    wd->val_max = 100.0;
    wd->wrap = 0;
    wd->step = 1.0;
+   wd->first_interval = 0.85;
    wd->entry_visible = 0;
    wd->editable = EINA_TRUE;
 
@@ -813,3 +843,45 @@ elm_spinner_editable_get(const Evas_Object *obj)
    if (!wd) return EINA_FALSE;
    return wd->editable;
 }
+
+/**
+ * Set the interval for the spinner
+ *
+ * @param obj The spinner object
+ * @param interval The interval value in seconds
+ *
+ * The interval value is decreased while the user increments or decrements
+ * the spinner value. The next interval value is the previous interval / 1.05,
+ * so it speed up a bit. Default value is 0.85 seconds.
+ *
+ * @ingroup Spinner
+ */
+EAPI void
+elm_spinner_interval_set(Evas_Object *obj, double interval)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype);
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
+   wd->first_interval = interval;
+}
+
+/**
+ * Get the interval of the spinner
+ *
+ * @param obj The spinner object
+ * @return The value of the first interval in seconds
+ *
+ * The interval value is decreased while the user increments or decrements
+ * the spinner value. The next interval value is the previous interval / 1.05,
+ * so it speed up a bit. Default value is 0.85 seconds.
+ *
+ * @ingroup Spinner
+ */
+EAPI double
+elm_spinner_interval_get(const Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype) 0.0;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return 0.0;
+   return wd->first_interval;
+}
index 3dc0bba..6f3109d 100644 (file)
@@ -335,7 +335,7 @@ elm_theme_overlay_del(Elm_Theme *th, const char *item)
 }
 
 /**
- * Prepends a theme extension to the list of extensions.
+ * Appends a theme extension to the list of extensions.
  *
  * @param th The theme to add to, or if NULL, the default theme
  * @param item The Edje file path to be used
index 3764898..493290b 100644 (file)
@@ -32,27 +32,21 @@ typedef struct _Widget_Data Widget_Data;
 struct _Widget_Data
 {
    Evas_Object *self;
-   struct {
-       Evas_Object *frm;
-       Evas_Object *view;
-       struct {
-            float x, y;
-       } align;
-   } children;
+   Evas_Object *frame;
+   Evas_Object *view;
    const char *file;
    const char *key;
    struct
      {
+       int id;
        const char *file;
        const char *key;
      } thumb;
    Ecore_Event_Handler *eeh;
-   int id;
    Elm_Thumb_Animation_Setting anim_setting;
    Eina_Bool on_hold : 1;
    Eina_Bool is_video : 1;
-   Eina_Bool is_generating : 1;
-   Eina_Bool keep_aspect : 1;
+   Eina_Bool was_video : 1;
 };
 
 static const char *widtype = NULL;
@@ -93,10 +87,16 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+
+#ifdef HAVE_ELEMENTARY_ETHUMB
+   if (wd->thumb.id >= 0)
+     ethumb_client_generate_cancel(_elm_ethumb_client, wd->thumb.id,
+                                   NULL, NULL, NULL);
+#endif
+
    eina_stringshare_del(wd->file);
    eina_stringshare_del(wd->key);
-   if (wd->eeh)
-     ecore_event_handler_del(wd->eeh);
+   if (wd->eeh) ecore_event_handler_del(wd->eeh);
    free(wd);
 }
 
@@ -104,7 +104,7 @@ static void
 _theme_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
-   _elm_theme_object_set(obj, wd->children.frm, "thumb", "base", elm_widget_style_get(obj));
+   _elm_theme_object_set(obj, wd->frame, "thumb", "base", elm_widget_style_get(obj));
 }
 
 #ifdef HAVE_ELEMENTARY_ETHUMB
@@ -120,9 +120,9 @@ _mouse_down_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
    else
      wd->on_hold = EINA_FALSE;
    if (ev->flags & EVAS_BUTTON_DOUBLE_CLICK)
-     evas_object_smart_callback_call(data, SIG_CLICKED_DOUBLE, NULL);
+     evas_object_smart_callback_call(wd->self, SIG_CLICKED_DOUBLE, NULL);
    else
-     evas_object_smart_callback_call(data, SIG_PRESS, NULL);
+     evas_object_smart_callback_call(wd->self, SIG_PRESS, NULL);
 }
 
 static void
@@ -138,32 +138,41 @@ _mouse_up_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *
    else
      wd->on_hold = EINA_FALSE;
    if (!wd->on_hold)
-     evas_object_smart_callback_call(data, SIG_CLICKED, NULL);
+     evas_object_smart_callback_call(wd->self, SIG_CLICKED, NULL);
    wd->on_hold = EINA_FALSE;
 }
 
 static void
-_finished_thumb(Widget_Data *wd, int id, const char *thumb_path, const char *thumb_key)
+_finished_thumb(Widget_Data *wd, const char *thumb_path, const char *thumb_key)
 {
+   Eina_Bool new_view = EINA_FALSE;
    int r;
+   Evas_Coord mw, mh;
    Evas *evas;
 
    evas = evas_object_evas_get(wd->self);
-   if (wd->children.view)
-     evas_object_del(wd->children.view);
-   wd->children.view = NULL;
-   wd->id = id;
+   if ((wd->view) && (wd->is_video ^ wd->was_video))
+     {
+       evas_object_del(wd->view);
+       wd->view = NULL;
+     }
+   wd->was_video = wd->is_video;
 
-   if (wd->is_video &&
-       ethumb_client_format_get(_elm_ethumb_client) == ETHUMB_THUMB_EET)
+   if ((wd->is_video) &&
+       (ethumb_client_format_get(_elm_ethumb_client) == ETHUMB_THUMB_EET))
      {
-       wd->children.view = edje_object_add(evas);
-       if (!wd->children.view)
+       if (!wd->view)
          {
-            ERR("could not create edje object");
-            goto err;
+            wd->view = edje_object_add(evas);
+            if (!wd->view)
+              {
+                 ERR("could not create edje object");
+                 goto err;
+              }
+            new_view = EINA_TRUE;
          }
-       if (!edje_object_file_set(wd->children.view, thumb_path, "movie/thumb"))
+
+       if (!edje_object_file_set(wd->view, thumb_path, "movie/thumb"))
          {
             ERR("could not set file=%s key=%s for %s", thumb_path, thumb_key,
                 wd->file);
@@ -172,14 +181,19 @@ _finished_thumb(Widget_Data *wd, int id, const char *thumb_path, const char *thu
      }
    else
      {
-       wd->children.view = evas_object_image_filled_add(evas);
-       if (!wd->children.view)
+       if (!wd->view)
          {
-            ERR("could not create image object");
-            goto err;
+            wd->view = evas_object_image_filled_add(evas);
+            if (!wd->view)
+              {
+                 ERR("could not create image object");
+                 goto err;
+              }
+            new_view = EINA_TRUE;
          }
-       evas_object_image_file_set(wd->children.view, thumb_path, thumb_key);
-       r = evas_object_image_load_error_get(wd->children.view);
+
+       evas_object_image_file_set(wd->view, thumb_path, thumb_key);
+       r = evas_object_image_load_error_get(wd->view);
        if (r != EVAS_LOAD_ERROR_NONE)
          {
             ERR("%s: %s", thumb_path, evas_load_error_str(r));
@@ -187,20 +201,22 @@ _finished_thumb(Widget_Data *wd, int id, const char *thumb_path, const char *thu
          }
      }
 
-   elm_widget_sub_object_add(wd->self, wd->children.view);
-   edje_object_part_swallow(wd->children.frm, "elm.swallow.content",
-                           wd->children.view);
+   if (new_view) elm_widget_sub_object_add(wd->self, wd->view);
+   edje_object_part_swallow(wd->frame, "elm.swallow.content", wd->view);
+   edje_object_size_min_get(wd->frame, &mw, &mh);
+   edje_object_size_min_restricted_calc(wd->frame, &mw, &mh, mw, mh);
+   evas_object_size_hint_min_set(wd->self, mw, mh);
    eina_stringshare_replace(&(wd->thumb.file), thumb_path);
    eina_stringshare_replace(&(wd->thumb.key), thumb_key);
-   edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_GENERATE_STOP, "elm");
+   edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_STOP, "elm");
    evas_object_smart_callback_call(wd->self, SIG_GENERATE_STOP, NULL);
    return;
 
 view_err:
-   evas_object_del(wd->children.view);
-   wd->children.view = NULL;
+   evas_object_del(wd->view);
+   wd->view = NULL;
 err:
-   edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_LOAD_ERROR, "elm");
+   edje_object_signal_emit(wd->frame, EDJE_SIGNAL_LOAD_ERROR, "elm");
    evas_object_smart_callback_call(wd->self, SIG_LOAD_ERROR, NULL);
 }
 
@@ -209,17 +225,19 @@ _finished_thumb_cb(void *data, Ethumb_Client *c __UNUSED__, int id, const char *
 {
    Widget_Data *wd = data;
 
-   edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_PULSE_STOP, "elm");
-   wd->is_generating = EINA_FALSE;
+   EINA_SAFETY_ON_FALSE_RETURN(wd->thumb.id == id);
+   wd->thumb.id = -1;
+
+   edje_object_signal_emit(wd->frame, EDJE_SIGNAL_PULSE_STOP, "elm");
 
    if (success)
      {
-       _finished_thumb(wd, id, thumb_path, thumb_key);
+       _finished_thumb(wd, thumb_path, thumb_key);
        return;
      }
 
    ERR("could not generate thumbnail for %s (key: %s)", file, key ? key : "");
-   edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_GENERATE_ERROR, "elm");
+   edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_ERROR, "elm");
    evas_object_smart_callback_call(wd->self, SIG_GENERATE_ERROR, NULL);
 }
 
@@ -230,30 +248,31 @@ _thumb_apply(Widget_Data *wd)
    if (ethumb_client_thumb_exists(_elm_ethumb_client))
      {
        const char *thumb_path, *thumb_key;
+       wd->thumb.id = -1;
        ethumb_client_thumb_path_get(_elm_ethumb_client, &thumb_path,
                                     &thumb_key);
-       _finished_thumb(wd, 0, thumb_path, thumb_key);
+       _finished_thumb(wd, thumb_path, thumb_key);
        return;
      }
-   else if (ethumb_client_generate(_elm_ethumb_client, _finished_thumb_cb, wd,
-                                  NULL) != -1)
+   else if ((wd->thumb.id = ethumb_client_generate
+            (_elm_ethumb_client, _finished_thumb_cb, wd, NULL)) != -1)
      {
-       edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_PULSE_START,
+       edje_object_signal_emit(wd->frame, EDJE_SIGNAL_PULSE_START,
                                "elm");
-       edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_GENERATE_START,
+       edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_START,
                                "elm");
        evas_object_smart_callback_call(wd->self, SIG_GENERATE_START, NULL);
      }
    else
      {
-       edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_GENERATE_ERROR,
+       wd->thumb.id = -1;
+       edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_ERROR,
                                "elm");
        evas_object_smart_callback_call(wd->self, SIG_GENERATE_ERROR, NULL);
      }
-   wd->is_generating = EINA_FALSE;
 }
 
-static int
+static Eina_Bool
 _thumb_apply_cb(void *data, int type __UNUSED__, void *ev __UNUSED__)
 {
    _thumb_apply(data);
@@ -263,7 +282,7 @@ _thumb_apply_cb(void *data, int type __UNUSED__, void *ev __UNUSED__)
 static void
 _thumb_show(Widget_Data *wd)
 {
-   evas_object_show(wd->children.frm);
+   evas_object_show(wd->frame);
 
    if (elm_thumb_ethumb_client_connected())
      {
@@ -283,29 +302,23 @@ _thumb_show_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void
 }
 
 static void
-_cancel_cb(void *data, Eina_Bool success)
+_thumb_hide_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
 {
    Widget_Data *wd = data;
 
-   if (success)
+   evas_object_hide(wd->frame);
+
+   if (wd->thumb.id >= 0)
      {
-       wd->is_generating = EINA_FALSE;
-       edje_object_signal_emit(wd->children.frm, EDJE_SIGNAL_GENERATE_STOP,
-                               "elm");
+       ethumb_client_generate_cancel
+         (_elm_ethumb_client, wd->thumb.id, NULL, NULL, NULL);
+       wd->thumb.id = -1;
+
+       edje_object_signal_emit(wd->frame, EDJE_SIGNAL_GENERATE_STOP, "elm");
        evas_object_smart_callback_call(wd->self, SIG_GENERATE_STOP, NULL);
      }
-}
-
-static void
-_thumb_hide_cb(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
-{
-   Widget_Data *wd = data;
-
-   evas_object_hide(wd->children.frm);
 
-   if (wd->is_generating)
-     ethumb_client_generate_cancel(_elm_ethumb_client, wd->id, _cancel_cb, wd, NULL);
-   else if (wd->eeh)
+   if (wd->eeh)
      {
        ecore_event_handler_del(wd->eeh);
        wd->eeh = NULL;
@@ -384,9 +397,6 @@ elm_need_ethumb(void)
  *
  * @see elm_thumb_file_set()
  * @see elm_thumb_ethumb_client_get()
- * @see elm_thumb_keep_aspect_set()
- * @see elm_thumb_align_set()
- * @see elm_thumb_align_get()
  *
  * @ingroup Thumb
  */
@@ -408,24 +418,22 @@ elm_thumb_add(Evas_Object *parent)
    elm_widget_del_hook_set(obj, _del_hook);
    elm_widget_theme_hook_set(obj, _theme_hook);
 
-   wd->children.frm = edje_object_add(evas);
-   _elm_theme_object_set(obj, wd->children.frm, "thumb", "base", "default");
-   elm_widget_resize_object_set(obj, wd->children.frm);
+   wd->frame = edje_object_add(evas);
+   _elm_theme_object_set(obj, wd->frame, "thumb", "base", "default");
+   elm_widget_resize_object_set(obj, wd->frame);
 
    edje_object_size_min_calc(obj, &minw, &minh);
    evas_object_size_hint_min_set(obj, minw, minh);
 
    wd->self = obj;
-   wd->children.view = NULL;
+   wd->view = NULL;
    wd->file = NULL;
    wd->key = NULL;
    wd->eeh = NULL;
-   wd->children.align.x = 0.5;
-   wd->children.align.y = 0.5;
+   wd->thumb.id = -1;
    wd->on_hold = EINA_FALSE;
    wd->is_video = EINA_FALSE;
-   wd->is_generating = EINA_FALSE;
-   wd->keep_aspect = EINA_FALSE;
+   wd->was_video = EINA_FALSE;
 
 #ifdef HAVE_ELEMENTARY_ETHUMB
    evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN,
@@ -576,11 +584,11 @@ elm_thumb_animate_set(Evas_Object *obj, Elm_Thumb_Animation_Setting setting)
 
    wd->anim_setting = setting;
    if (setting == ELM_THUMB_ANIMATION_LOOP)
-     edje_object_signal_emit(wd->children.view, "animate_loop", "");
+     edje_object_signal_emit(wd->view, "animate_loop", "");
    else if (setting == ELM_THUMB_ANIMATION_START)
-     edje_object_signal_emit(wd->children.view, "animate", "");
+     edje_object_signal_emit(wd->view, "animate", "");
    else if (setting == ELM_THUMB_ANIMATION_STOP)
-     edje_object_signal_emit(wd->children.view, "animate_stop", "");
+     edje_object_signal_emit(wd->view, "animate_stop", "");
 }
 
 /**
@@ -604,98 +612,6 @@ elm_thumb_animate_get(const Evas_Object *obj)
 }
 
 /**
- * Set whether the thumbnail exhibition should keep the image or video aspect.
- *
- * For positioning the image/video within the object use the function
- * elm_thumb_align_set().
- *
- * @param obj The thumb object.
- * @param setting Whether keep or not the aspect.
- *
- * @see elm_thumb_file_set()
- * @see elm_thumb_align_set()
- *
- * @ingroup Thumb
- */
-EAPI void
-elm_thumb_keep_aspect_set(Evas_Object *obj, Eina_Bool setting)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-   wd->keep_aspect = setting;
-}
-
-/**
- * Get back the aspect info set with @c elm_thumb_keep_aspect_set().
- *
- * @param obj The thumb object.
- * @return Whether the thumb object keeps or not the aspect for its content.
- *
- * @see elm_thumb_file_get()
- * @see elm_thumb_align_get()
- *
- * @ingroup Thumb
- */
-EAPI Eina_Bool
-elm_thumb_keep_aspect_get(const Evas_Object *obj)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
-   Widget_Data *wd = elm_widget_data_get(obj);
-   return wd->keep_aspect;
-}
-
-/**
- * Set image/video's alignment within the thumbnail.
- *
- * @param obj The thumb object.
- * @param x_align The x alignment (0 <= x <= 1).
- * @param y_align The y alignment (0 <= y <= 1).
- *
- * @see elm_thumb_keep_aspect_set()
- * @see elm_thumb_align_get()
- *
- * @ingroup Thumb
- */
-EAPI void
-elm_thumb_align_set(Evas_Object *obj, float x_align, float y_align)
-{
-   ELM_CHECK_WIDTYPE(obj, widtype);
-   Widget_Data *wd = elm_widget_data_get(obj);
-
-   if (x_align > 1.0)
-     x_align = 1.0;
-   else if (x_align < 0.0)
-     x_align = 0.0;
-   wd->children.align.x = x_align;
-
-   if (y_align > 1.0)
-     y_align = 1.0;
-   else if (y_align < 0.0)
-     y_align = 0.0;
-   wd->children.align.y = y_align;
-}
-
-/**
- * Get the alignenment set for the thumb object.
- *
- * @param obj The thumb object.
- * @param x Pointer to x alignenment.
- * @param y Pointer to y alignenment.
- *
- * @see elm_thumb_align_set()
- *
- * @ingroup Thumb
- */
-EAPI void
-elm_thumb_align_get(const Evas_Object *obj, float *x, float *y)
-{
-    ELM_CHECK_WIDTYPE(obj, widtype);
-    Widget_Data *wd = elm_widget_data_get(obj);
-    if (x) *x = wd->children.align.x;
-    if (y) *y = wd->children.align.y;
-}
-
-/**
  * Get the ethumb_client handle so custom configuration can be made.
  * This must be called before the objects are created to be sure no object is
  * visible and no generation started.
index b057215..7c04449 100644 (file)
@@ -125,6 +125,7 @@ _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
        evas_object_event_callback_del_full
          (sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints, obj);
        wd->icon = NULL;
+       edje_object_message_signal_process(wd->tgl);
        _sizing_eval(obj);
      }
 }
@@ -242,6 +243,8 @@ elm_toggle_label_get(const Evas_Object *obj)
 /**
  * Sets the icon to be displayed with the toggle.
  *
+ * Once the icon object is set, a previously set one will be deleted.
+ *
  * @param obj The toggle object
  * @param icon The icon object to be displayed
  *
@@ -253,15 +256,18 @@ elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon)
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->icon != icon) && (wd->icon))
-     elm_widget_sub_object_del(obj, wd->icon);
+   if (wd->icon == icon) return;
+   if (wd->icon) evas_object_del(wd->icon);
    wd->icon = icon;
-   if (!icon) return;
-   elm_widget_sub_object_add(obj, icon);
-   evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
-                                  _changed_size_hints, obj);
-   edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
-   edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
+   if (icon)
+     {
+       elm_widget_sub_object_add(obj, icon);
+       evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+             _changed_size_hints, obj);
+       edje_object_part_swallow(wd->tgl, "elm.swallow.content", icon);
+       edje_object_signal_emit(wd->tgl, "elm,state,icon,visible", "elm");
+       edje_object_message_signal_process(wd->tgl);
+     }
    _sizing_eval(obj);
 }
 
index 878ffa6..357775e 100644 (file)
@@ -1,6 +1,3 @@
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
 #include <Elementary.h>
 #include "elm_priv.h"
 
@@ -36,7 +33,7 @@ struct _Elm_Toolbar_Item
    Eina_Bool selected : 1;
    Eina_Bool disabled : 1;
    Eina_Bool separator : 1;
-   Eina_Bool menu;
+   Eina_Bool menu : 1;
    Evas_Object *o_menu;
 };
 
@@ -645,6 +642,7 @@ elm_toolbar_scrollable_set(Evas_Object *obj, Eina_Bool scrollable)
 
    if (!wd) return;
    wd->scrollable = scrollable;
+   elm_smart_scroller_bounce_allow_set(wd->scr, wd->scrollable, 0);
    _sizing_eval(obj);
 }
 
index cee9846..7a58044 100644 (file)
@@ -27,6 +27,16 @@ struct _Smart_Data
    void         (*activate_func) (Evas_Object *obj);
    void         (*disable_func) (Evas_Object *obj);
    void         (*theme_func) (Evas_Object *obj);
+   void         (*signal_func) (Evas_Object *obj, const char *emission,
+                               const char *source);
+   void         (*callback_add_func) (Evas_Object *obj, const char *emission,
+                               const char *source, void (*func) (void *data,
+                                  Evas_Object *o, const char *emission,
+                                  const char *source), void *data);
+   void         *(*callback_del_func) (Evas_Object *obj, const char *emission,
+                                 const char *source, void (*func) (void *data,
+                                    Evas_Object *o, const char *emission,
+                                    const char *source));
    void         (*changed_func) (Evas_Object *obj);
    void         (*on_focus_func) (void *data, Evas_Object *obj);
    void          *on_focus_data;
@@ -41,6 +51,7 @@ struct _Smart_Data
    double         scale;
    Elm_Theme     *theme;
    const char    *style;
+   unsigned int   focus_order;
    
    int            child_drag_x_locked;
    int            child_drag_y_locked;
@@ -68,9 +79,13 @@ static void _smart_calculate(Evas_Object *obj);
 static void _smart_init(void);
 static inline Eina_Bool _elm_widget_is(const Evas_Object *obj);
 
+static void _if_focused_revert(Evas_Object *obj);
+
 /* local subsystem globals */
 static Evas_Smart *_e_smart = NULL;
 
+static unsigned int focus_order = 0;
+
 static void
 _sub_obj_del(void *data, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
 {
@@ -157,6 +172,27 @@ elm_widget_changed_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj))
 }
 
 EAPI void
+elm_widget_signal_emit_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source))
+{
+   API_ENTRY return;
+   sd->signal_func = func;
+}
+
+EAPI void
+elm_widget_signal_callback_add_hook_set(Evas_Object *obj, void (*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source), void *data))
+{
+   API_ENTRY return;
+   sd->callback_add_func = func;
+}
+
+EAPI void
+elm_widget_signal_callback_del_hook_set(Evas_Object *obj, void *(*func) (Evas_Object *obj, const char *emission, const char *source, void (*func_cb) (void *data, Evas_Object *o, const char *emission, const char *source)))
+{
+   API_ENTRY return;
+   sd->callback_del_func = func;
+}
+
+EAPI void
 elm_widget_theme(Evas_Object *obj)
 {
    const Eina_List *l;
@@ -437,7 +473,12 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
    /* if it has a focus func its an end-point widget like a button */
    if (sd->focus_func)
      {
-       if (!sd->focused) sd->focused = 1;
+       if (!sd->focused)
+          {
+             focus_order++;
+             sd->focus_order = focus_order;
+             sd->focused = 1;
+          }
        else sd->focused = 0;
        if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
        sd->focus_func(obj);
@@ -453,8 +494,6 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
        if (!sd->focused)
          {
             elm_widget_focus_set(obj, forward);
-            sd->focused = 1;
-            if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
             return 1;
          }
        else
@@ -585,11 +624,37 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
 }
 
 EAPI void
+elm_widget_signal_emit(Evas_Object *obj, const char *emission, const char *source)
+{
+   API_ENTRY return;
+   if (!sd->signal_func) return;
+   sd->signal_func(obj, emission, source);
+}
+
+EAPI void
+elm_widget_signal_callback_add(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source), void *data)
+{
+   API_ENTRY return;
+   if (!sd->callback_add_func) return;
+   sd->callback_add_func(obj, emission, source, func, data);
+}
+
+EAPI void *
+elm_widget_signal_callback_del(Evas_Object *obj, const char *emission, const char *source, void (*func) (void *data, Evas_Object *o, const char *emission, const char *source))
+{
+   API_ENTRY return NULL;
+   if (!sd->callback_del_func) return NULL;
+   return sd->callback_del_func(obj, emission, source, func);
+}
+
+EAPI void
 elm_widget_focus_set(Evas_Object *obj, int first)
 {
    API_ENTRY return;
    if (!sd->focused)
      {
+        focus_order++;
+        sd->focus_order = focus_order;
        sd->focused = 1;
        if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
      }
@@ -687,6 +752,8 @@ _elm_widget_parent_focus(Evas_Object *obj)
 
    if (sd->focused) return;
    if (o) _elm_widget_parent_focus(o);
+   focus_order++;
+   sd->focus_order = focus_order;
    sd->focused = 1;
    if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
    if (sd->focus_func) sd->focus_func(obj);
@@ -880,7 +947,7 @@ EAPI double
 elm_widget_scale_get(const Evas_Object *obj)
 {
    API_ENTRY return 1.0;
-   // FIXME: save walking up the tree by storingcaching parent scale
+   // FIXME: save walking up the tree by storing/caching parent scale
    if (sd->scale == 0.0)
      {
        if (sd->parent_obj)
@@ -1009,30 +1076,28 @@ elm_widget_drag_lock_y_set(Evas_Object *obj, Eina_Bool lock)
 }
 
 EAPI Eina_Bool
-elm_widget_drag_lock_x_get(Evas_Object *obj)
+elm_widget_drag_lock_x_get(const Evas_Object *obj)
 {
    API_ENTRY return EINA_FALSE;
-   printf("check %p x lock %i\n", obj, sd->drag_x_locked);
    return sd->drag_x_locked;
 }
 
 EAPI Eina_Bool
-elm_widget_drag_lock_y_get(Evas_Object *obj)
+elm_widget_drag_lock_y_get(const Evas_Object *obj)
 {
    API_ENTRY return EINA_FALSE;
-   printf("check %p y lock %i\n", obj, sd->drag_y_locked);
    return sd->drag_y_locked;
 }
 
 EAPI int
-elm_widget_drag_child_locked_x_get(Evas_Object *obj)
+elm_widget_drag_child_locked_x_get(const Evas_Object *obj)
 {
    API_ENTRY return 0;
    return sd->child_drag_x_locked;
 }
 
 EAPI int
-elm_widget_drag_child_locked_y_get(Evas_Object *obj)
+elm_widget_drag_child_locked_y_get(const Evas_Object *obj)
 {
    API_ENTRY return 0;
    return sd->child_drag_y_locked;
@@ -1080,6 +1145,53 @@ _smart_add(Evas_Object *obj)
    evas_object_smart_data_set(obj, sd);
 }
 
+static Evas_Object *
+_newest_focus_order_get(Evas_Object *obj, unsigned int *newest_focus_order)
+{
+   const Eina_List *l;
+   Evas_Object *child, *ret, *best;
+   
+   API_ENTRY return NULL;
+   if (!evas_object_visible_get(obj)) return NULL;
+   best = NULL;
+   if (*newest_focus_order < sd->focus_order)
+     {
+        *newest_focus_order = sd->focus_order;
+        best = obj;
+     }
+   EINA_LIST_FOREACH(sd->subobjs, l, child)
+     {
+        ret = _newest_focus_order_get(child, newest_focus_order);
+        if (!ret) continue;
+        best = ret;
+     }
+   return best;
+}
+
+static void
+_if_focused_revert(Evas_Object *obj)
+{
+   Evas_Object *top;
+   Evas_Object *newest = NULL;
+   unsigned int newest_focus_order = 0;
+   
+   INTERNAL_ENTRY;
+   
+   if (!sd->focused) return;
+   if (!sd->parent_obj) return;
+
+   top = elm_widget_top_get(sd->parent_obj);
+   if (top)
+     {
+        newest = _newest_focus_order_get(top, &newest_focus_order);
+        if (newest)
+          {
+             elm_object_unfocus(newest);
+             elm_object_focus(newest);
+          }
+     }
+}
+
 static void
 _smart_del(Evas_Object *obj)
 {
@@ -1113,6 +1225,7 @@ _smart_del(Evas_Object *obj)
    if (sd->style) eina_stringshare_del(sd->style);
    if (sd->type) eina_stringshare_del(sd->type);
    if (sd->theme) elm_theme_free(sd->theme);
+   _if_focused_revert(obj);
    free(sd);
 }
 
@@ -1146,6 +1259,7 @@ _smart_hide(Evas_Object *obj)
 {
    INTERNAL_ENTRY;
    evas_object_hide(sd->resize_obj);
+   _if_focused_revert(obj);
 }
 
 static void
index 72472c7..3163932 100644 (file)
@@ -384,13 +384,13 @@ _elm_win_rescale(void)
 }
 
 #ifdef HAVE_ELEMENTARY_X
-static int
+static Eina_Bool
 _elm_win_client_message(void *data, int type __UNUSED__, void *event)
 {
    Elm_Win *win = data;
    Ecore_X_Event_Client_Message *e = event;
 
-   if (e->format != 32) return 1;
+   if (e->format != 32) return ECORE_CALLBACK_PASS_ON;
    if (e->message_type == ECORE_X_ATOM_E_COMP_FLUSH)
      {
         if (e->data.l[0] == win->xwin)
@@ -420,7 +420,7 @@ _elm_win_client_message(void *data, int type __UNUSED__, void *event)
                }
           }
      }
-   return 1;
+   return ECORE_CALLBACK_PASS_ON;
 }
 #endif
 
@@ -1583,6 +1583,7 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return;
    free(wd);
 }
 
@@ -1688,6 +1689,10 @@ elm_win_inwin_activate(Evas_Object *obj)
 /**
  * Set the content of an inwin object.
  *
+ * Once the content object is set, a previously set one will be deleted.
+ * If you want to keep that old content object, use the
+ * elm_win_inwin_content_unset() function.
+ *
  * @param obj The inwin object
  * @param content The object to set as content
  *
@@ -1699,8 +1704,8 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
    ELM_CHECK_WIDTYPE(obj, widtype2);
    Widget_Data *wd = elm_widget_data_get(obj);
    if (!wd) return;
-   if ((wd->content) && (wd->content != content))
-     elm_widget_sub_object_del(obj, wd->content);
+   if (wd->content == content) return;
+   if (wd->content) evas_object_del(wd->content);
    wd->content = content;
    if (content)
      {
@@ -1708,8 +1713,32 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
        evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
                                       _changed_size_hints, obj);
        edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
-       _sizing_eval(obj);
      }
+   _sizing_eval(obj);
+}
+
+/**
+ * Unset the content of an inwin object.
+ *
+ * Unparent and return the content object which was set for this widget.
+ *
+ * @param obj The inwin object
+ * @return The content that was being used
+ *
+ * @ingroup Inwin
+ */
+EAPI Evas_Object *
+elm_win_inwin_content_unset(Evas_Object *obj)
+{
+   ELM_CHECK_WIDTYPE(obj, widtype2) NULL;
+   Widget_Data *wd = elm_widget_data_get(obj);
+   if (!wd) return NULL;
+   if (!wd->content) return NULL;
+   Evas_Object *content = wd->content;
+   elm_widget_sub_object_del(obj, wd->content);
+   edje_object_part_unswallow(wd->frm, wd->content);
+   wd->content = NULL;
+   return content;
 }
 
 /* windowing spcific calls - shall we do this differently? */
index 5cd0988..a994c92 100644 (file)
@@ -12,6 +12,8 @@ struct _Smart_Data
    unsigned char fill_inside : 1;
    unsigned char scale_up : 1;
    unsigned char scale_down : 1;
+   unsigned char preloading : 1;
+   unsigned char show : 1;
 };
 
 /* local subsystem functions */
@@ -53,6 +55,9 @@ _els_smart_icon_file_key_set(Evas_Object *obj, const char *file, const char *key
    if (sd->size != 0)
      evas_object_image_load_size_set(sd->obj, sd->size, sd->size);
    evas_object_image_file_set(sd->obj, file, key);
+   sd->preloading = 1;
+   evas_object_image_preload(sd->obj, EINA_FALSE);
+   evas_object_hide(sd->obj);
    if (evas_object_image_load_error_get(sd->obj) != EVAS_LOAD_ERROR_NONE)
      return EINA_FALSE;
    _smart_reconfigure(sd);
@@ -88,6 +93,15 @@ _els_smart_icon_smooth_scale_set(Evas_Object *obj, int smooth)
    evas_object_image_smooth_scale_set(sd->obj, smooth);
 }
 
+Evas_Object *
+_els_smart_icon_object_get(Evas_Object *obj)
+{
+   Smart_Data *sd;
+   sd = evas_object_smart_data_get(obj);
+   if (!sd) return NULL;
+   return sd->obj;
+}
+
 void
 _els_smart_icon_size_get(Evas_Object *obj, int *w, int *h)
 {
@@ -329,6 +343,16 @@ _smart_reconfigure(Smart_Data *sd)
 }
 
 static void
+_preloaded(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
+{
+   Smart_Data *sd = data;
+
+   sd->preloading = 0;
+   if(sd->show)
+     evas_object_show(sd->obj);
+}
+
+static void
 _smart_init(void)
 {
    if (_e_smart) return;
@@ -378,6 +402,7 @@ _smart_add(Evas_Object *obj)
    sd->scale = 1.0;
    evas_object_smart_member_add(sd->obj, obj);
    evas_object_smart_data_set(obj, sd);
+   evas_object_event_callback_add(sd->obj, EVAS_CALLBACK_IMAGE_PRELOADED, _preloaded, sd);
 }
 
 static void
@@ -424,7 +449,9 @@ _smart_show(Evas_Object *obj)
 
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
-   evas_object_show(sd->obj);
+   sd->show = 1;
+   if(!sd->preloading)
+          evas_object_show(sd->obj);
 }
 
 static void
@@ -434,6 +461,7 @@ _smart_hide(Evas_Object *obj)
 
    sd = evas_object_smart_data_get(obj);
    if (!sd) return;
+   sd->show = 0;
    evas_object_hide(sd->obj);
 }
 
index b483305..c18c2f3 100644 (file)
@@ -2,6 +2,7 @@ Evas_Object *_els_smart_icon_add              (Evas *evas);
 Eina_Bool    _els_smart_icon_file_key_set     (Evas_Object *obj, const char *file, const char *key);
 Eina_Bool    _els_smart_icon_file_edje_set    (Evas_Object *obj, const char *file, const char *part);
 void         _els_smart_icon_smooth_scale_set (Evas_Object *obj, int smooth);
+Evas_Object *_els_smart_icon_object_get(Evas_Object *obj);
 void         _els_smart_icon_size_get         (Evas_Object *obj, int *w, int *h);
 void         _els_smart_icon_fill_inside_set  (Evas_Object *obj, int fill_inside);
 void         _els_smart_icon_scale_up_set     (Evas_Object *obj, int scale_up);
index b565456..881aa05 100644 (file)
@@ -105,10 +105,10 @@ static void _smart_pan_changed_hook(void *data, Evas_Object *obj, void *event_in
 static void _smart_pan_pan_changed_hook(void *data, Evas_Object *obj, void *event_info);
 static void _smart_event_wheel(void *data, Evas *e, Evas_Object *obj, void *event_info);
 static void _smart_event_mouse_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int  _smart_hold_animator(void *data);
-static int  _smart_momentum_animator(void *data);
+static Eina_Bool  _smart_hold_animator(void *data);
+static Eina_Bool  _smart_momentum_animator(void *data);
 static void _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static int  _smart_onhold_animator(void *data);
+static Eina_Bool  _smart_onhold_animator(void *data);
 static void _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj, void *event_info);
 static void _smart_event_key_down(void *data, Evas *e, Evas_Object *obj, void *event_info);
 static void _smart_edje_drag_v_start(void *data, Evas_Object *obj, const char *emission, const char *source);
@@ -279,7 +279,7 @@ _smart_drag_stop(Evas_Object *obj)
    evas_object_smart_callback_call(obj, "drag,stop", NULL);
 }
 
-static int
+static Eina_Bool
 _smart_scrollto_x_animator(void *data)
 {
    Smart_Data *sd = data;
@@ -300,10 +300,10 @@ _smart_scrollto_x_animator(void *data)
         sd->scrollto.x.animator = NULL;
         if (!sd->scrollto.y.animator)
           _smart_anim_stop(sd->smart_obj);
-        return 0;
+        return ECORE_CALLBACK_CANCEL;
      }
    elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -344,7 +344,7 @@ _smart_scrollto_x(Smart_Data *sd, double t_in, Evas_Coord pos_x)
    sd->bouncemex = 0;
 }
 
-static int
+static Eina_Bool
 _smart_scrollto_y_animator(void *data)
 {
    Smart_Data *sd = data;
@@ -365,11 +365,11 @@ _smart_scrollto_y_animator(void *data)
         sd->scrollto.y.animator = NULL;
         if (!sd->scrollto.x.animator)
           _smart_anim_stop(sd->smart_obj);
-        return 0;
+        return ECORE_CALLBACK_CANCEL;
      }
    elm_smart_scroller_child_pos_set(sd->smart_obj, px, py);
 
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -490,7 +490,7 @@ _smart_page_adjust(Smart_Data *sd)
    elm_smart_scroller_child_region_show(sd->smart_obj, x, y, w, h);
 }
 
-static int
+static Eina_Bool
 _smart_bounce_x_animator(void *data)
 {
    Smart_Data *sd;
@@ -517,13 +517,13 @@ _smart_bounce_x_animator(void *data)
                sd->down.bounce_x_hold = 1;
              sd->down.bounce_x_animator = NULL;
              sd->bouncemex = 0;
-             return 0;
+             return ECORE_CALLBACK_CANCEL;
           }
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
-static int
+static Eina_Bool
 _smart_bounce_y_animator(void *data)
 {
    Smart_Data *sd;
@@ -550,10 +550,10 @@ _smart_bounce_y_animator(void *data)
                sd->down.bounce_y_hold = 1;
              sd->down.bounce_y_animator = NULL;
              sd->bouncemey = 0;
-             return 0;
+             return ECORE_CALLBACK_CANCEL;
           }
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 #define LEFT 0
@@ -587,7 +587,7 @@ can_scroll(Smart_Data *sd, int dir)
    return EINA_FALSE;
 }
 
-static int
+static Eina_Bool
 _smart_momentum_animator(void *data)
 {
    Smart_Data *sd;
@@ -647,10 +647,10 @@ _smart_momentum_animator(void *data)
              sd->down.bounce_y_hold = 0;
              sd->down.ax = 0;
              sd->down.ay = 0;
-            return 0;
+            return ECORE_CALLBACK_CANCEL;
          }
      }
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static void
@@ -1385,7 +1385,7 @@ _smart_event_mouse_down(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSE
      }
 }
 
-static int
+static Eina_Bool
 _smart_hold_animator(void *data)
 {
    Smart_Data *sd = data;
@@ -1409,11 +1409,11 @@ _smart_hold_animator(void *data)
           }
      }
    elm_smart_scroller_child_pos_set(sd->smart_obj, ox, oy);
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static Eina_Bool
-_smart_event_post_up(void *data, Evas *e)
+_smart_event_post_up(void *data, Evas *e __UNUSED__)
 {
    Smart_Data *sd = data;
    if (sd->widget)
@@ -1589,7 +1589,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
      }
 }
 
-static int
+static Eina_Bool
 _smart_onhold_animator(void *data)
 {
    Smart_Data *sd;
@@ -1634,17 +1634,18 @@ _smart_onhold_animator(void *data)
 //        printf("scroll %i %i\n", sd->down.hold_x, sd->down.hold_y);
      }
    sd->down.onhold_tlast = t;
-   return 1;
+   return ECORE_CALLBACK_RENEW;
 }
 
 static Eina_Bool
-_smart_event_post_move(void *data, Evas *e)
+_smart_event_post_move(void *data, Evas *e __UNUSED__)
 {
    Smart_Data *sd = data;
+
    if (sd->down.want_dragged)
      {
         int start = 0;
-        
+
         if (sd->down.hold_parent)
           {
              if ((sd->down.dir_x) && !can_scroll(sd, sd->down.hdir))
index bea3972..7f7e05b 100644 (file)
@@ -15,7 +15,8 @@ AM_CPPFLAGS = \
 @ELEMENTARY_WIN32_CFLAGS@ \
 @ELEMENTARY_WINCE_CFLAGS@ \
 @ELEMENTARY_EDBUS_CFLAGS@ \
-@ELEMENTARY_EFREET_CFLAGS@
+@ELEMENTARY_EFREET_CFLAGS@ \
+@ELEMENTARY_ETHUMB_CFLAGS@
 
 if ELEMENTARY_WINDOWS_BUILD
 AM_CPPFLAGS += -DELEMENTARY_BUILD