How do you think raster about hilight -> highlight?

Daniel Juyung Seo (SeoZ)

On Tue, Aug 23, 2011 at 9:31 PM, Daniel Juyung Seo <seojuyu...@gmail.com> wrote:
> hilight -> highlight
> http://en.wiktionary.org/wiki/hilight
>
> I won't touch elm_access while raster is heavily working on it.
> So fix it!
>
> Daniel Juyung Seo (SeoZ)
>
>
> On Tue, Aug 23, 2011 at 5:46 PM, Enlightenment SVN
> <no-re...@enlightenment.org> wrote:
>> Log:
>> make access hilight follow object around and vanish it target is
>>  hidden or deleted.
>>
>>
>>
>> Author:       raster
>> Date:         2011-08-23 01:46:01 -0700 (Tue, 23 Aug 2011)
>> New Revision: 62714
>> Trac:         http://trac.enlightenment.org/e/changeset/62714
>>
>> Modified:
>>  trunk/elementary/src/lib/elm_access.c trunk/elementary/src/lib/elm_widget.h
>>
>> Modified: trunk/elementary/src/lib/elm_access.c
>> ===================================================================
>> --- trunk/elementary/src/lib/elm_access.c       2011-08-23 07:44:49 UTC (rev 
>> 62713)
>> +++ trunk/elementary/src/lib/elm_access.c       2011-08-23 08:46:01 UTC (rev 
>> 62714)
>> @@ -101,7 +101,7 @@
>>  {
>>    Elm_Access_Info *ac = evas_object_data_get(data, "_elm_access");
>>    if (!ac) return;
>> -   _elm_access_object_unhilight(data);
>> +//   _elm_access_object_unhilight(data);
>>    if (ac->delay_timer)
>>      {
>>         ecore_timer_del(ac->delay_timer);
>> @@ -135,6 +135,44 @@
>>    printf("read done\n");
>>  }
>>
>> +static void
>> +_access_obj_hilight_del_cb(void *data __UNUSED__, Evas *e, Evas_Object *obj 
>> __UNUSED__, void *event_info __UNUSED__)
>> +{
>> +   _elm_access_object_hilight_disable(e);
>> +}
>> +
>> +static void
>> +_access_obj_hilight_hide_cb(void *data __UNUSED__, Evas *e, Evas_Object 
>> *obj __UNUSED__, void *event_info __UNUSED__)
>> +{
>> +   _elm_access_object_hilight_disable(e);
>> +}
>> +
>> +static void
>> +_access_obj_hilight_move_cb(void *data __UNUSED__, Evas *e __UNUSED__, 
>> Evas_Object *obj, void *event_info __UNUSED__)
>> +{
>> +   Evas_Coord x, y;
>> +   Evas_Object *o;
>> +
>> +   o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
>> +   if (!o) return;
>> +   evas_object_geometry_get(obj, &x, &y, NULL, NULL);
>> +   evas_object_move(o, x, y);
>> +}
>> +
>> +static void
>> +_access_obj_hilight_resize_cb(void *data __UNUSED__, Evas *e __UNUSED__, 
>> Evas_Object *obj, void *event_info __UNUSED__)
>> +{
>> +   Evas_Coord w, h;
>> +   Evas_Object *o;
>> +
>> +   o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
>> +   if (!o) return;
>> +   evas_object_geometry_get(obj, NULL, NULL, &w, &h);
>> +   evas_object_resize(o, w, h);
>> +}
>> +
>> +
>> +
>>  //-------------------------------------------------------------------------//
>>
>>  EAPI void
>> @@ -252,6 +290,7 @@
>>  _elm_access_object_hilight(Evas_Object *obj)
>>  {
>>    Evas_Object *o;
>> +   Evas_Coord x, y, w, h;
>>
>>    o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
>>    if (!o)
>> @@ -266,27 +305,31 @@
>>         if (ptarget)
>>           {
>>              evas_object_data_del(o, "_elm_access_target");
>> -             // FIXME: delete move/resize/del callbacks from ptarget
>> +             evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_DEL,
>> +                                                 
>> _access_obj_hilight_del_cb, NULL);
>> +             evas_object_event_callback_del_full(ptarget, 
>> EVAS_CALLBACK_HIDE,
>> +                                                 
>> _access_obj_hilight_hide_cb, NULL);
>> +             evas_object_event_callback_del_full(ptarget, 
>> EVAS_CALLBACK_MOVE,
>> +                                                 
>> _access_obj_hilight_move_cb, NULL);
>> +             evas_object_event_callback_del_full(ptarget, 
>> EVAS_CALLBACK_RESIZE,
>> +                                                 
>> _access_obj_hilight_resize_cb, NULL);
>>           }
>>      }
>>    evas_object_data_set(o, "_elm_access_target", obj);
>> -   // FIXME: track obj pos/size until hilight removed
>>    _elm_theme_object_set(obj, o, "access", "base", "default");
>> +   evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
>> +                                  _access_obj_hilight_del_cb, NULL);
>> +   evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE,
>> +                                  _access_obj_hilight_hide_cb, NULL);
>> +   evas_object_event_callback_add(obj, EVAS_CALLBACK_MOVE,
>> +                                  _access_obj_hilight_move_cb, NULL);
>> +   evas_object_event_callback_add(obj, EVAS_CALLBACK_RESIZE,
>> +                                  _access_obj_hilight_resize_cb, NULL);
>>    evas_object_raise(o);
>> -
>> -     {
>> -        Evas_Coord x, y, w, h;
>> -        evas_object_geometry_get(obj, &x, &y, &w, &h);
>> -        evas_object_move(o, x, y);
>> -        evas_object_resize(o, w, h);
>> -     }
>> -
>> +   evas_object_geometry_get(obj, &x, &y, &w, &h);
>> +   evas_object_move(o, x, y);
>> +   evas_object_resize(o, w, h);
>>    evas_object_show(o);
>> -   // if hilight obj doesnt exist - create and attach to window
>> -   // make sure its on a high layer
>> -   // show it and emit signal
>> -   // if exists, move and resize to obj object location
>> -   // ** try use dragables to specify pos+size??
>>  }
>>
>>  EAPI void
>> @@ -297,10 +340,43 @@
>>    o = evas_object_name_find(evas_object_evas_get(obj), "_elm_access_disp");
>>    if (!o) return;
>>    ptarget = evas_object_data_get(o, "_elm_access_target");
>> -   if (ptarget == obj) evas_object_del(o);
>> +   if (ptarget == obj)
>> +     {
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_DEL,
>> +                                            _access_obj_hilight_del_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_HIDE,
>> +                                            _access_obj_hilight_hide_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_MOVE,
>> +                                            _access_obj_hilight_move_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_RESIZE,
>> +                                            _access_obj_hilight_resize_cb, 
>> NULL);
>> +        evas_object_del(o);
>> +     }
>>  }
>>
>>  EAPI void
>> +_elm_access_object_hilight_disable(Evas *e)
>> +{
>> +   Evas_Object *o, *ptarget;
>> +
>> +   o = evas_object_name_find(e, "_elm_access_disp");
>> +   if (!o) return;
>> +   ptarget = evas_object_data_get(o, "_elm_access_target");
>> +   if (ptarget)
>> +     {
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_DEL,
>> +                                            _access_obj_hilight_del_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_HIDE,
>> +                                            _access_obj_hilight_hide_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_MOVE,
>> +                                            _access_obj_hilight_move_cb, 
>> NULL);
>> +        evas_object_event_callback_del_full(ptarget, EVAS_CALLBACK_RESIZE,
>> +                                            _access_obj_hilight_resize_cb, 
>> NULL);
>> +     }
>> +   evas_object_del(o);
>> +}
>> +
>> +EAPI void
>>  _elm_access_object_register(Evas_Object *obj, Evas_Object *hoverobj)
>>  {
>>    Elm_Access_Info *ac;
>>
>> Modified: trunk/elementary/src/lib/elm_widget.h
>> ===================================================================
>> --- trunk/elementary/src/lib/elm_widget.h       2011-08-23 07:44:49 UTC (rev 
>> 62713)
>> +++ trunk/elementary/src/lib/elm_widget.h       2011-08-23 08:46:01 UTC (rev 
>> 62714)
>> @@ -233,6 +233,7 @@
>>  EAPI Elm_Access_Info *_elm_access_object_get(Evas_Object *obj);
>>  EAPI void             _elm_access_object_hilight(Evas_Object *obj);
>>  EAPI void             _elm_access_object_unhilight(Evas_Object *obj);
>> +EAPI void             _elm_access_object_hilight_disable(Evas *e);
>>  EAPI void             _elm_access_object_register(Evas_Object *obj, 
>> Evas_Object *hoverobj);
>>  EAPI Eina_Bool        _elm_access_2nd_click_timeout(Evas_Object *obj);
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
>> user administration capabilities and model configuration. Take
>> the hassle out of deploying and managing Subversion and the
>> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
>> _______________________________________________
>> enlightenment-svn mailing list
>> enlightenment-...@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>>
>

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to