You can subscribe to this list here.
| 2013 |
Jan
|
Feb
(511) |
Mar
(1170) |
Apr
(1093) |
May
(812) |
Jun
(937) |
Jul
(870) |
Aug
(722) |
Sep
(254) |
Oct
|
Nov
|
Dec
|
|---|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-11 09:13:46
|
devilhorns pushed a commit to branch master.
commit 131eb77926ca3041ceaa02aa7287a8b7f985e840
Author: Chris Michael <cp....@sa...>
Date: Wed Sep 11 08:28:22 2013 +0100
Remove wl_keyboard_release and wl_touch_release functions.
NB: Once again, they are redefined in the protocol (for now), so don't
need them here.
Signed-off-by: Chris Michael <cp....@sa...>
---
src/bin/e_comp_wl.c | 50 +++++++++++++++++++++++++++++++++-----------------
1 file changed, 33 insertions(+), 17 deletions(-)
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 2c567f2..36166c5 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -91,6 +91,12 @@ static void _e_comp_wl_pointer_unmap(E_Wayland_Surface *ews);
static void _e_comp_wl_pointer_cb_cursor_set(struct wl_client *client, struct wl_resource *resource, unsigned int serial, struct wl_resource *surface_resource, int x, int y);
static void _e_comp_wl_pointer_cb_release(struct wl_client *client, struct wl_resource *resource);
+/* keyboard interface prototypes */
+static void _e_comp_wl_keyboard_cb_release(struct wl_client *client, struct wl_resource *resource);
+
+/* touch interface prototypes */
+static void _e_comp_wl_touch_cb_release(struct wl_client *client, struct wl_resource *resource);
+
/* region interface prototypes */
static void _e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource);
static void _e_comp_wl_region_cb_add(struct wl_client *client EINA_UNUSED, struct wl_resource *resource, int x, int y, int w, int h);
@@ -135,6 +141,16 @@ static const struct wl_pointer_interface _e_pointer_interface =
_e_comp_wl_pointer_cb_release
};
+static const struct wl_keyboard_interface _e_keyboard_interface =
+{
+ _e_comp_wl_keyboard_cb_release
+};
+
+static const struct wl_touch_interface _e_touch_interface =
+{
+ _e_comp_wl_touch_cb_release
+};
+
static const struct wl_region_interface _e_region_interface =
{
_e_comp_wl_region_cb_destroy,
@@ -648,14 +664,6 @@ wl_keyboard_init(struct wl_keyboard *keyboard)
}
EAPI void
-wl_keyboard_release(struct wl_keyboard *keyboard)
-{
- if (keyboard->focus_resource)
- wl_list_remove(&keyboard->focus_listener.link);
- wl_array_release(&keyboard->keys);
-}
-
-EAPI void
wl_keyboard_set_focus(struct wl_keyboard *keyboard, struct wl_resource *surface)
{
struct wl_resource *resource;
@@ -723,13 +731,6 @@ wl_touch_init(struct wl_touch *touch)
}
EAPI void
-wl_touch_release(struct wl_touch *touch)
-{
- if (touch->focus_resource)
- wl_list_remove(&touch->focus_listener.link);
-}
-
-EAPI void
wl_touch_start_grab(struct wl_touch *device, struct wl_touch_grab *grab)
{
device->grab = grab;
@@ -2145,7 +2146,7 @@ _e_comp_wl_input_cb_keyboard_get(struct wl_client *client, struct wl_resource *r
wl_resource_get_version(resource), id);
wl_list_insert(&input->wl.seat.keyboard->resource_list,
wl_resource_get_link(kbd));
- wl_resource_set_implementation(kbd, NULL, input,
+ wl_resource_set_implementation(kbd, &_e_keyboard_interface, input,
_e_comp_wl_input_cb_unbind);
/* send the current keymap to the keyboard object */
@@ -2184,7 +2185,8 @@ _e_comp_wl_input_cb_touch_get(struct wl_client *client, struct wl_resource *reso
tch = wl_resource_create(client, &wl_touch_interface,
wl_resource_get_version(resource), id);
wl_list_insert(&input->wl.seat.touch->resource_list, &tch->link);
- wl_resource_set_implementation(tch, NULL, input, _e_comp_wl_input_cb_unbind);
+ wl_resource_set_implementation(tch, &_e_touch_interface, input,
+ _e_comp_wl_input_cb_unbind);
}
/* pointer functions */
@@ -2394,6 +2396,20 @@ _e_comp_wl_pointer_cb_release(struct wl_client *client EINA_UNUSED, struct wl_re
wl_resource_destroy(resource);
}
+/* keyboard interface functions */
+static void
+_e_comp_wl_keyboard_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
+{
+ wl_resource_destroy(resource);
+}
+
+/* touch interface functions */
+static void
+_e_comp_wl_touch_cb_release(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
+{
+ wl_resource_destroy(resource);
+}
+
/* region interface functions */
static void
_e_comp_wl_region_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
--
|
|
From: Ryuan C. - E. G. <no-...@en...> - 2013-09-11 08:08:29
|
ryuan pushed a commit to branch master.
commit 9c6d78d996afd547059b834b9712f898a3a4cb27
Author: Ryuan Choi <ryu...@gm...>
Date: Wed Sep 11 17:07:10 2013 +0900
Fixed wrong indentation and missing break in 74f308df9
---
src/lib/elc_fileselector.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 742ac30..f219333 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -837,10 +837,13 @@ _on_text_activated(void *data,
Elm_Object_Item *item = elm_genlist_first_item_get(sd->files_list);
while (item)
{
- const char *item_path = elm_object_item_data_get(item);
- if (!strcmp(item_path, path))
- elm_genlist_item_selected_set(item, EINA_TRUE);
- item = elm_genlist_item_next_get(item);
+ const char *item_path = elm_object_item_data_get(item);
+ if (!strcmp(item_path, path))
+ {
+ elm_genlist_item_selected_set(item, EINA_TRUE);
+ break;
+ }
+ item = elm_genlist_item_next_get(item);
}
}
else
@@ -848,13 +851,13 @@ _on_text_activated(void *data,
Elm_Object_Item *item = elm_gengrid_first_item_get(sd->files_list);
while (item)
{
- const char *item_path = elm_object_item_data_get(item);
- if (!strcmp(item_path, path))
- {
+ const char *item_path = elm_object_item_data_get(item);
+ if (!strcmp(item_path, path))
+ {
elm_gengrid_item_selected_set(item, EINA_TRUE);
break;
- }
- item = elm_gengrid_item_next_get(item);
+ }
+ item = elm_gengrid_item_next_get(item);
}
}
}
--
|
|
From: Mike B. - E. G. <no-...@en...> - 2013-09-11 08:02:14
|
discomfitor pushed a commit to branch master.
commit bdd0bc624dfec69513bf0b96169d6783135e5ed3
Author: Mike Blumenkrantz <m.b...@sa...>
Date: Wed Sep 11 09:01:18 2013 +0100
add wl surface -> e_border mapping
---
src/bin/e_border.c | 10 ++++++++++
src/bin/e_comp_wl.c | 27 +++++++++++++++++++++++++++
src/bin/e_comp_wl.h | 5 +++++
src/modules/wl_desktop_shell/e_mod_main.c | 8 +++++++-
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/src/bin/e_border.c b/src/bin/e_border.c
index a98c009..8a082fe 100644
--- a/src/bin/e_border.c
+++ b/src/bin/e_border.c
@@ -1,4 +1,7 @@
#include "e.h"
+#ifdef HAVE_WAYLAND_CLIENTS
+#include "e_comp_wl.h"
+#endif
//#define INOUTDEBUG_MOUSE 1
//#define INOUTDEBUG_FOCUS 1
@@ -3207,6 +3210,10 @@ e_border_find_by_client_window(Ecore_X_Window win)
if ((bd) && (!e_object_is_del(E_OBJECT(bd))) &&
(bd->client.win == win))
return bd;
+#ifdef HAVE_WAYLAND_CLIENTS
+ bd = e_comp_wl_border_surface_find(win);
+ if (bd && (!e_object_is_del(E_OBJECT(bd)))) return bd;
+#endif
return NULL;
}
@@ -3218,6 +3225,9 @@ e_border_find_all_by_client_window(Ecore_X_Window win)
bd = eina_hash_find(borders_hash, e_util_winid_str_get(win));
if ((bd) && (bd->client.win == win))
return bd;
+#ifdef HAVE_WAYLAND_CLIENTS
+ return e_comp_wl_border_surface_find(win);
+#endif
return NULL;
}
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index ad6e8c6..192902a 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -208,6 +208,8 @@ static const struct wl_pointer_grab_interface _e_drag_grab_interface =
/* local variables */
static Ecore_Idler *_module_idler = NULL;
+static Eina_Hash *_e_wl_border_hash = NULL;
+
/* external variables */
EAPI E_Wayland_Compositor *_e_wl_comp;
@@ -433,6 +435,8 @@ e_comp_wl_shutdown(void)
E_FREE(_e_wl_comp);
}
+ E_FREE_FUNC(_e_wl_border_hash, eina_hash_free);
+
/* disable the loaded shell module */
/* TODO: we should have a config variable somewhere to store which
* shell we want to unload (tablet, mobile, etc) */
@@ -440,6 +444,28 @@ e_comp_wl_shutdown(void)
e_module_disable(mod);
}
+EAPI void
+e_comp_wl_border_surface_add(Ecore_Window win, const E_Border *bd)
+{
+ if (!_e_wl_border_hash)
+ _e_wl_border_hash = eina_hash_int32_new(NULL);
+ eina_hash_add(_e_wl_border_hash, &win, bd);
+}
+
+EAPI void
+e_comp_wl_border_surface_del(Ecore_Window win)
+{
+ if (!_e_wl_border_hash) return;
+ eina_hash_del_by_key(_e_wl_border_hash, &win);
+}
+
+EAPI E_Border *
+e_comp_wl_border_surface_find(Ecore_Window win)
+{
+ if (!_e_wl_border_hash) return NULL;
+ return eina_hash_find(_e_wl_border_hash, &win);
+}
+
EAPI void
wl_seat_init(struct wl_seat *seat)
{
@@ -1615,6 +1641,7 @@ _e_comp_wl_cb_surface_create(struct wl_client *client, struct wl_resource *resou
wl_resource_post_no_memory(resource);
return;
}
+ ews->id = id;
/* initialize the destroy signal */
wl_signal_init(&ews->wl.destroy_signal);
diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index deccf22..05a4aac 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -279,6 +279,7 @@ struct _E_Wayland_Buffer_Reference
struct _E_Wayland_Surface
{
EINA_INLIST;
+ Ecore_Window id;
struct
{
struct wl_resource *surface;
@@ -588,6 +589,10 @@ extern EAPI E_Wayland_Compositor *_e_wl_comp;
EINTERN Eina_Bool e_comp_wl_init(void);
EINTERN void e_comp_wl_shutdown(void);
+EAPI void e_comp_wl_border_surface_add(Ecore_Window win, const E_Border *bd);
+EAPI void e_comp_wl_border_surface_del(Ecore_Window win);
+EAPI E_Border *e_comp_wl_border_surface_find(Ecore_Window win);
+
EAPI void wl_seat_init(struct wl_seat *seat);
EAPI void wl_seat_release(struct wl_seat *seat);
diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c
index 4182e61..9393754 100644
--- a/src/modules/wl_desktop_shell/e_mod_main.c
+++ b/src/modules/wl_desktop_shell/e_mod_main.c
@@ -910,6 +910,8 @@ _e_wl_shell_shell_surface_map(E_Wayland_Surface *ews, Evas_Coord x, Evas_Coord y
default:
break;
}
+ if (ews->bd)
+ e_comp_wl_border_surface_add(ews->id, ews->bd);
}
static void
@@ -962,7 +964,11 @@ _e_wl_shell_shell_surface_unmap(E_Wayland_Surface *ews)
evas_object_del(ews->obj);
}
- if (ews->bd) e_object_del(E_OBJECT(ews->bd));
+ if (ews->bd)
+ {
+ e_comp_wl_border_surface_del(ews->id);
+ e_object_del(E_OBJECT(ews->bd));
+ }
ews->mapped = EINA_FALSE;
}
--
|
|
From: Cedric B. - E. G. <no-...@en...> - 2013-09-11 07:11:29
|
cedric pushed a commit to branch master.
commit 766d1d178884c8f33c14170ff0c14cefbb2ae31d
Author: Cedric Bail <ced...@sa...>
Date: Mon Sep 2 05:40:45 2013 +0200
evil: fix compilation for Windows >= Vista and gcc 4.8.1.
---
src/lib/evil/evil_inet.c | 5 ++++-
src/lib/evil/evil_inet.h | 5 +++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/lib/evil/evil_inet.c b/src/lib/evil/evil_inet.c
index c493833..c24ebaf 100644
--- a/src/lib/evil/evil_inet.c
+++ b/src/lib/evil/evil_inet.c
@@ -22,6 +22,8 @@
* * modification of the management of the error
*/
+#if ! _WIN32_WINNT >= _WIN32_WINNT_VISTA
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
@@ -467,7 +469,6 @@ evil_inet_pton(int af, const char *src, void *dst)
return (result > -1 ? 1 : -1);
}
-
/* const char *
* inet_ntop4(src, dst, size)
* format an IPv4 address, more or less like inet_ntoa()
@@ -643,3 +644,5 @@ const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
return NULL;
return result;
}
+
+#endif
diff --git a/src/lib/evil/evil_inet.h b/src/lib/evil/evil_inet.h
index 56eebda..f8ff49b 100644
--- a/src/lib/evil/evil_inet.h
+++ b/src/lib/evil/evil_inet.h
@@ -18,6 +18,9 @@
#define __EVIL_INET_H__
+#if ! _WIN32_WINNT >= _WIN32_WINNT_VISTA
+
+
/**
* @file evil_inet.h
* @brief The file that provides functions ported from Unix in arpa/inet.h.
@@ -141,6 +144,8 @@ EAPI const char *evil_inet_ntop(int af, const char *src, void *dst, size_t size)
#define inet_ntop(x,y,z,s) evil_inet_ntop(x,y,z,s)
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_VISTA */
+
/**
* @}
--
|
|
From: Cedric B. - E. G. <no-...@en...> - 2013-09-11 07:11:27
|
cedric pushed a commit to branch master.
commit cd77853222d1c11d71da4ca9066abe35390dcd5e
Author: Cedric Bail <ced...@sa...>
Date: Wed Sep 11 16:08:06 2013 +0900
eo: add eo_childrens_iterator_new().
The goal would be to replace the smart children list and friends. The
problem is that they differ in content. Smart children and Eo children are
the same, but Elm children and them differ. If I put this function as a
virtual, it would be possible to override the list of children and if we
start using it in Evas render loop, that could result in "weird" behavior.
I have added the use of a simplified Eina_Trash mempool kind of feature
to have some fast path for allocation if we start using it in Evas render
loop.
---
src/lib/eo/Eo.h | 9 ++++
src/lib/eo/eo.c | 113 ++++++++++++++++++++++++++++++++++++++++++++----
src/lib/eo/eo_private.h | 26 +++++++----
3 files changed, 130 insertions(+), 18 deletions(-)
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index 049dcaa..4921f6d 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -797,6 +797,15 @@ EAPI Eo *eo_add_internal(const char *file, int line, const Eo_Class *klass, Eo *
EAPI Eo *eo_parent_get(const Eo *obj);
/**
+ * @brief Get an iterator on all childrens
+ * @param obj the object to get the childrens from.
+ * @return a pointer to an Eina_Iterator containing all the childrens.
+ *
+ * @see eo_parent_set()
+ */
+EAPI Eina_Iterator *eo_childrens_iterator_new(Eo *obj_id);
+
+/**
* @brief Set the parent of an object
* @param obj the object to get the parent of.
* @param parent the new parent.
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 835eb86..1985a57 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -687,7 +687,7 @@ eo_class_funcs_set(Eo_Class *klass_id, const Eo_Op_Func_Description *func_descs)
static void
eo_class_free(_Eo_Class *klass)
{
- void *object;
+ void *data;
if (klass->constructed)
{
@@ -697,10 +697,14 @@ eo_class_free(_Eo_Class *klass)
_dich_func_clean_all(klass);
}
- EINA_TRASH_CLEAN(&klass->trash, object)
- free(object);
+ EINA_TRASH_CLEAN(&klass->objects.trash, data)
+ free(data);
- eina_lock_free(&klass->trash_lock);
+ EINA_TRASH_CLEAN(&klass->iterators.trash, data)
+ free(data);
+
+ eina_lock_free(&klass->objects.trash_lock);
+ eina_lock_free(&klass->iterators.trash_lock);
free(klass);
}
@@ -893,7 +897,8 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz);
EINA_MAGIC_SET(klass, EO_CLASS_EINA_MAGIC);
- eina_lock_new(&klass->trash_lock);
+ eina_lock_new(&klass->objects.trash_lock);
+ eina_lock_new(&klass->iterators.trash_lock);
klass->parent = parent;
klass->desc = desc;
klass->extensions = (const _Eo_Class **) ((char *) klass + _eo_class_sz);
@@ -1077,6 +1082,96 @@ eo_parent_set(Eo *obj_id, const Eo *parent_id)
return EINA_TRUE;
}
+/* Children accessor */
+typedef struct _Eo_Children_Iterator Eo_Children_Iterator;
+struct _Eo_Children_Iterator
+{
+ Eina_Iterator iterator;
+ Eina_List *current;
+ _Eo *obj;
+ Eo *obj_id;
+
+};
+
+static Eina_Bool
+_eo_children_iterator_next(Eo_Children_Iterator *it, void **data)
+{
+ if (!it->current) return EINA_FALSE;
+
+ if (data) *data = eina_list_data_get(it->current);
+ it->current = eina_list_next(it->current);
+
+ return EINA_TRUE;
+}
+
+static Eo *
+_eo_children_iterator_container(Eo_Children_Iterator *it)
+{
+ return it->obj_id;
+}
+
+static void
+_eo_children_iterator_free(Eo_Children_Iterator *it)
+{
+ _Eo_Class *klass;
+ _Eo *obj;
+
+ klass = (_Eo_Class*) it->obj->klass;
+ obj = it->obj;
+
+ eina_lock_take(&klass->iterators.trash_lock);
+ if (klass->iterators.trash_count < 8)
+ {
+ klass->iterators.trash_count++;
+ eina_trash_push(&klass->iterators.trash, it);
+ }
+ else
+ {
+ free(it);
+ }
+ eina_lock_release(&klass->iterators.trash_lock);
+
+ _eo_unref(obj);
+}
+
+EAPI Eina_Iterator *
+eo_childrens_iterator_new(Eo *obj_id)
+{
+ Eo_Children_Iterator *it;
+ _Eo_Class *klass;
+
+ EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
+
+ if (!obj->children) return NULL;
+
+ klass = (_Eo_Class*) obj->klass;
+
+ eina_lock_take(&klass->iterators.trash_lock);
+ it = eina_trash_pop(&klass->iterators.trash);
+ if (it)
+ {
+ klass->iterators.trash_count--;
+ memset(it, 0, sizeof (Eo_Children_Iterator));
+ }
+ else
+ {
+ it = calloc(1, sizeof (Eo_Children_Iterator));
+ }
+ eina_lock_release(&klass->iterators.trash_lock);
+ if (!it) return NULL;
+
+ EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
+ it->current = obj->children;
+ it->obj = _eo_ref(obj);
+ it->obj_id = obj_id;
+
+ it->iterator.next = FUNC_ITERATOR_NEXT(_eo_children_iterator_next);
+ it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_eo_children_iterator_container);
+ it->iterator.free = FUNC_ITERATOR_FREE(_eo_children_iterator_free);
+
+ return &it->iterator;
+}
+
EAPI Eo *
eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, ...)
{
@@ -1096,18 +1191,18 @@ eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent
return NULL;
}
- eina_lock_take(&klass->trash_lock);
- obj = eina_trash_pop(&klass->trash);
+ eina_lock_take(&klass->objects.trash_lock);
+ obj = eina_trash_pop(&klass->objects.trash);
if (obj)
{
memset(obj, 0, klass->obj_size);
- klass->trash_count--;
+ klass->objects.trash_count--;
}
else
{
obj = calloc(1, klass->obj_size);
}
- eina_lock_release(&klass->trash_lock);
+ eina_lock_release(&klass->objects.trash_lock);
obj->refcount++;
obj->klass = klass;
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index 5912517..0553c7b 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -140,9 +140,18 @@ struct _Eo_Class
const _Eo_Class **mro;
/* cached object for faster allocation */
- Eina_Trash *trash;
- Eina_Lock trash_lock;
- unsigned int trash_count;
+ struct {
+ Eina_Trash *trash;
+ Eina_Lock trash_lock;
+ unsigned int trash_count;
+ } objects;
+
+ /* cached iterator for faster allocation cycle */
+ struct {
+ Eina_Trash *trash;
+ Eina_Lock trash_lock;
+ unsigned int trash_count;
+ } iterators;
unsigned int obj_size; /**< size of an object of this class */
unsigned int chain_size;
@@ -219,18 +228,17 @@ _eo_free(_Eo *obj)
#endif
_eo_id_release(obj->obj_id);
- eina_lock_take(&klass->trash_lock);
- if (klass->trash_count <= 8)
+ eina_lock_take(&klass->objects.trash_lock);
+ if (klass->objects.trash_count <= 8)
{
- eina_trash_push(&klass->trash, obj);
- klass->trash_count++;
- eina_lock_release(&klass->trash_lock);
+ eina_trash_push(&klass->objects.trash, obj);
+ klass->objects.trash_count++;
}
else
{
- eina_lock_release(&klass->trash_lock);
free(obj);
}
+ eina_lock_release(&klass->objects.trash_lock);
}
static inline _Eo *
--
|
|
From: Cedric B. - E. G. <no-...@en...> - 2013-09-11 02:24:34
|
cedric pushed a commit to branch master.
commit 5290befb53a0ab27a18bea23bb688ecf8624b717
Author: Cedric Bail <ced...@sa...>
Date: Wed Sep 11 11:23:50 2013 +0900
eo: add a small object cache to make memory recycling faster.
---
src/lib/eo/eo.c | 23 ++++++++++++++++++++++-
src/lib/eo/eo_private.h | 21 ++++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index b1f2d15..835eb86 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -687,6 +687,8 @@ eo_class_funcs_set(Eo_Class *klass_id, const Eo_Op_Func_Description *func_descs)
static void
eo_class_free(_Eo_Class *klass)
{
+ void *object;
+
if (klass->constructed)
{
if (klass->desc->class_destructor)
@@ -695,6 +697,11 @@ eo_class_free(_Eo_Class *klass)
_dich_func_clean_all(klass);
}
+ EINA_TRASH_CLEAN(&klass->trash, object)
+ free(object);
+
+ eina_lock_free(&klass->trash_lock);
+
free(klass);
}
@@ -886,6 +893,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz);
EINA_MAGIC_SET(klass, EO_CLASS_EINA_MAGIC);
+ eina_lock_new(&klass->trash_lock);
klass->parent = parent;
klass->desc = desc;
klass->extensions = (const _Eo_Class **) ((char *) klass + _eo_class_sz);
@@ -1073,6 +1081,7 @@ EAPI Eo *
eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent_id, ...)
{
Eina_Bool do_err;
+ _Eo *obj;
_Eo_Class *klass = _eo_class_pointer_get(klass_id);
EO_MAGIC_RETURN_VAL(klass, EO_CLASS_EINA_MAGIC, NULL);
@@ -1087,7 +1096,19 @@ eo_add_internal(const char *file, int line, const Eo_Class *klass_id, Eo *parent
return NULL;
}
- _Eo *obj = calloc(1, klass->obj_size);
+ eina_lock_take(&klass->trash_lock);
+ obj = eina_trash_pop(&klass->trash);
+ if (obj)
+ {
+ memset(obj, 0, klass->obj_size);
+ klass->trash_count--;
+ }
+ else
+ {
+ obj = calloc(1, klass->obj_size);
+ }
+ eina_lock_release(&klass->trash_lock);
+
obj->refcount++;
obj->klass = klass;
diff --git a/src/lib/eo/eo_private.h b/src/lib/eo/eo_private.h
index b236b08..5912517 100644
--- a/src/lib/eo/eo_private.h
+++ b/src/lib/eo/eo_private.h
@@ -139,6 +139,11 @@ struct _Eo_Class
const _Eo_Class **mro;
+ /* cached object for faster allocation */
+ Eina_Trash *trash;
+ Eina_Lock trash_lock;
+ unsigned int trash_count;
+
unsigned int obj_size; /**< size of an object of this class */
unsigned int chain_size;
unsigned int base_id;
@@ -204,6 +209,8 @@ _eo_del_internal(const char *file, int line, _Eo *obj)
static inline void
_eo_free(_Eo *obj)
{
+ _Eo_Class *klass = (_Eo_Class*) obj->klass;
+
#ifdef EO_DEBUG
if (obj->datarefcount)
{
@@ -211,7 +218,19 @@ _eo_free(_Eo *obj)
}
#endif
_eo_id_release(obj->obj_id);
- free(obj);
+
+ eina_lock_take(&klass->trash_lock);
+ if (klass->trash_count <= 8)
+ {
+ eina_trash_push(&klass->trash, obj);
+ klass->trash_count++;
+ eina_lock_release(&klass->trash_lock);
+ }
+ else
+ {
+ eina_lock_release(&klass->trash_lock);
+ free(obj);
+ }
}
static inline _Eo *
--
|
|
From: Ryuan C. - E. G. <no-...@en...> - 2013-09-10 23:47:01
|
ryuan pushed a commit to branch master.
commit ef5b8dc73e52e0c2485a8c3dbb6a38c411e83182
Author: Ryuan Choi <ryu...@gm...>
Date: Wed Sep 11 08:39:59 2013 +0900
config: Remove unnecessary alloc/free in _profile_fetch_from_conf()
---
src/lib/elm_config.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index 2fcb6f0..d5a3b91 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -867,13 +867,10 @@ _profile_fetch_from_conf(void)
Eet_File *ef = NULL;
int len = 0;
- _elm_profile = strdup("default");
-
// if env var - use profile without question
s = getenv("ELM_PROFILE");
if (s)
{
- free(_elm_profile);
_elm_profile = strdup(s);
return;
}
@@ -886,16 +883,15 @@ _profile_fetch_from_conf(void)
p = eet_read(ef, "config", &len);
if (p)
{
- free(_elm_profile);
_elm_profile = malloc(len + 1);
memcpy(_elm_profile, p, len);
_elm_profile[len] = 0;
free(p);
+ eet_close(ef);
+ return;
}
eet_close(ef);
- if (!p) ef = NULL;
}
- if (ef) return;
// system profile
_elm_data_dir_snprintf(buf, sizeof(buf), "config/profile.cfg");
@@ -905,14 +901,17 @@ _profile_fetch_from_conf(void)
p = eet_read(ef, "config", &len);
if (p)
{
- free(_elm_profile);
_elm_profile = malloc(len + 1);
memcpy(_elm_profile, p, len);
_elm_profile[len] = 0;
free(p);
+ eet_close(ef);
+ return;
}
eet_close(ef);
}
+
+ _elm_profile = strdup("default");
}
static void
--
|
|
From: José R. de S. - E. G. <no-...@en...> - 2013-09-10 20:49:21
|
zehortigoza pushed a commit to branch master.
commit 420c959cc9e14995f5361339f35cbf5cdfba5e21
Author: José Roberto de Souza <jos...@in...>
Date: Tue Sep 10 17:48:16 2013 -0300
Missing ChangeLog and News about new elm_table api
---
ChangeLog | 4 ++++
NEWS | 1 +
2 files changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 9b701ef..910ebc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1603,3 +1603,7 @@
* elc_fileselector : Navigate (if needed) and select file with "selected"
signal when user typed file path on path_entry.
+
+2013-09-10 Jose Roberto de Souza (zehortigoza)
+
+ * table : Introduce elm_table_child_get() API.
diff --git a/NEWS b/NEWS
index b14ad6c..ba35f61 100644
--- a/NEWS
+++ b/NEWS
@@ -87,6 +87,7 @@ Additions:
* Add bg reset feature.
* Add elm_object_item_object_get().
* Added support for more than one progress status in a progressbar.
+ * Add elm_table_child_get().
Improvements:
--
|
|
From: Rafael A. - E. G. <no-...@en...> - 2013-09-10 19:49:00
|
antognolli pushed a commit to branch ecore-1.7.
commit 24630e491a5bef740786805f93253a7d086f84b0
Author: Rafael Antognolli <raf...@in...>
Date: Tue Sep 10 16:43:35 2013 -0300
ecore_evas/wayland: Add a clipper to the frame object.
The frame object is a simple smart object with two children: a rectangle
(background) and a text (title). During the render phase, these objects
get wrongly clipped to the client area clipper, because they have no
clipper.
This commit adds a clipper to the frame smart object, and clip the other
children to it, so they won't get clipped to the client area clipper.
It fix an old bug where there was a flickering behavior on the window
decorations. The bug only happened on wayland_egl because of differences
on how this backend handles dirty areas, but it could be a source of new
bugs on wayland_shm too, so the solution is applied to both engines.
---
src/lib/ecore_evas/ecore_evas_wayland_egl.c | 17 +++++++++++++----
src/lib/ecore_evas/ecore_evas_wayland_shm.c | 17 +++++++++++++----
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/src/lib/ecore_evas/ecore_evas_wayland_egl.c b/src/lib/ecore_evas/ecore_evas_wayland_egl.c
index 7614341..46fcdb3 100644
--- a/src/lib/ecore_evas/ecore_evas_wayland_egl.c
+++ b/src/lib/ecore_evas/ecore_evas_wayland_egl.c
@@ -63,6 +63,7 @@ struct _EE_Wl_Smart_Data
{
Evas_Object *frame;
Evas_Object *text;
+ Evas_Object *clipper;
Evas_Coord x, y, w, h;
};
@@ -1147,9 +1148,15 @@ _ecore_evas_wl_smart_add(Evas_Object *obj)
sd->w = 1;
sd->h = 1;
+ sd->clipper = evas_object_rectangle_add(evas);
+ evas_object_color_set(sd->clipper, 255, 255, 255, 255);
+ evas_object_smart_member_add(sd->clipper, obj);
+
sd->frame = evas_object_rectangle_add(evas);
evas_object_color_set(sd->frame, 249, 249, 249, 255);
evas_object_smart_member_add(sd->frame, obj);
+ evas_object_clip_set(sd->frame, sd->clipper);
+ evas_object_show(sd->frame);
sd->text = evas_object_text_add(evas);
evas_object_color_set(sd->text, 0, 0, 0, 255);
@@ -1157,6 +1164,8 @@ _ecore_evas_wl_smart_add(Evas_Object *obj)
evas_object_text_font_set(sd->text, "Sans", 10);
evas_object_text_text_set(sd->text, "Smart Test");
evas_object_smart_member_add(sd->text, obj);
+ evas_object_clip_set(sd->text, sd->clipper);
+ evas_object_show(sd->text);
evas_object_smart_data_set(obj, sd);
}
@@ -1171,6 +1180,7 @@ _ecore_evas_wl_smart_del(Evas_Object *obj)
if (!(sd = evas_object_smart_data_get(obj))) return;
evas_object_del(sd->text);
evas_object_del(sd->frame);
+ evas_object_del(sd->clipper);
free(sd);
}
@@ -1186,6 +1196,7 @@ _ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
sd->w = w;
sd->h = h;
evas_object_resize(sd->frame, w, h);
+ evas_object_resize(sd->clipper, w, h);
}
static void
@@ -1196,8 +1207,7 @@ _ecore_evas_wl_smart_show(Evas_Object *obj)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(sd = evas_object_smart_data_get(obj))) return;
- evas_object_show(sd->frame);
- evas_object_show(sd->text);
+ evas_object_show(sd->clipper);
}
static void
@@ -1208,8 +1218,7 @@ _ecore_evas_wl_smart_hide(Evas_Object *obj)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(sd = evas_object_smart_data_get(obj))) return;
- evas_object_hide(sd->text);
- evas_object_hide(sd->frame);
+ evas_object_hide(sd->clipper);
}
static Evas_Object *
diff --git a/src/lib/ecore_evas/ecore_evas_wayland_shm.c b/src/lib/ecore_evas/ecore_evas_wayland_shm.c
index a8e0181..75ac0ea 100644
--- a/src/lib/ecore_evas/ecore_evas_wayland_shm.c
+++ b/src/lib/ecore_evas/ecore_evas_wayland_shm.c
@@ -63,6 +63,7 @@ struct _EE_Wl_Smart_Data
{
Evas_Object *frame;
Evas_Object *text;
+ Evas_Object *clipper;
Evas_Coord x, y, w, h;
};
@@ -1350,9 +1351,15 @@ _ecore_evas_wl_smart_add(Evas_Object *obj)
sd->w = 1;
sd->h = 1;
+ sd->clipper = evas_object_rectangle_add(evas);
+ evas_object_color_set(sd->clipper, 255, 255, 255, 255);
+ evas_object_smart_member_add(sd->clipper, obj);
+
sd->frame = evas_object_rectangle_add(evas);
evas_object_color_set(sd->frame, 249, 249, 249, 255);
evas_object_smart_member_add(sd->frame, obj);
+ evas_object_clip_set(sd->frame, sd->clipper);
+ evas_object_show(sd->frame);
sd->text = evas_object_text_add(evas);
evas_object_color_set(sd->text, 0, 0, 0, 255);
@@ -1360,6 +1367,8 @@ _ecore_evas_wl_smart_add(Evas_Object *obj)
evas_object_text_font_set(sd->text, "Sans", 10);
evas_object_text_text_set(sd->text, "Smart Test");
evas_object_smart_member_add(sd->text, obj);
+ evas_object_clip_set(sd->text, sd->clipper);
+ evas_object_show(sd->text);
evas_object_smart_data_set(obj, sd);
}
@@ -1374,6 +1383,7 @@ _ecore_evas_wl_smart_del(Evas_Object *obj)
if (!(sd = evas_object_smart_data_get(obj))) return;
evas_object_del(sd->text);
evas_object_del(sd->frame);
+ evas_object_del(sd->clipper);
free(sd);
}
@@ -1389,6 +1399,7 @@ _ecore_evas_wl_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
sd->w = w;
sd->h = h;
evas_object_resize(sd->frame, w, h);
+ evas_object_resize(sd->clipper, w, h);
}
static void
@@ -1399,8 +1410,7 @@ _ecore_evas_wl_smart_show(Evas_Object *obj)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(sd = evas_object_smart_data_get(obj))) return;
- evas_object_show(sd->frame);
- evas_object_show(sd->text);
+ evas_object_show(sd->clipper);
}
static void
@@ -1411,8 +1421,7 @@ _ecore_evas_wl_smart_hide(Evas_Object *obj)
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(sd = evas_object_smart_data_get(obj))) return;
- evas_object_hide(sd->text);
- evas_object_hide(sd->frame);
+ evas_object_hide(sd->clipper);
}
static Evas_Object *
--
|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-10 15:00:48
|
devilhorns pushed a commit to branch master.
commit 164299e689b6e08aa64024209710831e9bd63a29
Author: Chris Michael <cp....@sa...>
Date: Tue Sep 10 15:58:46 2013 +0100
Rework keyboard repeat to use an ecore_timer (not a timerfd).
NB: This fixes keyboard repeat in terminology (under wayland) to be
sane again :)
Signed-off-by: Chris Michael <cp....@sa...>
---
src/lib/ecore_wayland/Ecore_Wayland.h | 3 +-
src/lib/ecore_wayland/ecore_wl_input.c | 66 ++++++++--------------------------
2 files changed, 16 insertions(+), 53 deletions(-)
diff --git a/src/lib/ecore_wayland/Ecore_Wayland.h b/src/lib/ecore_wayland/Ecore_Wayland.h
index f21aad2..c43ae49 100644
--- a/src/lib/ecore_wayland/Ecore_Wayland.h
+++ b/src/lib/ecore_wayland/Ecore_Wayland.h
@@ -192,8 +192,7 @@ struct _Ecore_Wl_Input
struct
{
- Ecore_Fd_Handler *hdlr;
- int timerfd;
+ Ecore_Timer *tmr;
unsigned int sym, key, time;
} repeat;
};
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 0ece81b..6f56e9f 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -19,7 +19,6 @@
#include "ecore_wl_private.h"
#include <sys/mman.h>
-#include <sys/timerfd.h>
#include <ctype.h>
/* FIXME: This gives BTN_LEFT/RIGHT/MIDDLE for linux systems ...
@@ -69,7 +68,7 @@ static void _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_keyboard *ke
static void _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigned int serial, struct wl_surface *surface);
static void _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigned int serial, unsigned int timestamp, unsigned int key, unsigned int state);
static void _ecore_wl_input_cb_keyboard_modifiers(void *data, struct wl_keyboard *keyboard EINA_UNUSED, unsigned int serial EINA_UNUSED, unsigned int depressed, unsigned int latched, unsigned int locked, unsigned int group);
-static Eina_Bool _ecore_wl_input_cb_keyboard_repeat(void *data, Ecore_Fd_Handler *handler EINA_UNUSED);
+static Eina_Bool _ecore_wl_input_cb_keyboard_repeat(void *data);
static void _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch, unsigned int serial, unsigned int timestamp, struct wl_surface *surface EINA_UNUSED, int id EINA_UNUSED, wl_fixed_t x, wl_fixed_t y);
static void _ecore_wl_input_cb_touch_up(void *data, struct wl_touch *touch, unsigned int serial, unsigned int timestamp, int id EINA_UNUSED);
static void _ecore_wl_input_cb_touch_motion(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int timestamp, int id, wl_fixed_t x, wl_fixed_t y);
@@ -320,14 +319,6 @@ _ecore_wl_input_add(Ecore_Wl_Display *ewd, unsigned int id)
input->cursor_surface =
wl_compositor_create_surface(_ecore_wl_disp->wl.compositor);
- input->repeat.timerfd =
- timerfd_create(CLOCK_MONOTONIC, (TFD_CLOEXEC | TFD_NONBLOCK));
-
- input->repeat.hdlr =
- ecore_main_fd_handler_add(input->repeat.timerfd, ECORE_FD_READ,
- _ecore_wl_input_cb_keyboard_repeat, input,
- NULL, NULL);
-
ewd->input = input;
}
@@ -382,11 +373,8 @@ _ecore_wl_input_del(Ecore_Wl_Input *input)
wl_list_remove(&input->link);
if (input->seat) wl_seat_destroy(input->seat);
- if (input->repeat.hdlr) ecore_main_fd_handler_del(input->repeat.hdlr);
- input->repeat.hdlr = NULL;
-
- if (input->repeat.timerfd) close(input->repeat.timerfd);
- input->repeat.timerfd = 0;
+ if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
+ input->repeat.tmr = NULL;
free(input);
}
@@ -638,7 +626,6 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
xkb_keysym_t sym = XKB_KEY_NoSymbol;
char key[32], keyname[32], compose[32];
Ecore_Event_Key *e;
- struct itimerspec ts;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@@ -707,30 +694,21 @@ _ecore_wl_input_cb_keyboard_key(void *data, struct wl_keyboard *keyboard EINA_UN
input->repeat.key = 0;
input->repeat.time = 0;
- ts.it_interval.tv_sec = 0;
- ts.it_interval.tv_nsec = 0;
- ts.it_value.tv_sec = 0;
- ts.it_value.tv_nsec = 0;
-
- timerfd_settime(input->repeat.timerfd, 0, &ts, NULL);
+ if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
+ input->repeat.tmr = NULL;
}
- else if ((state)) //&&
- /* ((!input->repeat.key) || */
- /* ((keycode) && (keycode != input->repeat.key)))) */
+ else if (state)
{
input->repeat.sym = sym;
input->repeat.key = keycode;
input->repeat.time = timestamp;
- /* interval after expires */
- ts.it_interval.tv_sec = 0;
- ts.it_interval.tv_nsec = 35 * 1000 * 1000;
-
- /* initial expiration */
- ts.it_value.tv_sec = 0;
- ts.it_value.tv_nsec = 500 * 1000 * 1000;
-
- timerfd_settime(input->repeat.timerfd, 0, &ts, NULL);
+ if (!input->repeat.tmr)
+ {
+ input->repeat.tmr =
+ ecore_timer_add(0.025, _ecore_wl_input_cb_keyboard_repeat, input);
+ ecore_timer_delay(input->repeat.tmr, 0.4);
+ }
}
}
@@ -762,20 +740,15 @@ _ecore_wl_input_cb_keyboard_modifiers(void *data, struct wl_keyboard *keyboard E
}
static Eina_Bool
-_ecore_wl_input_cb_keyboard_repeat(void *data, Ecore_Fd_Handler *handler EINA_UNUSED)
+_ecore_wl_input_cb_keyboard_repeat(void *data)
{
Ecore_Wl_Input *input;
Ecore_Wl_Window *win = NULL;
- unsigned long long int xp;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
if (!(input = data)) return ECORE_CALLBACK_RENEW;
- /* Trap for EAGAIN */
- if (read(input->repeat.timerfd, &xp, sizeof(xp)) != sizeof(xp))
- return ECORE_CALLBACK_RENEW;
-
if ((win = input->keyboard_focus))
_ecore_wl_input_cb_keyboard_key(input, NULL, input->display->serial,
input->repeat.time,
@@ -937,17 +910,8 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard EINA_
if (!surface) return;
if (!(input = data)) return;
- if (input->repeat.timerfd)
- {
- struct itimerspec ts;
-
- ts.it_interval.tv_sec = 0;
- ts.it_interval.tv_nsec = 0;
- ts.it_value.tv_sec = 0;
- ts.it_value.tv_nsec = 0;
-
- timerfd_settime(input->repeat.timerfd, 0, &ts, NULL);
- }
+ if (input->repeat.tmr) ecore_timer_del(input->repeat.tmr);
+ input->repeat.tmr = NULL;
if (!input->timestamp)
{
--
|
|
From: Tom H. - E. G. <no-...@en...> - 2013-09-10 14:59:49
|
tasn pushed a commit to branch master.
commit 77cf31d322231d0459eefecad51b6f15a236c498
Author: Tom Hacohen <to...@st...>
Date: Tue Sep 10 15:56:52 2013 +0100
Eo: Set (again, got removed) deleted eo objects' magic.
The French tried to sneak a bug in, they failed.
Bug was introduced in 337fac0e73eb94c9b5c8f091ab0998e8dcde01f7.
---
src/lib/eo/eo_ptr_indirection.x | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 3bec84f..b4d25cb 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -445,7 +445,7 @@ _eo_id_release(const Eo_Id obj_id)
ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.", (void *)obj_id);
#else
- (void) obj_id;
+ EINA_MAGIC_SET(obj_id, EO_FREED_EINA_MAGIC);
#endif
}
--
|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-10 13:38:24
|
devilhorns pushed a commit to branch master.
commit 369f414726f8135194ebf778bc701ffbf6f8ce7d
Author: Chris Michael <cp....@sa...>
Date: Tue Sep 10 14:32:57 2013 +0100
Remove calls to update_size function in alpha_set and transparent_set.
In alpha_set & transparent_set, add call to set opaque region to NULL
if alpha or transparent.
Signed-off-by: Chris Michael <cp....@sa...>
---
src/lib/ecore_wayland/ecore_wl_window.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/lib/ecore_wayland/ecore_wl_window.c b/src/lib/ecore_wayland/ecore_wl_window.c
index d31c12d..ea59ec4 100644
--- a/src/lib/ecore_wayland/ecore_wl_window.c
+++ b/src/lib/ecore_wayland/ecore_wl_window.c
@@ -412,7 +412,8 @@ ecore_wl_window_transparent_set(Ecore_Wl_Window *win, Eina_Bool transparent)
if (!win) return;
win->transparent = transparent;
- ecore_wl_window_update_size(win, win->allocation.w, win->allocation.h);
+ if (win->transparent)
+ ecore_wl_window_opaque_region_set(win, 0, 0, 0, 0);
}
EAPI Eina_Bool
@@ -432,7 +433,8 @@ ecore_wl_window_alpha_set(Ecore_Wl_Window *win, Eina_Bool alpha)
if (!win) return;
win->alpha = alpha;
- ecore_wl_window_update_size(win, win->allocation.w, win->allocation.h);
+ if (win->alpha)
+ ecore_wl_window_opaque_region_set(win, 0, 0, 0, 0);
}
EAPI Eina_Bool
--
|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-10 13:38:24
|
devilhorns pushed a commit to branch master.
commit ec76c76f74f2ffbc7366ec16fd3651dbf7f48718
Author: Chris Michael <cp....@sa...>
Date: Tue Sep 10 14:34:16 2013 +0100
Restore old functionality of ecore_evas_alpha_set.
NB: We will still create all new canvases as alpha by setting it in evas,
however this allows the 'state' of ecore_evas_alpha_set/get to retain
it's original functionality and thus accurately report what a client
application May have set alpha value too.
NB: Fixes Phab Ticket T350
Signed-off-by: Chris Michael <cp....@sa...>
---
.../ecore_evas/engines/wayland/ecore_evas_wayland_egl.c | 17 ++++++++---------
.../ecore_evas/engines/wayland/ecore_evas_wayland_shm.c | 17 ++++++++---------
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
index a04a2b8..6337fab 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
@@ -159,7 +159,7 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
ee->prop.request_pos = 0;
ee->prop.sticky = 0;
ee->prop.draw_frame = frame;
- ee->alpha = EINA_TRUE;
+ ee->alpha = EINA_FALSE;
/* NB: Disabled for right now as it causes textgrid (terminology)
* to not draw text anymore */
@@ -184,7 +184,6 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
wdata->win =
ecore_wl_window_new(p, x, y, w + fw, h + fh,
ECORE_WL_WINDOW_BUFFER_TYPE_EGL_WINDOW);
- ecore_wl_window_alpha_set(wdata->win, ee->alpha);
ee->prop.window = wdata->win->id;
ee->evas = evas_new();
@@ -206,7 +205,7 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
{
einfo->info.display = ecore_wl_display_get();
- einfo->info.destination_alpha = ee->alpha;
+ einfo->info.destination_alpha = EINA_TRUE;
einfo->info.rotation = ee->rotation;
einfo->info.depth = 32;
einfo->info.surface = ecore_wl_window_surface_create(wdata->win);
@@ -462,7 +461,7 @@ _ecore_evas_wayland_egl_alpha_do(Ecore_Evas *ee, int alpha)
if (!ee) return;
if ((ee->alpha == alpha)) return;
- ee->alpha = EINA_TRUE;
+ ee->alpha = alpha;
wdata = ee->engine.data;
if (wdata->win) ecore_wl_window_alpha_set(wdata->win, ee->alpha);
@@ -471,7 +470,7 @@ _ecore_evas_wayland_egl_alpha_do(Ecore_Evas *ee, int alpha)
if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
{
- einfo->info.destination_alpha = ee->alpha;
+ einfo->info.destination_alpha = EINA_TRUE;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
@@ -483,7 +482,7 @@ _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
{
if (ee->in_async_render)
{
- ee->delayed.alpha = EINA_TRUE;
+ ee->delayed.alpha = alpha;
ee->delayed.alpha_changed = EINA_TRUE;
return;
}
@@ -502,7 +501,7 @@ _ecore_evas_wayland_egl_transparent_do(Ecore_Evas *ee, int transparent)
if (!ee) return;
if ((ee->transparent == transparent)) return;
- ee->transparent = EINA_TRUE;
+ ee->transparent = transparent;
wdata = ee->engine.data;
if (wdata->win)
@@ -512,7 +511,7 @@ _ecore_evas_wayland_egl_transparent_do(Ecore_Evas *ee, int transparent)
if ((einfo = (Evas_Engine_Info_Wayland_Egl *)evas_engine_info_get(ee->evas)))
{
- einfo->info.destination_alpha = ee->transparent;
+ einfo->info.destination_alpha = EINA_TRUE;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
@@ -524,7 +523,7 @@ _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
{
if (ee->in_async_render)
{
- ee->delayed.transparent = EINA_TRUE;
+ ee->delayed.transparent = transparent;
ee->delayed.transparent_changed = EINA_TRUE;
return;
}
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
index 8c9c047..32bcc8a 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c
@@ -157,7 +157,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
ee->prop.request_pos = 0;
ee->prop.sticky = 0;
ee->prop.draw_frame = frame;
- ee->alpha = EINA_TRUE;
+ ee->alpha = EINA_FALSE;
if (getenv("ECORE_EVAS_FORCE_SYNC_RENDER"))
ee->can_async_render = 0;
@@ -181,7 +181,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
wdata->win =
ecore_wl_window_new(p, x, y, w + fw, h + fh,
ECORE_WL_WINDOW_BUFFER_TYPE_SHM);
- ecore_wl_window_alpha_set(wdata->win, ee->alpha);
ee->prop.window = wdata->win->id;
ee->evas = evas_new();
@@ -201,7 +200,7 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
{
einfo->info.wl_shm = ecore_wl_shm_get();
- einfo->info.destination_alpha = ee->alpha;
+ einfo->info.destination_alpha = EINA_TRUE;
einfo->info.rotation = ee->rotation;
einfo->info.wl_surface = ecore_wl_window_surface_create(wdata->win);
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
@@ -461,7 +460,7 @@ _ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int alpha)
if (!ee) return;
if ((ee->alpha == alpha)) return;
- ee->alpha = EINA_TRUE;
+ ee->alpha = alpha;
wdata = ee->engine.data;
if (wdata->win) ecore_wl_window_alpha_set(wdata->win, ee->alpha);
@@ -470,7 +469,7 @@ _ecore_evas_wayland_shm_alpha_do(Ecore_Evas *ee, int alpha)
if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
{
- einfo->info.destination_alpha = ee->alpha;
+ einfo->info.destination_alpha = EINA_TRUE;//ee->alpha;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
@@ -482,7 +481,7 @@ _ecore_evas_wl_alpha_set(Ecore_Evas *ee, int alpha)
{
if (ee->in_async_render)
{
- ee->delayed.alpha = EINA_TRUE;
+ ee->delayed.alpha = alpha;
ee->delayed.alpha_changed = EINA_TRUE;
return;
}
@@ -500,7 +499,7 @@ _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent)
if (!ee) return;
if ((ee->transparent == transparent)) return;
- ee->transparent = EINA_TRUE;
+ ee->transparent = transparent;
wdata = ee->engine.data;
if (wdata->win)
@@ -510,7 +509,7 @@ _ecore_evas_wayland_shm_transparent_do(Ecore_Evas *ee, int transparent)
if ((einfo = (Evas_Engine_Info_Wayland_Shm *)evas_engine_info_get(ee->evas)))
{
- einfo->info.destination_alpha = ee->transparent;
+ einfo->info.destination_alpha = EINA_TRUE;//ee->transparent;
if (!evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo))
ERR("evas_engine_info_set() for engine '%s' failed.", ee->driver);
evas_damage_rectangle_add(ee->evas, 0, 0, ee->w + fw, ee->h + fh);
@@ -522,7 +521,7 @@ _ecore_evas_wl_transparent_set(Ecore_Evas *ee, int transparent)
{
if (ee->in_async_render)
{
- ee->delayed.transparent = EINA_TRUE;
+ ee->delayed.transparent = transparent;
ee->delayed.transparent_changed = EINA_TRUE;
return;
}
--
|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-10 13:38:23
|
devilhorns pushed a commit to branch master.
commit 6d3c50c3b69b99578639a37ee209430fc414eb9f
Author: Chris Michael <cp....@sa...>
Date: Tue Sep 10 14:28:18 2013 +0100
On a swapbuf reconfigure, don't check for alpha changing state.
Signed-off-by: Chris Michael <cp....@sa...>
---
src/modules/evas/engines/wayland_shm/evas_swapbuf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
index ccb51ca..fe103d3 100644
--- a/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
+++ b/src/modules/evas/engines/wayland_shm/evas_swapbuf.c
@@ -96,8 +96,8 @@ evas_swapbuf_reconfigure(Outbuf *ob, int x, int y, int w, int h, unsigned int ro
if (!ob) return;
/* check that something was actually changed */
- if ((ob->w == w) && (ob->h == h) && (ob->rotation == rotation) &&
- (ob->depth == depth) && (ob->priv.destination_alpha == alpha))
+ if ((ob->w == w) && (ob->h == h) &&
+ (ob->rotation == rotation) && (ob->depth == depth))
return;
/* set some properties */
--
|
|
From: Daniel J. S. - E. G. <no-...@en...> - 2013-09-10 13:33:40
|
seoz pushed a commit to branch master.
commit 3b009b7b71ff3b24647fd6a1e31aa4a776735f14
Author: Daniel Juyung Seo <juy...@sa...>
Date: Tue Sep 10 22:32:06 2013 +0900
added more XXX for progressbar.
---
edje/dark.edc | 1 +
1 file changed, 1 insertion(+)
diff --git a/edje/dark.edc b/edje/dark.edc
index db1e808..1d25516 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -54,6 +54,7 @@ collections {
#include "edc/elm/calendar.edc"
// XXX: review (layout)
#include "edc/elm/layout.edc"
+// XXX: support multi progress (progressbar)
#include "edc/elm/progress.edc"
// XXX: needs design work (naviframe)
//#include "edc/elm/naviframe.edc"
--
|
|
From: Chris M. - E. G. <no-...@en...> - 2013-09-10 13:31:02
|
devilhorns pushed a commit to branch master.
commit a069d2a06fcda3a72a700b7902d05bd375f640bf
Author: Chris Michael <cp....@sa...>
Date: Tue Sep 10 11:43:42 2013 +0100
Tweak adjustment of setting opaque region.
Signed-off-by: Chris Michael <cp....@sa...>
---
src/lib/elm_win.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
index 1a91f05..5937e40 100644
--- a/src/lib/elm_win.c
+++ b/src/lib/elm_win.c
@@ -2229,7 +2229,7 @@ _elm_win_frame_obj_move(void *data,
}
#ifdef HAVE_ELEMENTARY_WAYLAND
- ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -sy, sw, sh);
+ ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
#endif
}
@@ -2261,7 +2261,7 @@ _elm_win_frame_obj_resize(void *data,
}
#ifdef HAVE_ELEMENTARY_WAYLAND
- ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -sy, sw, sh);
+ ecore_wl_window_opaque_region_set(sd->wl.win, -fx, -(fy - sy), sw, sh);
#endif
}
--
|
|
From: Mike B. - E. G. <no-...@en...> - 2013-09-10 12:57:07
|
discomfitor pushed a commit to branch master.
commit 70d71d21a01c9786cf6d8eba92c9c64676efd5ad
Author: Mike Blumenkrantz <m.b...@sa...>
Date: Tue Sep 10 13:57:01 2013 +0100
use new elm_win_window_id_get to return wayland-compatible surface id: terminology is now wayland-teamwork compatible
---
src/bin/termio.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/bin/termio.c b/src/bin/termio.c
index 5c3e9a8..ffe76af 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -470,11 +470,15 @@ _update_link(Evas_Object *obj, Termio *sd,
if ((sd->link.string[0] == '/') || (link_is_url(sd->link.string)))
{
Evas_Coord _x = ox, _y = oy;
- Ecore_X_Window xwin;
+ Ecore_Window xwin;
_x += sd->mouse.cx * sd->font.chw;
_y += sd->mouse.cy * sd->font.chh;
+#if (ELM_VERSION_MAJOR > 1) || (ELM_VERSION_MINOR >= 8)
+ xwin = elm_win_window_id_get(sd->win);
+#else
xwin = elm_win_xwindow_get(sd->win);
+#endif
ty_dbus_link_mousein(xwin, sd->link.string, _x, _y);
}
for (y = sd->link.y1; y <= sd->link.y2; y++)
@@ -540,7 +544,11 @@ _remove_links(Termio *sd, Evas_Object *obj)
ox += sd->mouse.cx * sd->font.chw;
oy += sd->mouse.cy * sd->font.chh;
- xwin = elm_win_xwindow_get(sd->win);
+#if (ELM_VERSION_MAJOR > 1) || (ELM_VERSION_MINOR >= 8)
+ xwin = elm_win_window_id_get(sd->win);
+#else
+ xwin = elm_win_xwindow_get(sd->win);
+#endif
ty_dbus_link_mouseout(xwin, sd->link.string, ox, oy);
}
free(sd->link.string);
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 11:25:13
|
raster pushed a commit to branch master.
commit 9821d990f3c7a5280fb2397a11b7fee01939da32
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Tue Sep 10 20:25:15 2013 +0900
add XXX's in so they are greppable
---
edje/dark.edc | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/edje/dark.edc b/edje/dark.edc
index e1d5a8e..db1e808 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -8,7 +8,7 @@ collections {
#include "edc/elm/bg.edc"
#include "edc/elm/button.edc"
#include "edc/elm/scroller.edc"
-// XXX: need to do magnifier etc...
+// XXX: (entry) need to do magnifier etc...
#include "edc/elm/entry.edc"
#include "edc/elm/frame.edc"
#include "edc/elm/label.edc"
@@ -35,9 +35,9 @@ collections {
#include "edc/elm/win.edc"
#include "edc/elm/inwin.edc"
#include "edc/elm/slideshow.edc"
-// XXX: fix gfx for diskselector - unknown
+// XXX: fix gfx (diskselector)
#include "edc/elm/diskselector.edc"
-// XXX: fix gfx for ctxpopup - use bubble look?
+// XXX: fix gfx (ctxpopup) - use bubble look used for tooltips, bubble etc.
#include "edc/elm/ctxpopup.edc"
#include "edc/elm/multibuttonentry.edc"
#include "edc/elm/dayselector.edc"
@@ -46,25 +46,25 @@ collections {
#include "edc/elm/tooltip.edc"
#include "edc/elm/colorsel.edc"
#include "edc/elm/segment_control.edc"
-// needs design work
+// XXX: needs design work (flipselector)
#include "edc/elm/flipselector.edc"
#include "edc/elm/notify.edc"
#include "edc/elm/map.edc"
#include "edc/elm/index.edc"
#include "edc/elm/calendar.edc"
-// XXX: review layouts
+// XXX: review (layout)
#include "edc/elm/layout.edc"
#include "edc/elm/progress.edc"
-// i think needs some design work
+// XXX: needs design work (naviframe)
//#include "edc/elm/naviframe.edc"
#include "edc/elm/panel.edc"
-// needs design work, but edc needs to also scale up and down but not be so fat when scale is down/finger size smaller
+// XXX: needs design work (popup), but edc needs to also scale up and down but not be so fat when scale is down/finger size smaller
//#include "edc/elm/popup.edc"
#include "edc/elm/border.edc"
#include "edc/elm/spinner.edc"
#include "edc/elm/menu.edc"
#include "edc/elm/clock.edc"
-// XXX: make it same as genlist, EXCEPT for grid items use a bevel out box, not horiz curved bevel. that's it.
+// XXX: make it same as genlist (gengrid), EXCEPT for grid items use a bevel out box, not horiz curved bevel. that's it.
//#include "edc/elm/gengrid.edc"
#include "edc/elm/hover.edc"
--
|
|
From: Michaël B. (y. - E. G. <no-...@en...> - 2013-09-10 10:52:26
|
yoz pushed a commit to branch master.
commit d166c8c1be5b30dc75999eadcdd7caf34b8f7487
Author: Michaël Bouchaud (yoz) <yo...@ef...>
Date: Tue Sep 10 12:52:11 2013 +0200
elementary: del image_preload signal callback on elm_thumb when needed
---
src/lib/elm_thumb.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lib/elm_thumb.c b/src/lib/elm_thumb.c
index 769f399..7ab8cac 100644
--- a/src/lib/elm_thumb.c
+++ b/src/lib/elm_thumb.c
@@ -348,6 +348,9 @@ _on_ethumb_thumb_error(Ethumb_Client *client __UNUSED__,
ERR("Something odd happened with a thumbnail request");
return;
}
+ evas_object_event_callback_del_full
+ (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded,
+ sd);
pending_request--;
sd->thumb.request = NULL;
@@ -632,6 +635,9 @@ _elm_thumb_smart_del(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
eo_data_unref(sd->obj, sd);
sd->thumb.retry = EINA_FALSE;
}
+ evas_object_event_callback_del_full
+ (sd->view, EVAS_CALLBACK_IMAGE_PRELOADED, _on_thumb_preloaded,
+ sd);
eina_stringshare_del(sd->thumb.thumb_path);
eina_stringshare_del(sd->thumb.thumb_key);
--
|
|
From: Ryuan C. - E. G. <no-...@en...> - 2013-09-10 10:12:33
|
ryuan pushed a commit to branch master.
commit 74f308df90026fca68ef366f68a12ce9741b2b2b
Author: Ryuan Choi <ryu...@gm...>
Date: Tue Sep 10 18:47:30 2013 +0900
elc_fileselector : Select path which user typed on path_entry.
Summary:
In fileselector, user can write directory path or file path which they want.
If then, fileselector navigates path when directory path is given,
but just send a "selected" signal without real selection when file path or wrong path is given.
With this path,
- fileselector will navigate (if needed) and select file with signal when file path is given.
- no action when wrong path is given.
---
ChangeLog | 5 ++
NEWS | 1 +
src/lib/elc_fileselector.c | 149 ++++++++++++++++++++++++++++----------
src/lib/elm_widget_fileselector.h | 1 +
4 files changed, 118 insertions(+), 38 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d957f29..9b701ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1598,3 +1598,8 @@
* ProgressBar: Added support for more than one progress status in a
single progress bar
+
+2013-09-10 Ryuan Choi (ryuan)
+
+ * elc_fileselector : Navigate (if needed) and select file with "selected"
+ signal when user typed file path on path_entry.
diff --git a/NEWS b/NEWS
index 2a3ed46..b14ad6c 100644
--- a/NEWS
+++ b/NEWS
@@ -277,6 +277,7 @@ Fixes:
This prevents the asynchronous states between ime and conformant.
* Flip : Fix the flip page to not flip on a direction if the direction is disabled.
* Spinner : change part name to access.text from access_text on default style.
+ * Fix fileselector only send "selected" signal without selection when file path is typed on the path entry.
Removals:
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index ef73b6a..742ac30 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -393,6 +393,7 @@ _ls_main_cb(void *data,
const Eina_File_Direct_Info *info)
{
Listing_Request *lreq = data;
+ Elm_Object_Item *item;
int itcn = ELM_FILE_UNKNOW;
if (eio_file_check(handler)) return;
@@ -416,16 +417,26 @@ _ls_main_cb(void *data,
}
if (lreq->sd->mode == ELM_FILESELECTOR_LIST)
- elm_genlist_item_sorted_insert(lreq->sd->files_list, list_itc[itcn],
- eina_stringshare_add(info->path),
- lreq->parent_it,
- ((lreq->sd->expand) && (itcn == ELM_DIRECTORY))
- ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
- _file_list_cmp, NULL, NULL);
+ {
+ item = elm_genlist_item_sorted_insert(lreq->sd->files_list, list_itc[itcn],
+ eina_stringshare_add(info->path),
+ lreq->parent_it,
+ ((lreq->sd->expand) && (itcn == ELM_DIRECTORY))
+ ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
+ _file_list_cmp, NULL, NULL);
+
+ if (lreq->selected && !strcmp(info->path, lreq->selected))
+ elm_genlist_item_selected_set(item, EINA_TRUE);
+ }
else if (lreq->sd->mode == ELM_FILESELECTOR_GRID)
- elm_gengrid_item_sorted_insert(lreq->sd->files_grid, grid_itc[itcn],
- eina_stringshare_add(info->path),
- _file_grid_cmp, NULL, NULL);
+ {
+ item = elm_gengrid_item_sorted_insert(lreq->sd->files_grid, grid_itc[itcn],
+ eina_stringshare_add(info->path),
+ _file_grid_cmp, NULL, NULL);
+
+ if (lreq->selected && !strcmp(info->path, lreq->selected))
+ elm_gengrid_item_selected_set(item, EINA_TRUE);
+ }
}
static void
@@ -434,6 +445,7 @@ _listing_request_cleanup(Listing_Request *lreq)
EINA_REFCOUNT_UNREF(lreq->sd) _elm_fileselector_smart_del_do(lreq->sd);
eina_stringshare_del(lreq->path);
+ eina_stringshare_del(lreq->selected);
free(lreq);
}
@@ -468,7 +480,8 @@ _ls_error_cb(void *data, Eio_File *handler, int error __UNUSED__)
static void
_populate(Evas_Object *obj,
const char *path,
- Elm_Object_Item *parent_it)
+ Elm_Object_Item *parent_it,
+ const char *selected)
{
ELM_FILESELECTOR_DATA_GET(obj, sd);
if (!path) return;
@@ -538,14 +551,24 @@ _populate(Evas_Object *obj,
ELM_FILE_IMAGE : ELM_FILE_UNKNOW;
if (sd->mode == ELM_FILESELECTOR_LIST)
- elm_genlist_item_append(sd->files_list, list_itc[type],
- entry, /* item data */
- parent_it, ELM_GENLIST_ITEM_NONE,
- NULL, NULL);
+ {
+ Elm_Object_Item *item;
+ item = elm_genlist_item_append(sd->files_list, list_itc[type],
+ entry, /* item data */
+ parent_it, ELM_GENLIST_ITEM_NONE,
+ NULL, NULL);
+ if (selected && !strcmp(entry, selected))
+ elm_genlist_item_selected_set(item, EINA_TRUE);
+ }
else if (sd->mode == ELM_FILESELECTOR_GRID)
- elm_gengrid_item_append(sd->files_grid, grid_itc[type],
- entry, /* item data */
- NULL, NULL);
+ {
+ Elm_Object_Item *item;
+ item = elm_gengrid_item_append(sd->files_grid, grid_itc[type],
+ entry, /* item data */
+ NULL, NULL);
+ if (selected && !strcmp(entry, selected))
+ elm_gengrid_item_selected_set(item, EINA_TRUE);
+ }
}
#else /* asynchronous listing path */
@@ -564,6 +587,11 @@ _populate(Evas_Object *obj,
lreq->path = eina_stringshare_add(path);
lreq->first = EINA_TRUE;
+ if (selected)
+ lreq->selected = eina_stringshare_add(selected);
+ else
+ lreq->selected = NULL;
+
sd->current = eio_file_stat_ls(path, _ls_filter_cb, _ls_main_cb,
_ls_done_cb, _ls_error_cb, lreq);
elm_progressbar_pulse(sd->spinner, EINA_TRUE);
@@ -579,7 +607,7 @@ _on_list_expanded(void *data,
Elm_Object_Item *it = event_info;
const char *path = elm_object_item_data_get(it);
- _populate(data, path, it);
+ _populate(data, path, it, NULL);
}
static void
@@ -632,7 +660,7 @@ _sel_do(void *data)
{
/* keep a ref to path 'couse it will be destroyed by _populate */
p = eina_stringshare_add(path);
- _populate(sdata->fs, p, NULL);
+ _populate(sdata->fs, p, NULL, NULL);
eina_stringshare_del(p);
}
else
@@ -703,7 +731,7 @@ _on_dir_up(void *data,
ELM_FILESELECTOR_DATA_GET(fs, sd);
parent = ecore_file_dir_get(sd->path);
- _populate(fs, parent, NULL);
+ _populate(fs, parent, NULL, NULL);
free(parent);
}
@@ -714,7 +742,7 @@ _home(void *data,
{
Evas_Object *fs = data;
- _populate(fs, getenv("HOME"), NULL);
+ _populate(fs, getenv("HOME"), NULL, NULL);
}
static void
@@ -729,7 +757,7 @@ _current_filer_changed(void *data,
elm_object_text_set(obj, filter->filter_name);
filter->sd->current_filter = filter;
- _populate(filter->sd->obj, filter->sd->path, NULL);
+ _populate(filter->sd->obj, filter->sd->path, NULL, NULL);
}
static void
@@ -778,16 +806,61 @@ _on_text_activated(void *data,
void *event_info __UNUSED__)
{
Evas_Object *fs = data;
- const char *p;
+ const char *p, *path;
+ char *dir;
- // keep a ref to path 'couse it will be destroyed by _populate
- p = eina_stringshare_add(elm_object_text_get(obj));
- if (ecore_file_is_dir(p))
- _populate(fs, p, NULL);
+ ELM_FILESELECTOR_DATA_GET(fs, sd);
+
+ path = elm_object_text_get(obj);
+
+ // FIXME: Needs some feedback to user like alert.
+ if (!ecore_file_exists(path)) goto end;
+
+ if (ecore_file_is_dir(path))
+ {
+ // keep a ref to path 'couse it will be destroyed by _populate
+ p = eina_stringshare_add(path);
+ _populate(fs, p, NULL, NULL);
+ eina_stringshare_del(p);
+ goto end;
+ }
+
+ dir = ecore_file_dir_get(path);
+ if (!dir) goto end;
+
+ if (strcmp(dir, sd->path))
+ _populate(fs, dir, NULL, path);
else
- evas_object_smart_callback_call(data, SIG_SELECTED, (void *)p);
+ {
+ if (sd->mode == ELM_FILESELECTOR_LIST)
+ {
+ Elm_Object_Item *item = elm_genlist_first_item_get(sd->files_list);
+ while (item)
+ {
+ const char *item_path = elm_object_item_data_get(item);
+ if (!strcmp(item_path, path))
+ elm_genlist_item_selected_set(item, EINA_TRUE);
+ item = elm_genlist_item_next_get(item);
+ }
+ }
+ else
+ {
+ Elm_Object_Item *item = elm_gengrid_first_item_get(sd->files_list);
+ while (item)
+ {
+ const char *item_path = elm_object_item_data_get(item);
+ if (!strcmp(item_path, path))
+ {
+ elm_gengrid_item_selected_set(item, EINA_TRUE);
+ break;
+ }
+ item = elm_gengrid_item_next_get(item);
+ }
+ }
+ }
+ free(dir);
- eina_stringshare_del(p);
+end:
elm_object_focus_set(obj, EINA_FALSE);
}
@@ -811,7 +884,7 @@ _anchor_clicked(void *data,
// keep a ref to path 'couse it will be destroyed by _populate
p = eina_stringshare_add(info->name);
- _populate(fs, p, NULL);
+ _populate(fs, p, NULL, NULL);
evas_object_smart_callback_call(data, SIG_SELECTED, (void *)p);
eina_stringshare_del(p);
/* After anchor was clicked, entry will be focused, and will be editable.
@@ -1035,7 +1108,7 @@ _folder_only_set(Eo *obj, void *_pd, va_list *list)
if (sd->only_folder == only) return;
sd->only_folder = !!only;
- if (sd->path) _populate(obj, sd->path, NULL);
+ if (sd->path) _populate(obj, sd->path, NULL, NULL);
}
EAPI Eina_Bool
@@ -1136,7 +1209,7 @@ _expandable_set(Eo *obj, void *_pd, va_list *list)
sd->expand = !!expand;
- if (sd->path) _populate(obj, sd->path, NULL);
+ if (sd->path) _populate(obj, sd->path, NULL, NULL);
}
EAPI Eina_Bool
@@ -1171,7 +1244,7 @@ _path_set(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
char *path;
path = ecore_file_realpath(_path);
- _populate(obj, path, NULL);
+ _populate(obj, path, NULL, NULL);
free(path);
}
@@ -1217,7 +1290,7 @@ _mode_set(Eo *obj, void *_pd, va_list *list)
sd->mode = mode;
- _populate(obj, sd->path, NULL);
+ _populate(obj, sd->path, NULL, NULL);
}
EAPI Elm_Fileselector_Mode
@@ -1306,7 +1379,7 @@ _selected_set(Eo *obj, void *_pd, va_list *list)
path = ecore_file_realpath(_path);
- if (ecore_file_is_dir(path)) _populate(obj, path, NULL);
+ if (ecore_file_is_dir(path)) _populate(obj, path, NULL, NULL);
else
{
if (!ecore_file_exists(path))
@@ -1316,7 +1389,7 @@ _selected_set(Eo *obj, void *_pd, va_list *list)
}
selected = ecore_file_dir_get(path);
- _populate(obj, selected, NULL);
+ _populate(obj, selected, NULL, NULL);
eina_stringshare_replace(&sd->selection, path);
free(selected);
}
@@ -1373,7 +1446,7 @@ _mime_types_filter_append(Eo *obj, void *_pd, va_list *list)
sd->filter_list = eina_list_append(sd->filter_list, ff);
- _populate(obj, sd->path, NULL);
+ _populate(obj, sd->path, NULL, NULL);
if (need_theme)
eo_do(obj, elm_wdg_theme(NULL));
@@ -1409,7 +1482,7 @@ _filters_clear(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
ELM_SAFE_FREE(sd->filter_hoversel, evas_object_del);
- _populate(obj, sd->path, NULL);
+ _populate(obj, sd->path, NULL, NULL);
}
static void
diff --git a/src/lib/elm_widget_fileselector.h b/src/lib/elm_widget_fileselector.h
index ad8c35a..353a4fb 100644
--- a/src/lib/elm_widget_fileselector.h
+++ b/src/lib/elm_widget_fileselector.h
@@ -68,6 +68,7 @@ struct _Listing_Request
Evas_Object *obj;
const char *path;
+ const char *selected;
Eina_Bool first : 1;
};
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 09:48:58
|
raster pushed a commit to branch master.
commit 39c582e23382446a949bddab7d41f6e36513e808
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Sat Aug 31 13:32:52 2013 +0900
elm map - let's use some neautral colors for map items by default.
---
src/lib/elm_map.c | 62 +++++++++++++++++++++++++++----------------------------
1 file changed, 31 insertions(+), 31 deletions(-)
diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index b771532..aa82c32 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -5283,10 +5283,10 @@ _overlay_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_DEFAULT;
- overlay->c.r = 0x87;
- overlay->c.g = 0xce;
- overlay->c.b = 0xeb;
- overlay->c.a = 255;
+ overlay->c.r = 0xff;
+ overlay->c.g = 0xff;
+ overlay->c.b = 0xff;
+ overlay->c.a = 0xff;
overlay->ovl = _overlay_default_new(overlay, lon, lat, overlay->c, 1);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -5916,9 +5916,9 @@ _overlay_class_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_CLASS;
overlay->ovl = _overlay_class_new(sd);
- overlay->c.r = 0x90;
- overlay->c.g = 0xee;
- overlay->c.b = 0x90;
+ overlay->c.r = 0xff;
+ overlay->c.g = 0xff;
+ overlay->c.b = 0xff;
overlay->c.a = 0xff;
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6090,10 +6090,10 @@ _overlay_bubble_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_BUBBLE;
- overlay->c.r = 255;
- overlay->c.g = 255;
- overlay->c.b = 255;
- overlay->c.a = 255;
+ overlay->c.r = 0xff;
+ overlay->c.g = 0xff;
+ overlay->c.b = 0xff;
+ overlay->c.a = 0xff;
overlay->ovl = _overlay_bubble_new(overlay);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6202,10 +6202,10 @@ _overlay_route_add(Eo *obj, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_ROUTE;
- overlay->c.r = 0xff;
- overlay->c.g = 0x00;
- overlay->c.b = 0x00;
- overlay->c.a = 0xff;
+ overlay->c.r = 0x11;
+ overlay->c.g = 0x11;
+ overlay->c.b = 0xcc;
+ overlay->c.a = 0xcc;
overlay->ovl = _overlay_route_new(sd, route, overlay->c);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6248,10 +6248,10 @@ _overlay_line_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_LINE;
- overlay->c.r = 0xff;
- overlay->c.g = 0x00;
- overlay->c.b = 0x00;
- overlay->c.a = 0xff;
+ overlay->c.r = 0x11;
+ overlay->c.g = 0xcc;
+ overlay->c.b = 0x11;
+ overlay->c.a = 0xcc;
overlay->ovl = _overlay_line_new(sd, flon, flat, tlon, tlat, overlay->c);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6290,10 +6290,10 @@ _overlay_polygon_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_POLYGON;
- overlay->c.r = 0xdc;
- overlay->c.g = 0x14;
- overlay->c.b = 0x3c;
- overlay->c.a = 220;
+ overlay->c.r = 0xcc;
+ overlay->c.g = 0x77;
+ overlay->c.b = 0x11;
+ overlay->c.a = 0xcc;
overlay->ovl = _overlay_polygon_new(sd, overlay->c);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6360,10 +6360,10 @@ _overlay_circle_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_CIRCLE;
- overlay->c.r = 0xdc;
- overlay->c.g = 0x14;
- overlay->c.b = 0x3c;
- overlay->c.a = 220;
+ overlay->c.r = 0xcc;
+ overlay->c.g = 0x11;
+ overlay->c.b = 0x11;
+ overlay->c.a = 0xcc;
overlay->ovl = _overlay_circle_new(sd, lon, lat, radius, overlay->c);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
@@ -6405,10 +6405,10 @@ _overlay_scale_add(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
overlay = ELM_NEW(Elm_Map_Overlay);
overlay->wsd = sd;
overlay->type = ELM_MAP_OVERLAY_TYPE_SCALE;
- overlay->c.r = 0;
- overlay->c.g = 0;
- overlay->c.b = 0;
- overlay->c.a = 255;
+ overlay->c.r = 0xff;
+ overlay->c.g = 0xff;
+ overlay->c.b = 0xff;
+ overlay->c.a = 0xff;
overlay->ovl = _overlay_scale_new(sd, x, y, overlay->c);
overlay->grp = _overlay_group_new(sd);
sd->overlays = eina_list_append(sd->overlays, overlay);
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 09:48:58
|
raster pushed a commit to branch master.
commit be9fa318b784a4a8b5c7c3d71a86129cb88eaaf8
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Tue Sep 10 18:48:32 2013 +0900
panel - really should support finger size for the open/close tab! add!
---
src/lib/elm_panel.c | 33 +++++++++++++++++++++++++++++----
src/lib/elm_widget_panel.h | 3 ++-
2 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/src/lib/elm_panel.c b/src/lib/elm_panel.c
index 3c74dab..13f4051 100644
--- a/src/lib/elm_panel.c
+++ b/src/lib/elm_panel.c
@@ -121,10 +121,12 @@ _orient_set_do(Evas_Object *obj)
}
static void
-_elm_panel_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
+_elm_panel_smart_theme(Eo *obj, void *_pd, va_list *list)
{
const char *str;
-
+ Evas_Coord minw = 0, minh = 0;
+ Elm_Panel_Smart_Data *sd = _pd;
+
Eina_Bool int_ret = EINA_FALSE;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
if (ret) *ret = EINA_FALSE;
@@ -144,7 +146,15 @@ _elm_panel_smart_theme(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
elm_widget_highlight_in_theme_set(obj, EINA_FALSE);
_orient_set_do(obj);
-
+
+ evas_object_hide(sd->event);
+ elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+ evas_object_size_hint_min_set(sd->event, minw, minh);
+
+ if (edje_object_part_exists
+ (wd->resize_obj, "elm.swallow.event"))
+ elm_layout_content_set(obj, "elm.swallow.event", sd->event);
+
elm_layout_sizing_eval(obj);
if (ret) *ret = EINA_TRUE;
@@ -342,7 +352,8 @@ static void
_elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
{
Elm_Panel_Smart_Data *priv = _pd;
-
+ Elm_Widget_Smart_Data *wd = eo_data_scope_get(obj, ELM_OBJ_WIDGET_CLASS);
+
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
elm_widget_sub_object_add(eo_parent_get(obj), obj);
@@ -366,6 +377,20 @@ _elm_panel_smart_add(Eo *obj, void *_pd, va_list *list EINA_UNUSED)
_mirrored_set(obj, elm_widget_mirrored_get(obj));
+ priv->event = evas_object_rectangle_add(evas_object_evas_get(obj));
+ evas_object_color_set(priv->event, 0, 0, 0, 0);
+ evas_object_pass_events_set(priv->event, EINA_TRUE);
+ if (edje_object_part_exists
+ (wd->resize_obj, "elm.swallow.event"))
+ {
+ Evas_Coord minw = 0, minh = 0;
+
+ elm_coords_finger_size_adjust(1, &minw, 1, &minh);
+ evas_object_size_hint_min_set(priv->event, minw, minh);
+ elm_layout_content_set(obj, "elm.swallow.event", priv->event);
+ }
+ elm_widget_sub_object_add(obj, priv->event);
+
elm_layout_sizing_eval(obj);
}
diff --git a/src/lib/elm_widget_panel.h b/src/lib/elm_widget_panel.h
index 2810169..2d09224 100644
--- a/src/lib/elm_widget_panel.h
+++ b/src/lib/elm_widget_panel.h
@@ -22,7 +22,8 @@ typedef struct _Elm_Panel_Smart_Data Elm_Panel_Smart_Data;
struct _Elm_Panel_Smart_Data
{
Evas_Object *bx, *content;
-
+ Evas_Object *event;
+
Elm_Panel_Orient orient;
Eina_Bool hidden : 1;
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 09:42:55
|
raster pushed a commit to branch master.
commit 79c3c4bd97111adaf2099fc3513a536bf66d5a2b
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Tue Sep 10 18:43:00 2013 +0900
use event not handle for swallow
---
edje/edc/elm/panel.edc | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/edje/edc/elm/panel.edc b/edje/edc/elm/panel.edc
index ccf9734..a0651f1 100644
--- a/edje/edc/elm/panel.edc
+++ b/edje/edc/elm/panel.edc
@@ -48,7 +48,7 @@ group { name: "elm/panel/left/default";
part { name: "base"; type: RECT;
description { state: "default" 0.0;
rel1.to_x: "all";
- rel2.to_x: "elm.swallow.handle";
+ rel2.to_x: "elm.swallow.event";
rel2.relative: 0.0 1.0;
rel2.offset: -4 -1;
color: 64 64 64 255;
@@ -83,7 +83,7 @@ group { name: "elm/panel/left/default";
FIXED_SIZE(69, 5)
}
}
- part { name: "elm.swallow.handle"; type: SWALLOW;
+ part { name: "elm.swallow.event"; type: SWALLOW;
description { state: "default" 0.0;
fixed: 1 1;
min: 20 20;
@@ -102,8 +102,8 @@ group { name: "elm/panel/left/default";
}
part { name: "btn"; type: RECT;
description { state: "default" 0.0;
- rel1.to: "elm.swallow.handle";
- rel2.to: "elm.swallow.handle";
+ rel1.to: "elm.swallow.event";
+ rel2.to: "elm.swallow.event";
color: 0 0 0 0;
}
}
@@ -141,7 +141,7 @@ group { name: "elm/panel/left/default";
signal: "elm,action,show"; source: "elm";
action: STATE_SET "default" 0.0;
transition: DECELERATE 0.3;
- target: "elm.swallow.handle";
+ target: "elm.swallow.event";
target: "base";
target: "icn";
}
@@ -149,7 +149,7 @@ group { name: "elm/panel/left/default";
signal: "elm,action,hide"; source: "elm";
action: STATE_SET "hidden" 0.0;
transition: ACCELERATE 0.3;
- target: "elm.swallow.handle";
+ target: "elm.swallow.event";
target: "icn";
}
program { name: "hide1";
@@ -159,7 +159,7 @@ group { name: "elm/panel/left/default";
custom_state(PART:"base", "default", 0.0);
set_state_val(PART:"base", STATE_REL1, -1.0, 0.0);
- get_geometry(PART:"elm.swallow.handle", x, y, w, h);
+ get_geometry(PART:"elm.swallow.event", x, y, w, h);
set_state_val(PART:"base", STATE_REL1_OFFSET, w, 0);
}
after: "hide2";
@@ -190,14 +190,14 @@ group { name: "elm/panel/right/default";
part { name: "base";
description { state: "default" 0.0;
rel1.relative: 1.0 0.0;
- rel1.to_x: "elm.swallow.handle";
+ rel1.to_x: "elm.swallow.event";
rel1.offset: 3 0;
rel2.relative: 1.0 1.0;
rel2.to_x: "all";
rel2.offset: -1 -1;
}
}
- part { name: "elm.swallow.handle";
+ part { name: "elm.swallow.event";
description { state: "default" 0.0;
align: 0.0 0.5;
rel1.relative: 0.0 0.0;
@@ -231,7 +231,7 @@ group { name: "elm/panel/right/default";
custom_state(PART:"base", "default", 0.0);
set_state_val(PART:"base", STATE_REL1, 1.0, 0.0);
set_state_val(PART:"base", STATE_REL2, 2.0, 1.0);
- get_geometry(PART:"elm.swallow.handle", x, y, w, h);
+ get_geometry(PART:"elm.swallow.event", x, y, w, h);
set_state_val(PART:"base", STATE_REL2_OFFSET, -w, 0);
}
}
@@ -249,11 +249,11 @@ group { name: "elm/panel/top/default";
rel1.offset: 0 0;
rel2.relative: 1.0 0.0;
rel2.to_x: "all";
- rel2.to_y: "elm.swallow.handle";
+ rel2.to_y: "elm.swallow.event";
rel2.offset: -1 -4;
}
}
- part { name: "elm.swallow.handle";
+ part { name: "elm.swallow.event";
description { state: "default" 0.0;
align: 0.5 1.0;
rel1.relative: 0.0 1.0;
@@ -289,7 +289,7 @@ group { name: "elm/panel/top/default";
custom_state(PART:"base", "default", 0.0);
set_state_val(PART:"base", STATE_REL1, 0.0, -1.0);
set_state_val(PART:"base", STATE_REL2, 1.0, 0.0);
- get_geometry(PART:"elm.swallow.handle", x, y, w, h);
+ get_geometry(PART:"elm.swallow.event", x, y, w, h);
set_state_val(PART:"base", STATE_REL1_OFFSET, 0, h);
}
}
@@ -303,7 +303,7 @@ group { name: "elm/panel/bottom/default";
description { state: "default" 0.0;
rel1.relative: 0.0 1.0;
rel1.to_x: "all";
- rel1.to_y: "elm.swallow.handle";
+ rel1.to_y: "elm.swallow.event";
rel1.offset: 0 3;
rel2.relative: 1.0 1.0;
rel2.to_x: "all";
@@ -311,7 +311,7 @@ group { name: "elm/panel/bottom/default";
rel2.offset: -1 -1;
}
}
- part { name: "elm.swallow.handle";
+ part { name: "elm.swallow.event";
description { state: "default" 0.0;
align: 0.5 0.0;
rel1.relative: 0.0 0.0;
@@ -347,7 +347,7 @@ group { name: "elm/panel/bottom/default";
custom_state(PART:"base", "default", 0.0);
set_state_val(PART:"base", STATE_REL1, 0.0, 1.0);
set_state_val(PART:"base", STATE_REL2, 1.0, 2.0);
- get_geometry(PART:"elm.swallow.handle", x, y, w, h);
+ get_geometry(PART:"elm.swallow.event", x, y, w, h);
set_state_val(PART:"base", STATE_REL2_OFFSET, 0, -h);
}
}
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 09:36:37
|
raster pushed a commit to branch master.
commit 5178b28ce63cd57ab8fc579885f4b63dbb287766
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Tue Sep 10 18:36:30 2013 +0900
add some frame padding to the widget layout... looks nicer.
---
src/bin/clouseau_client.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/src/bin/clouseau_client.c b/src/bin/clouseau_client.c
index 9692238..0d06ecb 100644
--- a/src/bin/clouseau_client.c
+++ b/src/bin/clouseau_client.c
@@ -1795,13 +1795,20 @@ static void
_control_buttons_create(Gui_Elements *g, Evas_Object *win)
{
Evas_Object *show_hidden_check, *show_clippers_check, *highlight_check;
- Evas_Object *jump_to_entry;
-
+ Evas_Object *jump_to_entry, *frame;
+
+ frame = elm_frame_add(gui->bx);
+ elm_object_style_set(frame, "pad_medium");
+ evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, 0.0);
+ evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(g->bx, frame);
+ evas_object_show(frame);
+
g->hbx = elm_box_add(g->bx);
evas_object_size_hint_align_set(g->hbx, 0.0, 0.5);
elm_box_horizontal_set(g->hbx, EINA_TRUE);
- elm_box_pack_end(g->bx, g->hbx);
- elm_box_padding_set(g->hbx, 10, 0);
+ elm_object_content_set(frame, g->hbx);
+ elm_box_padding_set(g->hbx, 4, 0);
evas_object_size_hint_align_set(g->hbx, EVAS_HINT_FILL, 0.0);
evas_object_size_hint_weight_set(g->hbx, EVAS_HINT_EXPAND, 0.0);
evas_object_show(g->hbx);
@@ -2068,7 +2075,7 @@ main(int argc, char **argv)
return EINA_FALSE;
}
- Evas_Object *win, *panes;
+ Evas_Object *win, *panes, *frame;
/* For inwin popup */
Evas_Object *lb, *bxx, *bt_bx, *bt_ok, *bt_cancel;
@@ -2092,10 +2099,18 @@ main(int argc, char **argv)
elm_win_resize_object_add(win, gui->bx);
_control_buttons_create(gui, win);
+
+ frame = elm_frame_add(gui->bx);
+ elm_object_style_set(frame, "pad_medium");
+ evas_object_size_hint_weight_set(frame, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(frame, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ elm_box_pack_end(gui->bx, frame);
+ evas_object_show(frame);
+
panes = elm_panes_add(gui->bx);
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);
- elm_box_pack_end(gui->bx, panes);
+ elm_object_content_set(frame, panes);
evas_object_show(panes);
_main_list_create(panes);
--
|
|
From: Carsten H. (R. - E. G. <no-...@en...> - 2013-09-10 09:27:52
|
raster pushed a commit to branch master.
commit 8a4421552b33ba59b2e85fe6fd0164a3d99746db
Author: Carsten Haitzler (Rasterman) <ra...@ra...>
Date: Fri Aug 30 19:28:27 2013 +0900
map - finished making it dark pretty.
---
edje/dark.edc | 3 +-
edje/edc/elm/map.edc | 208 +++++++++++++++++++++++++++++++++++++++++++++++
edje/img/bub_base_b0.png | Bin 0 -> 333 bytes
edje/img/bub_base_b1.png | Bin 0 -> 315 bytes
edje/img/bub_base_b2.png | Bin 0 -> 362 bytes
edje/img/map_circle.png | Bin 0 -> 28715 bytes
edje/img/map_marker.png | Bin 0 -> 1806 bytes
edje/img/map_scale.png | Bin 0 -> 365 bytes
mock-18.xcf.gz | Bin 612340 -> 612340 bytes
9 files changed, 210 insertions(+), 1 deletion(-)
diff --git a/edje/dark.edc b/edje/dark.edc
index 65a58e0..2e88678 100644
--- a/edje/dark.edc
+++ b/edje/dark.edc
@@ -8,6 +8,7 @@ collections {
#include "edc/elm/bg.edc"
#include "edc/elm/button.edc"
#include "edc/elm/scroller.edc"
+// XXX: need to do magnifier etc...
#include "edc/elm/entry.edc"
#include "edc/elm/frame.edc"
#include "edc/elm/label.edc"
@@ -49,7 +50,7 @@ collections {
#include "edc/elm/flipselector.edc"
#include "edc/elm/notify.edc"
// needs some design work for markers (but busy etc. are done already)
-//#include "edc/elm/map.edc"
+#include "edc/elm/map.edc"
#include "edc/elm/index.edc"
#include "edc/elm/calendar.edc"
// XXX: review layouts
diff --git a/edje/edc/elm/map.edc b/edje/edc/elm/map.edc
new file mode 100644
index 0000000..90b3fe4
--- /dev/null
+++ b/edje/edc/elm/map.edc
@@ -0,0 +1,208 @@
+group { name: "elm/map/base/default";
+ inherit: "elm/photocam/base/default";
+}
+
+group { name: "elm/map/marker/radio/default";
+ data.item: "size_w" 35;
+ data.item: "size_h" 35;
+ data.item: "size_max_w" 35;
+ data.item: "size_max_h" 35;
+ images.image: "map_marker.png" COMP;
+ parts {
+ part { name: "mark";
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.relative: 0.5 0.5;
+ rel1.offset: 0 3;
+ rel2.relative: 0.5 0.5;
+ rel2.offset: 0 3;
+ align: 0.5 1.0;
+ min: 65 35;
+ max: 65 35;
+ image.normal: "map_marker.png";
+ }
+ }
+ part { name: "elm.icon"; type: SWALLOW; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "mark";
+ rel1.relative: (25/65) (5/35);
+ rel2.to: "mark";
+ rel2.relative: (40/65) (20/35);
+ rel2.offset: 0 0;
+ }
+ }
+ part { name: "elm.text"; type: TEXT;
+ effect: SHADOW BOTTOM;
+ description { state: "default" 0.0;
+ fixed: 1 1;
+ rel1.to: "elm.icon";
+ rel2.to: "elm.icon";
+ color_class: "map_radio";
+ color: 21 21 21 255;
+ color3: 255 255 255 192;
+ text { font: FNBD; size: 10;
+ text_class: "map_radio";
+ min: 1 1;
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/map/marker/empty/default";
+ data.item: "size_w" 16;
+ data.item: "size_h" 16;
+ data.item: "size_max_w" 24;
+ data.item: "size_max_h" 24;
+ parts {
+ part { name: "knob"; type: SPACER;
+ description { state: "default" 0.0;
+ min: 16 16;
+ max: 24 24;
+ }
+ }
+ part { name: "elm.icon"; type: SWALLOW; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "knob";
+ rel2.to: "knob";
+ }
+ }
+ part { name: "elm.text"; type: TEXT;
+ effect: SHADOW BOTTOM;
+ description { state: "default" 0.0;
+ rel1.to: "knob";
+ rel2.to: "knob";
+ color_class: "map_empty";
+ color: 255 255 255 255;
+ color3: 0 0 0 128;
+ text { font: FNBD; size: 10;
+ text_class: "map_empty";
+ min: 1 1;
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/map/circle/base/default";
+ images.image: "map_circle.png" COMP;
+ parts {
+ part { name: "base";
+ ignore_flags: ON_HOLD;
+ description { state: "default" 0.0;
+ image.normal: "map_circle.png";
+ }
+ }
+ }
+}
+
+group { name: "elm/map/scale/base/default";
+ data.item: "size_w" 100;
+ data.item: "size_h" 22;
+ images.image: "map_scale.png" COMP;
+ parts {
+ part { name: "scale";
+ description { state: "default" 0.0;
+ min: 16 16;
+ image.border: 6 6 5 5;
+ image.normal: "map_scale.png";
+ }
+ }
+ part { name: "elm.text"; type: TEXT;
+ effect: SHADOW BOTTOM;
+ description { state: "default" 0.0;
+ rel1.offset: 6 5;
+ rel2.offset: -7 -5;
+ color_class: "map_scale";
+ color: 255 255 255 255;
+ color3: 0 0 0 128;
+ text { font: FNBD; size: 10;
+ text_class: "map_scale";
+ min: 1 1;
+ align: 0.0 0.0;
+ }
+ }
+ }
+ }
+}
+
+group { name: "elm/map/marker_bubble/default";
+ data.item: "size_w" 320;
+ data.item: "size_h" 160;
+ images.image: "bub_base_b0.png" COMP;
+ images.image: "bub_base_b1.png" COMP;
+ images.image: "bub_base_b2.png" COMP;
+ images.image: "bub_over_bot.png" COMP;
+ images.image: "shine.png" COMP;
+ parts {
+ part { name: "base0";
+ description { state: "default" 0.0;
+ image.normal: "bub_base_b0.png";
+ image.border: 12 0 8 13;
+ image.middle: SOLID;
+ fill.smooth: 0;
+ rel2.relative: 0.0 1.0;
+ rel2.to: "base1";
+ }
+ }
+ part { name: "base1";
+ description { state: "default" 0.0;
+ image.normal: "bub_base_b1.png";
+ image.border: 0 0 8 13;
+ image.middle: SOLID;
+ fill.smooth: 0;
+ max: 17 99999;
+ min: 17 22;
+ }
+ }
+ part { name: "base2";
+ description { state: "default" 0.0;
+ image.normal: "bub_base_b2.png";
+ image.border: 0 12 8 13;
+ image.middle: SOLID;
+ fill.smooth: 0;
+ rel1.relative: 1.0 0.0;
+ rel1.to: "base1";
+ }
+ }
+ part { name: "elm.swallow.content"; type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1.to: "base0";
+ rel1.offset: 5 4;
+ rel2.to: "base2";
+ rel2.offset: -6 -12;
+ }
+ }
+ part { name: "over"; mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "base0";
+ rel1.offset: 2 1;
+ rel2.to: "base2";
+ rel2.offset: -3 1;
+ rel2.relative: 1.0 0.4;
+ image.normal: "bub_over_bot.png";
+ fill.smooth: 0;
+ }
+ }
+ part { name: "shine_clip"; type: RECT;
+ description { state: "default" 0.0;
+ rel1.to: "over";
+ rel1.offset: 0 -10;
+ rel2.to: "over";
+ }
+ }
+ part { name: "shine"; mouse_events: 0;
+ clip_to: "shine_clip";
+ description { state: "default" 0.0;
+ image.normal: "shine.png";
+ rel1.offset: 0 -2;
+ rel1.to: "over";
+ rel2.relative: 1.0 0.0;
+ rel2.offset: -1 2;
+ rel2.to: "over";
+ FIXED_SIZE(69, 5)
+ }
+ }
+ }
+}
+
diff --git a/edje/img/bub_base_b0.png b/edje/img/bub_base_b0.png
new file mode 100644
index 0000000..f63247a
Binary files /dev/null and b/edje/img/bub_base_b0.png differ
diff --git a/edje/img/bub_base_b1.png b/edje/img/bub_base_b1.png
new file mode 100644
index 0000000..e9dd16b
Binary files /dev/null and b/edje/img/bub_base_b1.png differ
diff --git a/edje/img/bub_base_b2.png b/edje/img/bub_base_b2.png
new file mode 100644
index 0000000..f739858
Binary files /dev/null and b/edje/img/bub_base_b2.png differ
diff --git a/edje/img/map_circle.png b/edje/img/map_circle.png
new file mode 100644
index 0000000..1641097
Binary files /dev/null and b/edje/img/map_circle.png differ
diff --git a/edje/img/map_marker.png b/edje/img/map_marker.png
new file mode 100644
index 0000000..0e545a5
Binary files /dev/null and b/edje/img/map_marker.png differ
diff --git a/edje/img/map_scale.png b/edje/img/map_scale.png
new file mode 100644
index 0000000..35215c1
Binary files /dev/null and b/edje/img/map_scale.png differ
diff --git a/mock-18.xcf.gz b/mock-18.xcf.gz
index 8c2ef6c..f8d6849 100644
Binary files a/mock-18.xcf.gz and b/mock-18.xcf.gz differ
--
|