Ejemplo n.º 1
0
//testing ui reflection on prefs data changes
static Eina_Bool
_elm_prefs_data_change(void *data)
{
   Evas_Object *notify = data;
   Elm_Prefs_Data *prefs_data;
   Elm_Prefs_Item_Type type;
   Eina_Value value;

   prefs_data = evas_object_data_get(notify, "prefs_data");

   if (elm_prefs_data_value_get(prefs_data, "main:universe", &type, &value))
     {
        eina_value_set(&value, 42);
        elm_prefs_data_value_set(prefs_data, "main:universe", type, &value);
     }

   if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
     {
        eina_value_set(&value, "This is a text field (:");
        elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
     }

   evas_object_show(notify);

   return ECORE_CALLBACK_RENEW;
}
Ejemplo n.º 2
0
//testing ui reflection on prefs data changes
static Eina_Bool
_elm_prefs_items_change(void *data)
{
   Evas_Object *prefs, *notify = data;
   Elm_Prefs_Data *prefs_data;
   Elm_Prefs_Item_Type type;
   Eina_Value value;

   prefs = evas_object_data_get(notify, "prefs");
   prefs_data = evas_object_data_get(notify, "prefs_data");

   visible = !visible;
   elm_prefs_item_visible_set(prefs, "main:floatsp", visible);

   disabled = !disabled;
   elm_prefs_item_disabled_set(prefs, "main:checkb", disabled);

   editable = !editable;
   elm_prefs_item_editable_set(prefs, "main:text", editable);
   if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
     {
        eina_value_set(&value, editable ? "This is a editable text entry" :
                       "This is a non-editable text entry");
        elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
     }

   evas_object_show(notify);

   return ECORE_CALLBACK_RENEW;
}
Ejemplo n.º 3
0
static void
_action_cb(void *data, Evas_Object *obj, void *event_info)
{
   Evas_Object *notify = data;
   Elm_Prefs_Data *prefs_data;
   Elm_Prefs_Item_Type type;
   Eina_Value value;

   prefs_data = evas_object_data_get(notify, "prefs_data");

   if (elm_prefs_data_value_get(prefs_data, "main:text", &type, &value))
     {
        eina_value_set(&value, "Action!");
        elm_prefs_data_value_set(prefs_data, "main:text", type, &value);
     }
}