Mike Blumenkrantz (zmike) <mike@zentific.com>
Saumsung Electronics <tbd>
Samsung SAIT <tbd>
+Brett Nash <nash@nash.id.au>
+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
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!
-
-
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = elementary.pc
-installed_headersdir = $(prefix)/include/elementary
-installed_headers_DATA = elementary_config.h
-
.PHONY: doc
doc:
[Desktop Entry]
Type=Link
Name=Illume
-Name[fr]=Illume
Name[el]=Illume
Name[eo]=Illume
Name[zh_CN]=Illume
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 设置主题。
Name=Standard
Name[cs]=Standartní
Name[hu]=Általános
-Name[fr]=Standard
Name[el]=Κανονικό
Name[eo]=Kutima
Name[zh_CN]=标准
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])],
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
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")
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
- ecore-imf >= 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}
]
)
])
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"
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"]
)
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"]
)
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"]
)
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"]
)
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"]
)
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"]
)
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"]
)
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"]
)
icon_22.png \
icon_23.png \
bubble.png \
-bubble_sh.png
+bubble_sh.png \
+mystrale.jpg \
+mystrale_2.jpg
EXTRA_DIST = $(files_DATA)
busy-8.png \
busy-9.png \
arrow_right.png \
+arrow_left.png \
bt_spinner_up.png \
bt_spinner_down.png \
bt_spinner_hilight.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) \
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;
}
}
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;
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;
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;
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 align=left color=#000 wrap=word";
-
- tag: "br" "\n";
- tag: "hilight" "+ font=Sans:style=Bold";
- tag: "b" "+ font=Sans:style=Bold";
- tag: "tab" "\t";
+ 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: "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;
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: "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;
rel2 { relative: 1 1; to: "elm.text"; }
}
}
+
part { name: "elm.text";
type: TEXTBLOCK;
mouse_events: 0;
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: "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"; }
- }
+ 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;
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";
+ 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;
// 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";
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";
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;
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";
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";
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";
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";
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;
offset: 4 -1;
}
}
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
}
part { name: "elm.text";
type: TEXT;
}
}
}
+ 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";
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;
offset: -5 -1;
}
}
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
}
part { name: "elm.text";
type: TEXT;
}
}
}
+ 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";
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;
offset: 4 -5;
}
}
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
}
part { name: "elm.text";
type: TEXT;
}
}
}
+ 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";
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;
offset: -5 -5;
}
}
+ description { state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
}
part { name: "elm.text";
type: TEXT;
}
}
}
+ 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/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";
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
}
}
}
- 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;
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";
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 {
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;
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;
}
}
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";
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";
}
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";
}
}
}
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";
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";
}
}
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";
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";
}
}
- 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;
+ 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";
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";
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";
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;
- }
- }
}
-Revision 49550
-Last Changed Rev 49550
+Revision 51480
+Last Changed Rev 51469
+elementary (1.0.0+svn.51480slp2+build01) unstable; urgency=low
+
+ * efl 1.0 alpha upgrade
+ * Git: 165.213.180.234:/git/slp/pkgs/elementary
+ * Tag: elementary_1.0.0+svn.51480slp2+build01
+
+ -- Jaehwan Kim <jae.hwan.kim@samsung.com> Tue, 31 Aug 2010 22:57:03 +0900
+
elementary (0.4.0+svn.49550slp2+3build52) unstable; urgency=low
* repackage for webview
Package: libelm-dev
Section: libdevel
Architecture: any
-Depends: libelm-svn-01 (= ${binary:Version}), libecore-dev, libevas-dev, libeet-dev, libedje-dev, libedbus-dev, libefreet-dev, libethumb-dev, libwebkit-engine-dev
+Depends: libelm (= ${binary:Version}), libecore-dev, libevas-dev, libeet-dev, libedje-dev, libedbus-dev, libefreet-dev, libethumb-dev, libwebkit-engine-dev
Description: Elementary - a basic widget set that is easy to use based on EFL for mobile
This package contains devel content.
-Package: libelm-svn-01
+Package: libelm
Architecture: any
Depends: ${shlibs:Depends}, libelm-bin
Description: Elementary - a basic widget set that is easy to use based on EFL for mobile
Package: libelm-dbg
Section: debug
Architecture: any
-Depends: ${shlibs:Depends}, libelm-svn-01 (= ${binary:Version})
+Depends: ${shlibs:Depends}, libelm (= ${binary:Version})
Description: Elementary - a basic widget set that is easy to use based on EFL for mobile
This package is a debug package
+++ /dev/null
-debian/tmp/usr/lib/*.so.*
-debian/tmp/usr/lib/*.so
-debian/tmp/usr/lib/edje/*
-debian/tmp/usr/share/elementary/images/*
-debian/tmp/usr/share/elementary/objects/*
-debian/tmp/usr/share/elementary/themes/*
-debian/tmp/usr/share/icons/elementary.png
-debian/tmp/usr/lib/elementary/*
Version: @VERSION@
Libs: -L${libdir} -lelementary
Libs.private: @dlopen_libs@ @my_libs@
-Cflags: -I${includedir} -I${includedir}/elementary
+Cflags: -I${includedir}/elementary-@VMAJ@
test_slideshow.c \
test_menu.c \
test_panel.c \
+test_panes.c \
test_map.c \
test_weather.c \
test_flip.c \
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
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);
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);
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);
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);
ecore_animator_del(ani);
}
-static int
+static Eina_Bool
anim(void *data)
{
Evas_Object *win = data;
evas_object_move(sh, x, y);
evas_object_resize(sh, w, h);
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
void
}
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;
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);
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);
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;
y = 0;
x = (sin(ecore_loop_time_get()) * 500);
evas_object_move(gl, x, y);
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
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
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);
+ }
}
}
}
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
struct _Pginfo
{
- Evas_Object *pager, *pg1, *pg2, *pg3;
+ Evas_Object *win, *pager, *pg1, *pg2, *pg3;
};
static void
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);
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
--- /dev/null
+#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
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"
};
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);
}
static Progressbar _test_progressbar;
-static int
+static Eina_Bool
_my_progressbar_value_set (void *data)
{
double progress;
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#ifndef ELM_LIB_QUICKLAUNCH
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)
}
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));
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;
}
{
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");
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);
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);
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);
}
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);
}
@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 \
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
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 *
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)
{
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)
{
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"))
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;
}
}
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);
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;
}
}
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);
}
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"))
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);
}
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)
{
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)
{
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"))
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);
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)
{
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"))
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);
}
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)
{
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)
{
#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 */
}
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)
{
--- /dev/null
+#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")
+;
--- /dev/null
+#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");
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)
{
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"))
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);
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"))
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);
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)
{
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"))
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)
{
int timeout;
const char *transition;
+ const char *layout;
Eina_Bool loop:1;
Eina_Bool timeout_exists:1;
Eina_Bool loop_exists:1;
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__)
if (p->transition) {
elm_slideshow_transition_set(obj, p->transition);
}
+ if (p->layout) {
+ elm_slideshow_layout_set(obj, p->layout);
+ }
}
static Eina_Bool
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));
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));
{
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)
{
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
};
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)
{
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};
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
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));
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));
{
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)
{
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
};
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"))
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)
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)
{
DEFINE_TYPE(thumb)
DEFINE_TYPE(toggle)
DEFINE_TYPE(toolbar)
+DEFINE_TYPE(notify)
+DEFINE_TYPE(panes)
.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, \
/*
- * vim:ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0
+ *
+ * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifndef ELEMENTARY_H
#define ELEMENTARY_H
#define ELM_VERSION_MAJOR @VMAJ@
#define ELM_VERSION_MINOR @VMIN@
-
+
typedef struct _Elm_Version
{
int major;
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
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,
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
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);
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);
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 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);
*/
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
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);
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
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;
EAPI const Evas_Object *elm_gengrid_item_object_get(Elm_Gengrid_Item *item);
EAPI Elm_Gengrid_Item *elm_gengrid_selected_item_get(const Evas_Object *obj);
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 void elm_gengrid_item_disabled_set(Elm_Gengrid_Item *item, Eina_Bool disabled);
EAPI Eina_Bool elm_gengrid_item_disabled_get(const Elm_Gengrid_Item *item);
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);
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
*/
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 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 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 void elm_notify_timer_init(Evas_Object *obj);
- EAPI void elm_notify_repeat_events_set(Evas_Object *obj, Eina_Bool repeat);
+ 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:
*/
-
- EAPI Evas_Object *elm_selectioninfo_add(Evas_Object *parent);
- EAPI void elm_selectioninfo_content_set(Evas_Object *obj, Evas_Object *content);
- EAPI void elm_selectioninfo_parent_set(Evas_Object *obj, Evas_Object *parent);
- EAPI void elm_selectioninfo_check_state_set(Evas_Object *obj, Eina_Bool *state, int count);
- EAPI int elm_selectioninfo_checked_count_get(Evas_Object *obj);
- EAPI void elm_selectioninfo_label_set(Evas_Object *obj, char* text);
- /* smart callbacks called:
- */
-
+
typedef enum _Elm_Hover_Axis
{
ELM_HOVER_AXIS_NONE,
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
} 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:
*/
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
*/
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);
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);
typedef enum _Elm_Genlist_Item_Flags
{
- ELM_GENLIST_ITEM_NONE = 0,
- ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
+ ELM_GENLIST_ITEM_NONE = 0,
+ ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
} Elm_Genlist_Item_Flags;
typedef enum _Elm_Genlist_Edit_Mode
{
- ELM_GENLIST_EDIT_MODE_NONE = 0,
- ELM_GENLIST_EDIT_MODE_REORDER = (1 << 0),
- ELM_GENLIST_EDIT_MODE_INSERT = (1 << 1),
- ELM_GENLIST_EDIT_MODE_DELETE = (1 << 2),
- ELM_GENLIST_EDIT_MODE_SELECT = (1 << 3),
- ELM_GENLIST_EDIT_MODE_SELECTALL = (1 << 4)
- }Elm_Genlist_Edit_Mode;
- typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class;
- typedef struct _Elm_Genlist_Item Elm_Genlist_Item;
- typedef struct _Elm_Genlist_GroupItem Elm_Genlist_GroupItem;
+ ELM_GENLIST_EDIT_MODE_NONE = 0,
+ ELM_GENLIST_EDIT_MODE_REORDER = (1 << 0),
+ ELM_GENLIST_EDIT_MODE_INSERT = (1 << 1),
+ ELM_GENLIST_EDIT_MODE_DELETE = (1 << 2),
+ ELM_GENLIST_EDIT_MODE_SELECT = (1 << 3),
+ ELM_GENLIST_EDIT_MODE_SELECTALL = (1 << 4)
+ } Elm_Genlist_Edit_Mode;
+ typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class;
+ typedef struct _Elm_Genlist_Item Elm_Genlist_Item;
typedef struct _Elm_Genlist_Item_Class_Func Elm_Genlist_Item_Class_Func;
- typedef struct _Elm_Genlist_Edit_Class Elm_Genlist_Edit_Class;
+ typedef struct _Elm_Genlist_GroupItem Elm_Genlist_GroupItem;
+ typedef struct _Elm_Genlist_Edit_Class Elm_Genlist_Edit_Class;
typedef char *(*GenlistItemLabelGetFunc) (const void *data, Evas_Object *obj, const char *part);
- typedef char *(*GenlistItemLabelChangedFunc) (const void *data, Elm_Genlist_Item *it, const char *text, const int sub_text );
+ typedef char *(*GenlistItemLabelChangedFunc) (const void *data, Elm_Genlist_Item *it, const char *text, const int sub_text );
typedef Evas_Object *(*GenlistItemIconGetFunc) (const void *data, Evas_Object *obj, const char *part);
typedef Eina_Bool (*GenlistItemStateGetFunc) (const void *data, Evas_Object *obj, const char *part);
typedef void (*GenlistItemDelFunc) (const void *data, Evas_Object *obj);
struct _Elm_Genlist_Item_Class
{
- const char *item_style;
- struct _Elm_Genlist_Item_Class_Func
- {
- GenlistItemLabelGetFunc label_get;
- GenlistItemIconGetFunc icon_get;
- GenlistItemStateGetFunc state_get;
- GenlistItemDelFunc del;
- GenlistItemEditModeGetFunc editmode_get;
- GenlistItemLabelChangedFunc label_changed;
- } func;
+ const char *item_style;
+ struct _Elm_Genlist_Item_Class_Func
+ {
+ GenlistItemLabelGetFunc label_get;
+ GenlistItemIconGetFunc icon_get;
+ GenlistItemStateGetFunc state_get;
+ GenlistItemDelFunc del;
+ GenlistItemEditModeGetFunc editmode_get;
+ GenlistItemLabelChangedFunc label_changed;
+ } func;
};
struct _Elm_Genlist_Edit_Class
const char *select_all_item_style;
};
EAPI Evas_Object *elm_genlist_add(Evas_Object *parent);
- 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, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
- EAPI Elm_Genlist_Item *elm_genlist_item_append_with_group(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Elm_Genlist_GroupItem *git, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
- EAPI Elm_Genlist_Item *elm_genlist_item_prepend(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
- EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
- EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
- EAPI void elm_genlist_item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after );
EAPI void elm_genlist_clear(Evas_Object *obj);
- EAPI Elm_Genlist_GroupItem *elm_genlist_groupitem_add(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data);
- EAPI void elm_genlist_groupitem_del( Elm_Genlist_GroupItem *git);
EAPI void elm_genlist_multi_select_set(Evas_Object *obj, Eina_Bool multi);
EAPI Eina_Bool elm_genlist_multi_select_get(const Evas_Object *obj);
+ EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode);
+ EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj);
+ EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
+ EAPI Eina_Bool elm_genlist_always_select_mode_get(const Evas_Object *obj);
+ EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
+ EAPI Eina_Bool elm_genlist_no_select_mode_get(const Evas_Object *obj);
+ EAPI void elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress);
+ EAPI Eina_Bool elm_genlist_compress_mode_get(const Evas_Object *obj);
+ EAPI void elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
+ EAPI void elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
+ EAPI void elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
+ 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);
+ EAPI Elm_Genlist_Item *elm_genlist_item_prepend(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);
+ EAPI Elm_Genlist_Item *elm_genlist_item_insert_before(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *before, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+ EAPI Elm_Genlist_Item *elm_genlist_item_insert_after(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *after, Elm_Genlist_Item_Flags flags, Evas_Smart_Cb func, const void *func_data);
+ /* operations to retrieve existing items */
EAPI Elm_Genlist_Item *elm_genlist_selected_item_get(const Evas_Object *obj);
EAPI const Eina_List *elm_genlist_selected_items_get(const Evas_Object *obj);
EAPI Eina_List *elm_genlist_realized_items_get(const Evas_Object *obj);
EAPI Elm_Genlist_Item *elm_genlist_first_item_get(const Evas_Object *obj);
EAPI Elm_Genlist_Item *elm_genlist_last_item_get(const Evas_Object *obj);
/* available item styles:
- * default
- * default_style - The text part is a textblock
- * double_label
- * icon_top_text_bottom
- */
+ * default
+ * default_style - The text part is a textblock
+ * double_label
+ * icon_top_text_bottom
+ */
/* Genlist Item operation */
EAPI Elm_Genlist_Item *elm_genlist_item_next_get(const Elm_Genlist_Item *item);
EAPI Eina_Bool elm_genlist_item_disabled_get(const Elm_Genlist_Item *item);
EAPI void elm_genlist_item_display_only_set(Elm_Genlist_Item *it, Eina_Bool display_only);
EAPI Eina_Bool elm_genlist_item_display_only_get(const Elm_Genlist_Item *it);
-
EAPI void elm_genlist_item_show(Elm_Genlist_Item *item);
EAPI void elm_genlist_item_bring_in(Elm_Genlist_Item *item);
EAPI void elm_genlist_item_top_show(Elm_Genlist_Item *item);
EAPI void elm_genlist_item_data_set(Elm_Genlist_Item *it, const void *data);
EAPI const Evas_Object *elm_genlist_item_object_get(const Elm_Genlist_Item *it);
EAPI void elm_genlist_item_update(Elm_Genlist_Item *item);
- EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode);
- EAPI Elm_List_Mode elm_genlist_horizontal_mode_get(const Evas_Object *obj);
- EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
- EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
- EAPI void elm_genlist_compress_mode_set(Evas_Object *obj, Eina_Bool compress);
- EAPI Eina_Bool elm_genlist_compress_mode_get(const Evas_Object *obj);
- EAPI void elm_genlist_bounce_set(Evas_Object *obj, Eina_Bool h_bounce, Eina_Bool v_bounce);
- EAPI void elm_genlist_bounce_get(const Evas_Object *obj, Eina_Bool *h_bounce, Eina_Bool *v_bounce);
- EAPI void elm_genlist_homogeneous_set(Evas_Object *obj, Eina_Bool homogeneous);
- 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_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scroller_Policy policy_v);
EINA_DEPRECATED EAPI void elm_genlist_set_edit_mode(Evas_Object *obj, int emode, Elm_Genlist_Edit_Class *ec);
EAPI void elm_genlist_edit_mode_set(Evas_Object *obj, int emode, Elm_Genlist_Edit_Class *ec);
EAPI Eina_List * elm_genlist_edit_selected_items_get(const Evas_Object *obj);
EAPI void elm_genlist_item_rename_mode_set(Elm_Genlist_Item *it, int emode);
+ EAPI Elm_Genlist_GroupItem *elm_genlist_groupitem_add(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data);
+ EAPI void elm_genlist_groupitem_del( Elm_Genlist_GroupItem *git);
+ EAPI Elm_Genlist_Item *elm_genlist_item_append_with_group(Evas_Object *obj, const Elm_Genlist_Item_Class *itc, const void *data, Elm_Genlist_Item *parent, Elm_Genlist_Item_Flags flags, Elm_Genlist_GroupItem *git, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *func_data);
+ EAPI void elm_genlist_item_move_after(Elm_Genlist_Item *it, Elm_Genlist_Item *after );
EAPI Evas_Object *elm_check_add(Evas_Object *parent);
EAPI void elm_check_label_set(Evas_Object *obj, const char *label);
* default
* fade
* fade_translucide
+ * fade_invisible
*/
typedef struct _Elm_Slideshow_Item_Class Elm_Slideshow_Item_Class;
} 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);
EAPI void elm_fileselector_is_save_set(Evas_Object *obj, Eina_Bool is_save);
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).
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
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);
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
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);
/* 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);
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 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);
+
typedef struct _Picker_Item Elm_Picker_Item;
EAPI Evas_Object *elm_picker_add(Evas_Object *parent);
EAPI void elm_picker_next(Evas_Object *obj);
EAPI void elm_tab_edit_disable_set(Evas_Object *obj, Eina_Bool disable);
EAPI Eina_Bool elm_tab_edit_disable_get(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);
- EAPI void elm_animator_pause(Elm_Animator *animator);
- EAPI void elm_animator_resume(Elm_Animator *animator);
-
-
/* tansit */
typedef struct _transit Elm_Transit;
typedef struct _effect Elm_Effect;
EAPI void elm_imageslider_prev(Evas_Object *obj);
EAPI void elm_imageslider_next(Evas_Object *obj);
-
+ EAPI Evas_Object *elm_selectioninfo_add(Evas_Object *parent);
+ EAPI void elm_selectioninfo_content_set(Evas_Object *obj, Evas_Object *content);
+ EAPI void elm_selectioninfo_parent_set(Evas_Object *obj, Evas_Object *parent);
+ EAPI void elm_selectioninfo_check_state_set(Evas_Object *obj, Eina_Bool *state, int count);
+ EAPI int elm_selectioninfo_checked_count_get(Evas_Object *obj);
+ EAPI void elm_selectioninfo_label_set(Evas_Object *obj, char* text);
+
#ifdef __cplusplus
}
#endif
lib_LTLIBRARIES = libelementary.la
-include_HEADERS = Elementary.h
+includes_HEADERS = Elementary.h
+includesdir = $(includedir)/elementary-@VMAJ@
libelementary_la_SOURCES = \
elm_priv.h \
els_box.h \
els_icon.c \
els_icon.h \
+\
els_touch.c \
els_touch.h \
els_webview.c \
}
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;
}
}
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;
}
}
/*** PRIVATES ***/
-static int
+static Eina_Bool
_sel_do(void *data)
{
struct sel_data *sd;
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;
/**
* 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
*
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);
}
/**
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;
}
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;
if (wd->delay_write)
{
ecore_timer_del(wd->delay_write);
- _save(obj);
+ if (wd->autosave) _save(obj);
}
free(wd);
}
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;
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;
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;
text = _load_file(wd->file);
break;
default:
- elm_entry_entry_set(wd->entry, "Unknown Text Format");
text = NULL;
+ break;
}
if (text)
{
}
}
-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
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);
}
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);
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;
/**
* 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
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
*
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;
+}
}
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);
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);
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);
}
/**
#include <Elementary.h>
-#include "elm_priv.h"
/**
* @addtogroup Animator Animator
*
* Support normalized frame value for animation.
*/
-#define MAGIC_OBJ_ANIMATOR 0x40777770
struct _Animator
{
void *animator_arg;
void (*completion_op) (void *data);
void *completion_arg;
- int magic;
Eina_Bool auto_reverse:1;
Eina_Bool on_animating:1;
};
static unsigned int _animator_compute_no_reverse_repeat_count(unsigned int cnt);
static int _animator_animate_cb(void *data);
static void _delete_animator(Elm_Animator *animator);
-static void _animator_parent_del(void *data, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event __UNUSED__);
+//static void _animator_parent_del(void *data);
static unsigned int
_animator_compute_reverse_repeat_count(unsigned int cnt)
_animator_animate_cb(void *data)
{
Elm_Animator *animator = (Elm_Animator *) data;
- double elapsed_time, frame;
+ double elapsed_time, frame, cur_time;
animator->cur_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__)
+_animator_parent_del(void *data)
{
Elm_Animator *animator = data;
elm_animator_del(data);
}
-
+*/
/**
* Get the value of reverse mode.
*
EAPI Eina_Bool
elm_animator_auto_reverse_get(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return EINA_FALSE;
return animator->auto_reverse;
}
EAPI unsigned int
elm_animator_repeat_get(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return EINA_FALSE;
return animator->repeat_cnt;
}
EAPI void
elm_animator_auto_reverse_set(Elm_Animator *animator, Eina_Bool reverse)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (animator->auto_reverse == reverse)
return;
elm_animator_curve_style_set(Elm_Animator *animator,
Elm_Animator_Curve_Style cs)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
switch (cs)
EAPI void
elm_animator_duration_set(Elm_Animator *animator, double duration)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (animator->on_animating)
return;
Elm_Animator *animator,
double frame), void *data)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (animator->on_animating)
return;
EAPI Elm_Animator *
elm_animator_add(Evas_Object *parent)
{
- Elm_Animator *animator = ELM_NEW(Elm_Animator);
+ Elm_Animator *animator = calloc(1, sizeof(Elm_Animator));
if (!animator)
return NULL;
-
- animator->parent = parent;
- animator->magic = MAGIC_OBJ_ANIMATOR;
-
elm_animator_auto_reverse_set(animator, EINA_FALSE);
elm_animator_curve_style_set(animator, ELM_ANIMATOR_CURVE_LINEAR);
- if (parent) {
+/* if (parent) {
evas_object_event_callback_add(parent, EVAS_CALLBACK_DEL,
_animator_parent_del, animator);
- }
+ } */
+
+ animator->parent = parent;
return animator;
}
EAPI Eina_Bool
elm_animator_operating_get(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return EINA_FALSE;
return animator->on_animating;
}
EAPI void
elm_animator_del(Elm_Animator *animator)
{
- if(animator->magic != MAGIC_OBJ_ANIMATOR) {
- return;
- }
+ if (!animator)
+ return;
_delete_animator(animator);
- if(animator->parent) {
+/* if(animator->parent) {
evas_object_event_callback_del(animator->parent, EVAS_CALLBACK_DEL, _animator_parent_del);
- }
+ } */
- memset(animator, 0x0, sizeof(Elm_Animator));
free(animator);
}
elm_animator_completion_callback_set(Elm_Animator *animator,
void (*func) (void *data), void *data)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (animator->on_animating)
return;
EAPI void
elm_animator_pause(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if(!animator)
return;
if(!animator->on_animating)
EAPI void
elm_animator_resume(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if(!animator)
return;
if(!animator->on_animating)
EAPI void
elm_animator_stop(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
animator->on_animating = EINA_FALSE;
_delete_animator(animator);
EAPI void
elm_animator_repeat_set(Elm_Animator *animator, unsigned int repeat_cnt)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (!animator->auto_reverse)
animator->repeat_cnt = repeat_cnt;
EAPI void
elm_animator_animate(Elm_Animator *animator)
{
- if (animator->magic != MAGIC_OBJ_ANIMATOR)
+ if (!animator)
return;
if (!animator->animator_op)
return;
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (label) edje_object_signal_emit(wd->bbl, "elm,state,label,visible", "elm");
- else edje_object_signal_emit(wd->bbl, "elm,state,label,hidden", "elm");
+ if (label) edje_object_signal_emit(wd->bbl, "elm,state,label,add", "elm");
+ else edje_object_signal_emit(wd->bbl, "elm,state,label,del", "elm");
eina_stringshare_replace(&wd->label, label);
edje_object_part_text_set(wd->bbl, "elm.text", label);
_sizing_eval(obj);
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
{
Evas_Object *btn, *icon;
const char *label;
-
Eina_Bool autorepeat;
Eina_Bool repeating;
double ar_threshold;
#endif
}
-static int
+static Eina_Bool
_autorepeat_send(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
return ECORE_CALLBACK_RENEW;
}
-static int
+static Eina_Bool
_autorepeat_initial_send(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
/**
* 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
*/
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);
}
/**
_changed_size_hints, obj);
wd->icon = NULL;
_sizing_eval(obj);
+ edje_object_message_signal_process(wd->chk);
}
}
/**
* 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
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)
{
_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);
}
/**
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;
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
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);
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);
_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;
_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;
_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
{
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);
{
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);
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);
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);
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;
+}
top = elm_widget_top_get(widget);
if (!top) return EINA_FALSE;
- sel->request(elm_win_xwindow_get(top), "TARGETS");
sel->requestformat = format;
sel->requestwidget = widget;
+ sel->request(elm_win_xwindow_get(top), ECORE_X_SELECTION_TARGET_UTF8_STRING);
return EINA_TRUE;
#else
}
static Eina_Bool
-selection_clear(void *udata __UNUSED__, int type, void *event){
+selection_clear(void *udata __UNUSED__, int type __UNUSED__, void *event){
Ecore_X_Event_Selection_Clear *ev = event;
struct _elm_cnp_selection *sel;
int i;
* else it's the data we want.
*/
static Eina_Bool
-selection_notify(void *udata __UNUSED__, int type, void *event){
+selection_notify(void *udata __UNUSED__, int type __UNUSED__, void *event){
Ecore_X_Event_Selection_Notify *ev = event;
struct _elm_cnp_selection *sel;
int i;
static int
-targets_converter(char *target, void *data, int size,
- void **data_ret, int *size_ret,
- Ecore_X_Atom *ttype, int *typesize){
+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;
}
static int
-png_converter(char *target, void *data, int size,
- void **data_ret, int *size_ret,
- Ecore_X_Atom *ttype, int *typesize){
-
+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;
}
*/
static int
notify_handler_targets(struct _elm_cnp_selection *sel,
- Ecore_X_Event_Selection_Notify *notify){
+ Ecore_X_Event_Selection_Notify *notify)
+{
Ecore_X_Selection_Data_Targets *targets;
Ecore_X_Atom *atomlist;
int i,j;
static int
response_handler_targets(struct _elm_cnp_selection *sel,
- Ecore_X_Event_Selection_Notify *notify){
+ Ecore_X_Event_Selection_Notify *notify)
+{
Ecore_X_Selection_Data_Targets *targets;
Ecore_X_Atom *atomlist;
Evas_Object *top;
static int
notify_handler_text(struct _elm_cnp_selection *sel,
- Ecore_X_Event_Selection_Notify *notify){
+ Ecore_X_Event_Selection_Notify *notify)
+{
Ecore_X_Selection_Data *data;
char *str;
}
static int
-notify_handler_png(struct _elm_cnp_selection *sel,
- Ecore_X_Event_Selection_Notify *notify)
+notify_handler_png(struct _elm_cnp_selection *sel __UNUSED__,
+ Ecore_X_Event_Selection_Notify *notify __UNUSED__)
{
cnp_debug("got a png!\n");
- return 0;
+ return 0;
}
static int
-text_converter(char *target, void *data, int size,
- void **data_ret, int *size_ret,
- Ecore_X_Atom *ttype, int *typesize){
+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;
}
static int
-edje_converter(char *target, void *data, int size, void **data_ret,
- int *size_ret, Ecore_X_Atom *ttype, int *typesize){
+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;
static int
-html_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize){
- struct _elm_cnp_selection *sel;
+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);
+ sel = selections + *(int *)data;
+ if (data_ret) *data_ret = strdup(sel->selbuf);
+ if (size_ret) *size_ret = strlen(sel->selbuf);
- return 1;
+ return 1;
}
static int
-uri_converter(char *target, void *data, int size, void **data_ret, int *size_ret, Ecore_X_Atom *ttype, int *typesize){
-
+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");
/* FIXME: Should add provider for each pated item: Use data to store it
* much easier */
static Evas_Object *
-image_provider(void *images, Evas_Object *entry, const char *item)
+image_provider(void *images __UNUSED__, Evas_Object *entry, const char *item)
{
struct pasteimage *pi;
Eina_List *l;
}
static void
-entry_deleted(void *images, Evas *e, Evas_Object *entry, void *unused)
+entry_deleted(void *images __UNUSED__, Evas *e __UNUSED__, Evas_Object *entry, void *unused __UNUSED__)
{
struct pasteimage *pi;
Eina_List *l,*next;
const char *p;
char *q,*ret;
+ if (!start) return NULL;
/* First pass: Count characters */
for (l = 0, p = start ; *p ; p ++)
{
return ret;
}
-/* vim: set ts=8 sw=3 sts=8 noexpandtab cino=>5n-3f0^-2{2 : */
#endif
#define ATOM_E_INPUT_PANEL 5
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)
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;
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;
}
}
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#endif
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
}
*/
-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)
{
}
#endif
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
/**
/**
* 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;
}
Evas_Coord cx, cy, cw, ch;
Eina_List *items;
Eina_List *item_providers;
+ Ecore_Job *hovdeljob;
Mod_Api *api; // module api if supplied
int max_no_of_bytes;
Eina_Bool changed : 1;
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);
}
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);
}
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)
{
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
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);
}
wd->longpress_timer = NULL;
evas_object_smart_callback_call(data, SIG_LONGPRESSED, NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
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 *
_strncpy(char* dest, const char* src, size_t count)
{
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;
}
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
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
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;
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
}
}
}
#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))
{
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);
#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;
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;
}
}
-static int
+static Eina_Bool
_flip(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(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);
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;
}
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
_configure(obj);
}
-static int
+static Eina_Bool
_animate(void *data)
{
return _flip(data);
* 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
*/
}
/**
- * 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
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;
}
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
{
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);
}
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))
{
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)
}
}
-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
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)
{
if (!item->selected)
{
- while (item->wd->selected) _item_unselect(item->wd->selected->data);
+ while (item->wd->selected)
+ _item_unselect(item->wd->selected->data);
}
else
{
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);
_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));
_elm_config->scale);
evas_object_smart_member_add(item->base, item->wd->pan_smart);
elm_widget_sub_object_add(item->wd->self, item->base);
-
- strncpy(buf, "item/", sizeof(buf));
- strncat(buf, item->gic->item_style, sizeof(buf) - strlen(buf));
-
- _elm_theme_object_set(item->wd->self, item->base, "gengrid", buf,
+ 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);
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);
}
}
- 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);
}
_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;
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;
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;
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);
}
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;
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--;
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;
Evas_Object *obj;
Evas *e;
- Evas_Coord minw, minh;
Widget_Data *wd;
static Evas_Smart *smart = NULL;
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);
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;
}
{
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;
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;
+}
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
Eina_Bool bring_in : 1;
Eina_Bool compress : 1;
Eina_Bool homogeneous : 1;
- Eina_Bool selct_all : 1;
-
+ Eina_Bool clear_me : 1;
+ int walking;
int item_width;
int item_height;
int max_items_per_block;
+ double longpress_timeout;
int edit_mode;
int select_all_minh;
Eina_Bool animate_edit_controls :1;
Eina_Bool multi_down : 1;
Eina_Bool multi_touch : 1;
Eina_List *edit_field;
+ Eina_Bool selct_all : 1;
};
struct _Edit_Data
{
_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);
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);
+ }
}
}
if (!it->wd->on_hold)
{
it->wd->on_hold = EINA_TRUE;
+ if (!it->wd->wasselected)
_item_unselect(it);
}
}
}
if (!it->wd->wasselected)
_item_unselect(it);
- it->wd->wasselected = 0;
if (dy < 0)
{
if (ady > adx)
}
}
-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 int
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;
}
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);
return n;
}
-static int
+static Eina_Bool
_item_idler(void *data)
{
Widget_Data *wd = data;
if (!wd->queue)
{
wd->queue_idler = NULL;
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
- return 1;
+ return ECORE_CALLBACK_RENEW;
}
static void
_groupitem_remove((Elm_Genlist_GroupItem *)wd->group_items, EINA_FALSE);
}
+ 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);
it->wd->edit_mode = 0;
}
}
+
+/**
+ * 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;
+}
\ No newline at end of file
{
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
evas_object_smart_callback_add(obj, "sub-object-del", _sub_del, obj);
+ elm_hover_parent_set(obj, parent);
+
_sizing_eval(obj);
return 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
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;
}
}
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;
}
/**
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);
}
if (!wd) return;
_els_smart_icon_scale_size_set(wd->img, size);
}
+
+
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2,t0,(0
- */
#include <Elementary.h>
#include "elm_priv.h"
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", "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_weight_set(o, 1.0, 1.0);
evas_object_size_hint_align_set(o, -1.0, -1.0);
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
/**
* 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
if (!strcmp(swallow, si->swallow))
{
if (content == si->obj) return;
- elm_widget_sub_object_del(obj, si->obj);
+ evas_object_del(si->obj);
break;
}
}
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);
}
/**
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;
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
{
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);
}
/**
+ * 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
/**
* 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
*
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);
}
/**
- * 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
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);
*/
+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
* @ingroup Main
* 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;
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
}
/**
+ * 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
{
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);
+}
-/*
- *
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
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;
(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);
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
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);
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;
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;
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
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
+
EINA_LIST_FREE(wd->groups_clas, group_clas)
{
if (group_clas->style)
eina_matrixsparse_free(wd->markers[i]);
}
+ evas_object_del(wd->sep_maps_markers);
evas_object_del(wd->pan_smart);
wd->pan_smart = NULL;
}
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);
}
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);
{
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);
/**
* 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
*
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
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
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);
/**
* 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
*
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.
*
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
{
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)
}
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);
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
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)
{
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);
evas_object_smart_callback_call(obj, "notify,timeout", NULL);
- return 0;
+ return ECORE_CALLBACK_CANCEL;
}
static void
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);
}
/**
- * 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
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
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
*
}
/**
- * Re-initialize the timer
+ * 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
*
* @ingroup Notify
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);
}
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;
+}
+
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)
{
wd->top = ittop;
o = wd->top->base;
evas_object_show(o);
- if(animate)
- edje_object_signal_emit(o, "elm,action,show", "elm");
+ wd->oldtop = wd->top;
+ wd->top = ittop;
+ o = wd->top->base;
+ evas_object_show(o);
+ if (!animate)
+ edje_object_signal_emit(o, "elm,action,show,noanimate", "elm");
+ else if (wd->oldtop && wd->oldtop->popme)
+ edje_object_signal_emit(o, "elm,action,show", "elm");
else
- edje_object_signal_emit(o, "elm,action,show,noanimate", "elm");
+ edje_object_signal_emit(o, "elm,action,push", "elm");
onshow = edje_object_data_get(o, "onshow");
if (onshow)
{
_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);
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)
{
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;
};
/**
* 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
Evas_Object *frm;
Evas_Object *img;
int size;
+ Eina_Bool fill;
};
static const char *widtype = NULL;
{
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);
}
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__)
{
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
+ Evas_Object *icon;
wd = ELM_NEW(Widget_Data);
e = evas_object_evas_get(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);
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;
}
{
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;
}
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);
+}
+
}
}
-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
}
}
-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);
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;
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
};
enum _elm_sel_format {
- ELM_SEL_MARKUP = 0x01,
- ELM_SEL_IMAGE = 0x02,
+ ELM_SEL_MARKUP = 0x01,
+ ELM_SEL_IMAGE = 0x02,
};
+
+
#define ELM_NEW(t) calloc(1, sizeof(t))
void _elm_win_shutdown(void);
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);
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);
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);
void _elm_config_sub_init(void);
void _elm_config_shutdown(void);
-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_selection_set(enum _elm_sel_type selection, Evas_Object *widget, enum _elm_sel_format format, const char *selbuf);
+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);
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);
}
}
/**
* 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
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)
{
_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);
}
/**
struct _Widget_Data
{
- Evas_Object *chk;
+ Evas_Object *radio;
Evas_Object *icon;
int value;
const char *label;
{
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);
}
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
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);
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;
{
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");
}
}
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);
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);
}
/**
* 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
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);
}
/**
static void
_del_hook(Evas_Object *obj)
{
-
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
free(wd);
}
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)
{
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");
/**
- * 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
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_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;
}
/**
* @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)
*
* @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
*/
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);
}
if (sub == wd->e_icon)
}
}
-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
/**
* 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
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)
{
_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);
}
/**
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
* 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;
// list of Elm_Slideshow_Item*
Eina_List *items;
Eina_List *items_built;
+
Elm_Slideshow_Item *current;
Elm_Slideshow_Item *previous;
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;
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);
}
{
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);
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
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
*
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);
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);
* 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
*
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);
}
/**
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;
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;
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);
* 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
*/
}
/**
+ * 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
}
/**
+ * 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
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);
+ }
}
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);
}
/**
if (!item) return NULL;
return (void *)item->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;
}
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);
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
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
{
}
}
-static int
+static Eina_Bool
_spin_value(void *data)
{
Widget_Data *wd = elm_widget_data_get(data);
{
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);
{
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;
{
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);
{
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;
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;
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;
+}
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;
_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);
}
_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
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
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);
}
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));
}
}
- 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);
}
{
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);
}
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);
static void
_thumb_show(Widget_Data *wd)
{
- evas_object_show(wd->children.frm);
+ evas_object_show(wd->frame);
if (elm_thumb_ethumb_client_connected())
{
}
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;
*
* @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
*/
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,
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", "");
}
/**
}
/**
- * 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.
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);
}
}
/**
* 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
*
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);
}
-/*
- * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
- */
#include <Elementary.h>
#include "elm_priv.h"
Eina_Bool selected : 1;
Eina_Bool disabled : 1;
Eina_Bool separator : 1;
- Eina_Bool menu;
+ Eina_Bool menu : 1;
Evas_Object *o_menu;
};
if (!wd) return;
wd->scrollable = scrollable;
+ elm_smart_scroller_bounce_allow_set(wd->scr, wd->scrollable, 0);
_sizing_eval(obj);
}
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;
double scale;
Elm_Theme *theme;
const char *style;
+ unsigned int focus_order;
int child_drag_x_locked;
int child_drag_y_locked;
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__)
{
}
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;
/* 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);
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
}
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);
}
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);
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)
}
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;
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)
{
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);
}
{
INTERNAL_ENTRY;
evas_object_hide(sd->resize_obj);
+ _if_focused_revert(obj);
}
static 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)
}
}
}
- return 1;
+ return ECORE_CALLBACK_PASS_ON;
}
#endif
_del_hook(Evas_Object *obj)
{
Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
free(wd);
}
/**
* 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
*
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)
{
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? */
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 */
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);
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)
{
}
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;
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
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
sd = evas_object_smart_data_get(obj);
if (!sd) return;
+ sd->show = 0;
evas_object_hide(sd->obj);
}
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);
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);
evas_object_smart_callback_call(obj, "drag,stop", NULL);
}
-static int
+static Eina_Bool
_smart_scrollto_x_animator(void *data)
{
Smart_Data *sd = 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
sd->bouncemex = 0;
}
-static int
+static Eina_Bool
_smart_scrollto_y_animator(void *data)
{
Smart_Data *sd = 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
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;
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;
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
return EINA_FALSE;
}
-static int
+static Eina_Bool
_smart_momentum_animator(void *data)
{
Smart_Data *sd;
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
}
}
-static int
+static Eina_Bool
_smart_hold_animator(void *data)
{
Smart_Data *sd = 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)
}
}
-static int
+static Eina_Bool
_smart_onhold_animator(void *data)
{
Smart_Data *sd;
elm_smart_scroller_child_pos_set(sd->smart_obj, x, 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;
@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
@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
@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