Ejemplo n.º 1
0
static EINA_CONST uint16_t
_tile_wall_mask_get(uint8_t tl,
                    uint8_t tr,
                    uint8_t bl,
                    uint8_t br)
{
   uint16_t mask = 0xffff;
   uint8_t key;
   unsigned int i;

   tl = _wall_closed_is(tl);
   tr = _wall_closed_is(tr);
   bl = _wall_closed_is(bl);
   br = _wall_closed_is(br);
   key = (tl << 3) | (tr << 2) | (bl << 1) | br;

   for (i = 0; i < EINA_C_ARRAY_LENGTH(_walls_table); i++)
     {
        if (key == _walls_table[i])
          {
             mask = (uint16_t)i << 4;
             break;
          }
     }

   return mask;
}
Ejemplo n.º 2
0
static Eina_Bool
_elm_atspi_bridge_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_ATSPI_BRIDGE_EXTRA_OPS
#define ELM_ATSPI_BRIDGE_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_atspi_bridge_connected_get, _elm_atspi_bridge_connected_get),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_atspi_bridge_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_destructor, _elm_atspi_bridge_efl_object_destructor),
      ELM_ATSPI_BRIDGE_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"connected", NULL, __eolian_elm_atspi_bridge_connected_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 3
0
static void
_struct_properties_init(void)
{
   typedef struct _This_Esql_Model_Table_Properties
     {
        const char *database;
        const char *table;
     } This_Esql_Model_Table_Properties;

   static Eina_Value_Struct_Member prop_members[] = {
     EINA_VALUE_STRUCT_MEMBER(NULL, This_Esql_Model_Table_Properties, database),
     EINA_VALUE_STRUCT_MEMBER(NULL, This_Esql_Model_Table_Properties, table),
   };
   prop_members[ESQL_MODEL_TABLE_PROP_DATABASE].type = EINA_VALUE_TYPE_STRING;
   prop_members[ESQL_MODEL_TABLE_PROP_TABLE].type = EINA_VALUE_TYPE_STRING;

   static Eina_Value_Struct_Desc prop_desc = {
     EINA_VALUE_STRUCT_DESC_VERSION,
     NULL, // no special operations
     prop_members,
     EINA_C_ARRAY_LENGTH(prop_members),
     sizeof(This_Esql_Model_Table_Properties)
   };
   ESQL_MODEL_TABLE_PROPERTIES_DESC = &prop_desc;
}
Ejemplo n.º 4
0
void value_init(void)
{
   typedef struct _My_Struct_V1 {
     int param1;
     char param2;
   } My_Struct_V1;


   static Eina_Value_Struct_Member v1_members[] = {
     // no eina_value_type as they are not constant initializers, see below.
     EINA_VALUE_STRUCT_MEMBER(NULL, My_Struct_V1, param1),
     EINA_VALUE_STRUCT_MEMBER(NULL, My_Struct_V1, param2)
   };
   v1_members[0].type = EINA_VALUE_TYPE_INT;
   v1_members[1].type = EINA_VALUE_TYPE_CHAR;
   static Eina_Value_Struct_Desc v1_desc = {
     EINA_VALUE_STRUCT_DESC_VERSION,
     NULL, // no special operations
     v1_members,
     EINA_C_ARRAY_LENGTH(v1_members),
     sizeof(My_Struct_V1)
   };
   V1_DESC = &v1_desc;

   typedef struct _My_Struct_V2 {
     int param1;
     char param2;
     int param3;
   } My_Struct_V2;
   static Eina_Value_Struct_Member v2_members[] = {
     // no eina_value_type as they are not constant initializers, see below.
     EINA_VALUE_STRUCT_MEMBER(NULL, My_Struct_V2, param1),
     EINA_VALUE_STRUCT_MEMBER(NULL, My_Struct_V2, param2),
     EINA_VALUE_STRUCT_MEMBER(NULL, My_Struct_V2, param3)
   };
   v2_members[0].type = EINA_VALUE_TYPE_INT;
   v2_members[1].type = EINA_VALUE_TYPE_CHAR;
   v2_members[2].type = EINA_VALUE_TYPE_INT;
   static Eina_Value_Struct_Desc v2_desc = {
     EINA_VALUE_STRUCT_DESC_VERSION,
     NULL, // no special operations
     v2_members,
     EINA_C_ARRAY_LENGTH(v2_members),
     sizeof(My_Struct_V2)
   };
   V2_DESC = &v2_desc;
}
Ejemplo n.º 5
0
static const char *
_get_tag(const char *c)
{
   unsigned int i;

   if (c[1] != '>') return NULL;
   for (i = 0; i < EINA_C_ARRAY_LENGTH(tags); i++)
     if (tags[i][1] == c[0]) return tags[i];
   return NULL;
}
Ejemplo n.º 6
0
static Eina_Bool
_elm_list_item_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_LIST_ITEM_EXTRA_OPS
#define ELM_LIST_ITEM_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_separator_set, _elm_list_item_separator_set),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_separator_get, _elm_list_item_separator_get),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_selected_set, _elm_list_item_selected_set),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_selected_get, _elm_list_item_selected_get),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_object_get, _elm_list_item_object_get),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_prev_get, _elm_list_item_prev_get),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_next_get, _elm_list_item_next_get),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_show, _elm_list_item_show),
      EFL_OBJECT_OP_FUNC(elm_obj_list_item_bring_in, _elm_list_item_bring_in),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_list_item_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_invalidate, _elm_list_item_efl_object_invalidate),
      EFL_OBJECT_OP_FUNC(efl_destructor, _elm_list_item_efl_object_destructor),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_list_item_elm_widget_item_disable),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_del_pre, _elm_list_item_elm_widget_item_del_pre),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_list_item_elm_widget_item_signal_emit),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_set, _elm_list_item_elm_widget_item_item_focus_set),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_focus_get, _elm_list_item_elm_widget_item_item_focus_get),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_list_item_elm_widget_item_part_text_set),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_list_item_elm_widget_item_part_text_get),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_set, _elm_list_item_elm_widget_item_part_content_set),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_get, _elm_list_item_elm_widget_item_part_content_get),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_content_unset, _elm_list_item_elm_widget_item_part_content_unset),
      EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_list_item_efl_access_object_i18n_name_get),
      EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_list_item_efl_access_object_state_set_get),
      ELM_LIST_ITEM_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"separator", __eolian_elm_list_item_separator_set_reflect, __eolian_elm_list_item_separator_get_reflect},
      {"selected", __eolian_elm_list_item_selected_set_reflect, __eolian_elm_list_item_selected_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 7
0
static void
_spinner_fill(Eo *obj)
{
   const Filter *f;
   size_t k;

   for (k = 0; k < EINA_C_ARRAY_LENGTH(templates); k++)
     {
        f = &templates[k];
        elm_spinner_special_value_add(obj, (double) k, f->name);
     }
   elm_spinner_editable_set(obj, EINA_FALSE);
   elm_spinner_min_max_set(obj, 0, k - 1);
   elm_spinner_wrap_set(obj, 1);
}
Ejemplo n.º 8
0
static void
bench_eo_callbacks_call(int request)
{
   /* Distribution of calls per amount of callbacks in an object as recorded by
      running the genlist elementary_test test. */
   const double distribution[] = {
        0.2920468197,
        0.2073086496,
        0.217699456,
        0.0207158285,
        0.019707134,
        0.0359433565,
        0.0324896742,
        0.0104299639,
        0.028989003,
        0.0082496801,
        0.123214227,
        0.0001331351,
        0.0030730724
   };

   const int len = EINA_C_ARRAY_LENGTH(distribution);
   int i, j;
   Eo *obj[len];
   for (i = 0 ; i < len ; i++)
     {
        obj[i] = efl_add_ref(SIMPLE_CLASS, NULL);

        for (j = 0 ; j < i ; j++)
          {
             efl_event_callback_priority_add(obj[i], SIMPLE_FOO, (short) j, _cb, NULL);
          }
     }

   for (i = 0 ; i < len ; i++)
     {
        for (j = 0 ; j < (int) (distribution[i] * request) ; j++)
          {
             /* Miss finding the callbacks on purpose, so we measure worst case scenario. */
             efl_event_callback_call(obj[i], SIMPLE_BAR, NULL);
          }
     }

   for (i = 0 ; i < len ; i++)
     {
        efl_unref(obj[i]);
     }
}
Ejemplo n.º 9
0
static Eina_Bool
_elm_systray_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_SYSTRAY_EXTRA_OPS
#define ELM_SYSTRAY_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_systray_id_set, _elm_systray_id_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_id_get, _elm_systray_id_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_category_set, _elm_systray_category_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_category_get, _elm_systray_category_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_icon_theme_path_set, _elm_systray_icon_theme_path_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_icon_theme_path_get, _elm_systray_icon_theme_path_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_menu_set, _elm_systray_menu_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_menu_get, _elm_systray_menu_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_att_icon_name_set, _elm_systray_att_icon_name_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_att_icon_name_get, _elm_systray_att_icon_name_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_status_set, _elm_systray_status_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_status_get, _elm_systray_status_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_icon_name_set, _elm_systray_icon_name_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_icon_name_get, _elm_systray_icon_name_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_title_set, _elm_systray_title_set),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_title_get, _elm_systray_title_get),
      EFL_OBJECT_OP_FUNC(elm_obj_systray_register, _elm_systray_register),
      ELM_SYSTRAY_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"id", __eolian_elm_systray_id_set_reflect, __eolian_elm_systray_id_get_reflect},
      {"icon_theme_path", __eolian_elm_systray_icon_theme_path_set_reflect, __eolian_elm_systray_icon_theme_path_get_reflect},
      {"att_icon_name", __eolian_elm_systray_att_icon_name_set_reflect, __eolian_elm_systray_att_icon_name_get_reflect},
      {"icon_name", __eolian_elm_systray_icon_name_set_reflect, __eolian_elm_systray_icon_name_get_reflect},
      {"title", __eolian_elm_systray_title_set_reflect, __eolian_elm_systray_title_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 10
0
static Eina_Bool
_elm_flipselector_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_FLIPSELECTOR_EXTRA_OPS
#define ELM_FLIPSELECTOR_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_items_get, _elm_flipselector_items_get),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_first_item_get, _elm_flipselector_first_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_last_item_get, _elm_flipselector_last_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_selected_item_get, _elm_flipselector_selected_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_first_interval_set, _elm_flipselector_first_interval_set),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_first_interval_get, _elm_flipselector_first_interval_get),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_item_prepend, _elm_flipselector_item_prepend),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_flip_next, _elm_flipselector_flip_next),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_item_append, _elm_flipselector_item_append),
      EFL_OBJECT_OP_FUNC(elm_obj_flipselector_flip_prev, _elm_flipselector_flip_prev),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_flipselector_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_flipselector_efl_ui_widget_theme_apply),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_flipselector_efl_ui_widget_widget_input_event_handler),
      EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_set, _elm_flipselector_efl_ui_range_display_range_min_max_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_get, _elm_flipselector_efl_ui_range_display_range_min_max_get),
      EFL_OBJECT_OP_FUNC(efl_ui_range_step_set, _elm_flipselector_efl_ui_range_interactive_range_step_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_step_get, _elm_flipselector_efl_ui_range_interactive_range_step_get),
      EFL_OBJECT_OP_FUNC(efl_ui_range_value_set, _elm_flipselector_efl_ui_range_display_range_value_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_value_get, _elm_flipselector_efl_ui_range_display_range_value_get),
      EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_flipselector_efl_access_widget_action_elm_actions_get),
      ELM_FLIPSELECTOR_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"first_interval", __eolian_elm_flipselector_first_interval_set_reflect, __eolian_elm_flipselector_first_interval_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 11
0
static Eina_Bool
_elm_label_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_LABEL_EXTRA_OPS
#define ELM_LABEL_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_label_wrap_width_set, _elm_label_wrap_width_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_wrap_width_get, _elm_label_wrap_width_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_speed_set, _elm_label_slide_speed_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_speed_get, _elm_label_slide_speed_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_mode_set, _elm_label_slide_mode_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_mode_get, _elm_label_slide_mode_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_duration_set, _elm_label_slide_duration_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_duration_get, _elm_label_slide_duration_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_line_wrap_set, _elm_label_line_wrap_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_line_wrap_get, _elm_label_line_wrap_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_ellipsis_set, _elm_label_ellipsis_set),
      EFL_OBJECT_OP_FUNC(elm_obj_label_ellipsis_get, _elm_label_ellipsis_get),
      EFL_OBJECT_OP_FUNC(elm_obj_label_slide_go, _elm_label_slide_go),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_label_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_label_efl_ui_widget_theme_apply),
      EFL_OBJECT_OP_FUNC(efl_part_get, _elm_label_efl_part_part_get),
      ELM_LABEL_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"wrap_width", __eolian_elm_label_wrap_width_set_reflect, __eolian_elm_label_wrap_width_get_reflect},
      {"slide_speed", __eolian_elm_label_slide_speed_set_reflect, __eolian_elm_label_slide_speed_get_reflect},
      {"slide_duration", __eolian_elm_label_slide_duration_set_reflect, __eolian_elm_label_slide_duration_get_reflect},
      {"ellipsis", __eolian_elm_label_ellipsis_set_reflect, __eolian_elm_label_ellipsis_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 12
0
static Eina_Bool
_elm_dayselector_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_DAYSELECTOR_EXTRA_OPS
#define ELM_DAYSELECTOR_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_week_start_set, _elm_dayselector_week_start_set),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_week_start_get, _elm_dayselector_week_start_get),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekend_length_set, _elm_dayselector_weekend_length_set),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekend_length_get, _elm_dayselector_weekend_length_get),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekend_start_set, _elm_dayselector_weekend_start_set),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekend_start_get, _elm_dayselector_weekend_start_get),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekdays_names_set, _elm_dayselector_weekdays_names_set),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_weekdays_names_get, _elm_dayselector_weekdays_names_get),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_day_selected_set, _elm_dayselector_day_selected_set),
      EFL_OBJECT_OP_FUNC(elm_obj_dayselector_day_selected_get, _elm_dayselector_day_selected_get),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_dayselector_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_dayselector_efl_ui_widget_theme_apply),
      EFL_OBJECT_OP_FUNC(efl_ui_l10n_translation_update, _elm_dayselector_efl_ui_l10n_translation_update),
      EFL_OBJECT_OP_FUNC(efl_part_get, _elm_dayselector_efl_part_part_get),
      ELM_DAYSELECTOR_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"weekend_length", __eolian_elm_dayselector_weekend_length_set_reflect, __eolian_elm_dayselector_weekend_length_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 13
0
static Eina_Bool
_elm_multibuttonentry_item_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS
#define ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_selected_set, _elm_multibuttonentry_item_selected_set),
      EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_selected_get, _elm_multibuttonentry_item_selected_get),
      EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_prev_get, _elm_multibuttonentry_item_prev_get),
      EFL_OBJECT_OP_FUNC(elm_obj_multibuttonentry_item_next_get, _elm_multibuttonentry_item_next_get),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_multibuttonentry_item_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_destructor, _elm_multibuttonentry_item_efl_object_destructor),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_signal_emit, _elm_multibuttonentry_item_elm_widget_item_signal_emit),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_set, _elm_multibuttonentry_item_elm_widget_item_part_text_set),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_part_text_get, _elm_multibuttonentry_item_elm_widget_item_part_text_get),
      EFL_OBJECT_OP_FUNC(elm_wdg_item_disable, _elm_multibuttonentry_item_elm_widget_item_disable),
      EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_multibuttonentry_item_efl_access_object_i18n_name_get),
      EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_multibuttonentry_item_efl_access_object_state_set_get),
      EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_multibuttonentry_item_efl_access_widget_action_elm_actions_get),
      ELM_MULTIBUTTONENTRY_ITEM_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"selected", __eolian_elm_multibuttonentry_item_selected_set_reflect, __eolian_elm_multibuttonentry_item_selected_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 14
0
static Eina_Bool
_elm_spinner_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_SPINNER_EXTRA_OPS
#define ELM_SPINNER_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_wrap_set, _elm_spinner_wrap_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_wrap_get, _elm_spinner_wrap_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_interval_set, _elm_spinner_interval_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_interval_get, _elm_spinner_interval_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_round_set, _elm_spinner_round_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_round_get, _elm_spinner_round_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_editable_set, _elm_spinner_editable_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_editable_get, _elm_spinner_editable_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_base_set, _elm_spinner_base_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_base_get, _elm_spinner_base_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_label_format_set, _elm_spinner_label_format_set),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_label_format_get, _elm_spinner_label_format_get),
      EFL_OBJECT_OP_FUNC(elm_obj_spinner_special_value_add, _elm_spinner_special_value_add),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_spinner_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_spinner_efl_ui_widget_theme_apply),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_spinner_efl_ui_widget_on_access_update),
      EFL_OBJECT_OP_FUNC(efl_ui_focus_object_on_focus_update, _elm_spinner_efl_ui_focus_object_on_focus_update),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_spinner_efl_ui_widget_widget_input_event_handler),
      EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_set, _elm_spinner_efl_ui_range_display_range_min_max_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_min_max_get, _elm_spinner_efl_ui_range_display_range_min_max_get),
      EFL_OBJECT_OP_FUNC(efl_ui_range_step_set, _elm_spinner_efl_ui_range_interactive_range_step_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_step_get, _elm_spinner_efl_ui_range_interactive_range_step_get),
      EFL_OBJECT_OP_FUNC(efl_ui_range_value_set, _elm_spinner_efl_ui_range_display_range_value_set),
      EFL_OBJECT_OP_FUNC(efl_ui_range_value_get, _elm_spinner_efl_ui_range_display_range_value_get),
      EFL_OBJECT_OP_FUNC(efl_access_object_i18n_name_get, _elm_spinner_efl_access_object_i18n_name_get),
      EFL_OBJECT_OP_FUNC(efl_access_value_and_text_set, _elm_spinner_efl_access_value_value_and_text_set),
      EFL_OBJECT_OP_FUNC(efl_access_value_and_text_get, _elm_spinner_efl_access_value_value_and_text_get),
      EFL_OBJECT_OP_FUNC(efl_access_value_range_get, _elm_spinner_efl_access_value_range_get),
      EFL_OBJECT_OP_FUNC(efl_access_value_increment_get, _elm_spinner_efl_access_value_increment_get),
      EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_spinner_efl_access_widget_action_elm_actions_get),
      ELM_SPINNER_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"wrap", __eolian_elm_spinner_wrap_set_reflect, __eolian_elm_spinner_wrap_get_reflect},
      {"interval", __eolian_elm_spinner_interval_set_reflect, __eolian_elm_spinner_interval_get_reflect},
      {"round", __eolian_elm_spinner_round_set_reflect, __eolian_elm_spinner_round_get_reflect},
      {"editable", __eolian_elm_spinner_editable_set_reflect, __eolian_elm_spinner_editable_get_reflect},
      {"base", __eolian_elm_spinner_base_set_reflect, __eolian_elm_spinner_base_get_reflect},
      {"label_format", __eolian_elm_spinner_label_format_set_reflect, __eolian_elm_spinner_label_format_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 15
0
EAPI_MAIN int
elm_main(int    argc,
         char **argv)
{
   int ret = EXIT_FAILURE;
   int args;
   int i;
   Editor *ed;
   unsigned int ed_count = 0;
   Eina_Bool quit_opt = EINA_FALSE;
   Eina_Bool debug = EINA_FALSE;
   Ecore_Getopt_Value values[] = {
      ECORE_GETOPT_VALUE_BOOL(debug),
      ECORE_GETOPT_VALUE_BOOL(quit_opt),
      ECORE_GETOPT_VALUE_BOOL(quit_opt)
   };
   const Module *mod_ptr;
   const Module *mod_end = &(_modules[EINA_C_ARRAY_LENGTH(_modules)]);
   const char *env;
   unsigned int debug_flags = 0;

   args = ecore_getopt_parse(&_options, values, argc, argv);
   if (args < 0)
     {
        EINA_LOG_CRIT("Getopt failed");
        goto end;
     }

   /* Quit option requested? End now, with success */
   if (quit_opt)
     {
        ret = EXIT_SUCCESS;
        goto end;
     }

   if (debug)
     debug_flags = ~0U;

   /* Are we running in tree? */
   env = getenv("WAR2EDIT_IN_TREE");
   _in_tree = (env) ? !!atoi(env) : EINA_FALSE;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
   elm_language_set("");
   elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
   elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
   elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
   elm_app_info_set(elm_main, "war2edit", "sprites/units/units.eet");

   if (EINA_UNLIKELY(!_edje_get(NULL)))
     {
        EINA_LOG_CRIT("Failed to get edje theme");
        goto end;
     }

   for (mod_ptr = _modules; mod_ptr != mod_end; ++mod_ptr)
     {
       if (EINA_UNLIKELY(EINA_FALSE == mod_ptr->init()))
         {
            EINA_LOG_CRIT("Failed to initialize module \"%s\"", mod_ptr->name);
            goto modules_shutdown;
         }
     }


   /* Open editors for each specified files */
   for (i = args; i < argc; ++i)
     {
        /* If an editor fails to open, don't close now */
        ed = editor_new(argv[i], debug_flags);
        if (!ed)
          ERR("Failed to create editor with file \"%s\"", argv[i]);
        else
          ++ed_count;
     }

   if (ed_count == 0)
     {
        ed = editor_new(NULL, debug_flags);
        if (EINA_UNLIKELY(!ed))
          {
             CRI("Failed to create editor");
             goto modules_shutdown;
          }
     }

   /* === Main loop === */
   elm_run();
   ret = EXIT_SUCCESS;

modules_shutdown:
   for (--mod_ptr; mod_ptr >= _modules; --mod_ptr)
     mod_ptr->shutdown();
end:
   if (_edje_file)
     {
        free(_edje_file);
        _edje_file = NULL;
     }
   return ret;
}
Ejemplo n.º 16
0
static Eina_Bool
_elm_gengrid_class_initializer(Efl_Class *klass)
{
   const Efl_Object_Ops *opsp = NULL;

   const Efl_Object_Property_Reflection_Ops *ropsp = NULL;

#ifndef ELM_GENGRID_EXTRA_OPS
#define ELM_GENGRID_EXTRA_OPS
#endif

   EFL_OPS_DEFINE(ops,
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_set, _elm_gengrid_align_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_align_get, _elm_gengrid_align_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_set, _elm_gengrid_filled_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_filled_get, _elm_gengrid_filled_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_set, _elm_gengrid_multi_select_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_get, _elm_gengrid_multi_select_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_set, _elm_gengrid_group_item_size_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_group_item_size_get, _elm_gengrid_group_item_size_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_set, _elm_gengrid_select_mode_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_select_mode_get, _elm_gengrid_select_mode_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_set, _elm_gengrid_reorder_mode_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_get, _elm_gengrid_reorder_mode_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_set, _elm_gengrid_highlight_mode_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_highlight_mode_get, _elm_gengrid_highlight_mode_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_type_set, _elm_gengrid_reorder_type_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_set, _elm_gengrid_item_size_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_size_get, _elm_gengrid_item_size_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_set, _elm_gengrid_multi_select_mode_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_multi_select_mode_get, _elm_gengrid_multi_select_mode_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_set, _elm_gengrid_horizontal_set),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_horizontal_get, _elm_gengrid_horizontal_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_item_get, _elm_gengrid_selected_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_get, _elm_gengrid_realized_items_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_first_item_get, _elm_gengrid_first_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_selected_items_get, _elm_gengrid_selected_items_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_last_item_get, _elm_gengrid_last_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_before, _elm_gengrid_item_insert_before),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_realized_items_update, _elm_gengrid_realized_items_update),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_insert_after, _elm_gengrid_item_insert_after),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_items_count, _elm_gengrid_items_count),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_at_xy_item_get, _elm_gengrid_at_xy_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_append, _elm_gengrid_item_append),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_prepend, _elm_gengrid_item_prepend),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_clear, _elm_gengrid_clear),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_item_sorted_insert, _elm_gengrid_item_sorted_insert),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_search_by_text_item_get, _elm_gengrid_search_by_text_item_get),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_start, _elm_gengrid_reorder_mode_start),
      EFL_OBJECT_OP_FUNC(elm_obj_gengrid_reorder_mode_stop, _elm_gengrid_reorder_mode_stop),
      EFL_OBJECT_OP_FUNC(efl_constructor, _elm_gengrid_efl_object_constructor),
      EFL_OBJECT_OP_FUNC(efl_provider_find, _elm_gengrid_efl_object_provider_find),
      EFL_OBJECT_OP_FUNC(efl_gfx_entity_position_set, _elm_gengrid_efl_gfx_entity_position_set),
      EFL_OBJECT_OP_FUNC(efl_gfx_entity_size_set, _elm_gengrid_efl_gfx_entity_size_set),
      EFL_OBJECT_OP_FUNC(efl_canvas_group_member_add, _elm_gengrid_efl_canvas_group_group_member_add),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_theme_apply, _elm_gengrid_efl_ui_widget_theme_apply),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_on_access_update, _elm_gengrid_efl_ui_widget_on_access_update),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_interest_region_get, _elm_gengrid_efl_ui_widget_interest_region_get),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_input_event_handler, _elm_gengrid_efl_ui_widget_widget_input_event_handler),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_highlight_geometry_get, _elm_gengrid_efl_ui_widget_focus_highlight_geometry_get),
      EFL_OBJECT_OP_FUNC(elm_widget_item_container_focused_item_get, _elm_gengrid_elm_widget_item_container_focused_item_get),
      EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_set, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_set),
      EFL_OBJECT_OP_FUNC(elm_interface_scrollable_item_loop_enabled_get, _elm_gengrid_elm_interface_scrollable_item_loop_enabled_get),
      EFL_OBJECT_OP_FUNC(elm_interface_scrollable_bounce_allow_set, _elm_gengrid_elm_interface_scrollable_bounce_allow_set),
      EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_set, _elm_gengrid_elm_interface_scrollable_policy_set),
      EFL_OBJECT_OP_FUNC(elm_interface_scrollable_policy_get, _elm_gengrid_elm_interface_scrollable_policy_get),
      EFL_OBJECT_OP_FUNC(efl_access_object_access_children_get, _elm_gengrid_efl_access_object_access_children_get),
      EFL_OBJECT_OP_FUNC(efl_access_object_state_set_get, _elm_gengrid_efl_access_object_state_set_get),
      EFL_OBJECT_OP_FUNC(efl_access_widget_action_elm_actions_get, _elm_gengrid_efl_access_widget_action_elm_actions_get),
      EFL_OBJECT_OP_FUNC(efl_access_selection_selected_children_count_get, _elm_gengrid_efl_access_selection_selected_children_count_get),
      EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_get, _elm_gengrid_efl_access_selection_selected_child_get),
      EFL_OBJECT_OP_FUNC(efl_access_selection_selected_child_deselect, _elm_gengrid_efl_access_selection_selected_child_deselect),
      EFL_OBJECT_OP_FUNC(efl_access_selection_child_select, _elm_gengrid_efl_access_selection_child_select),
      EFL_OBJECT_OP_FUNC(efl_access_selection_child_deselect, _elm_gengrid_efl_access_selection_child_deselect),
      EFL_OBJECT_OP_FUNC(efl_access_selection_is_child_selected, _elm_gengrid_efl_access_selection_is_child_selected),
      EFL_OBJECT_OP_FUNC(efl_access_selection_all_children_select, _elm_gengrid_efl_access_selection_all_children_select),
      EFL_OBJECT_OP_FUNC(efl_access_selection_clear, _elm_gengrid_efl_access_selection_access_selection_clear),
      EFL_OBJECT_OP_FUNC(efl_ui_focus_object_setup_order, _elm_gengrid_efl_ui_focus_object_setup_order),
      EFL_OBJECT_OP_FUNC(efl_ui_widget_focus_state_apply, _elm_gengrid_efl_ui_widget_focus_state_apply),
      EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_setup_on_first_touch, _elm_gengrid_efl_ui_focus_manager_setup_on_first_touch),
      EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_focus_get, _elm_gengrid_efl_ui_focus_manager_manager_focus_get),
      EFL_OBJECT_OP_FUNC(efl_ui_focus_manager_move, _elm_gengrid_efl_ui_focus_manager_move),
      ELM_GENGRID_EXTRA_OPS
   );
   opsp = &ops;

   static const Efl_Object_Property_Reflection refl_table[] = {
      {"filled", __eolian_elm_gengrid_filled_set_reflect, __eolian_elm_gengrid_filled_get_reflect},
      {"multi_select", __eolian_elm_gengrid_multi_select_set_reflect, __eolian_elm_gengrid_multi_select_get_reflect},
      {"reorder_mode", __eolian_elm_gengrid_reorder_mode_set_reflect, __eolian_elm_gengrid_reorder_mode_get_reflect},
      {"highlight_mode", __eolian_elm_gengrid_highlight_mode_set_reflect, __eolian_elm_gengrid_highlight_mode_get_reflect},
      {"horizontal", __eolian_elm_gengrid_horizontal_set_reflect, __eolian_elm_gengrid_horizontal_get_reflect},
   };
   static const Efl_Object_Property_Reflection_Ops rops = {
      refl_table, EINA_C_ARRAY_LENGTH(refl_table)
   };
   ropsp = &rops;

   return efl_class_functions_set(klass, opsp, ropsp);
}
Ejemplo n.º 17
0
#define _MODULE(mod_) { #mod_, mod_ ## _init, mod_ ## _shutdown }
static const Mod _modules[] =
{
   _MODULE(eina),
   _MODULE(_log),
   _MODULE(ecore),
   _MODULE(ecore_file),
   _MODULE(email_account),
   _MODULE(email_config),
   _MODULE(email_subprocess),
   _MODULE(email_imessage),
   _MODULE(email_protocol),
   _MODULE(email_module),
};
static const int _modules_count = EINA_C_ARRAY_LENGTH(_modules);
#undef _MODULE


/*============================================================================*
 *                                 Public API                                 *
 *============================================================================*/

EAPI int
email_init(void)
{
   const Mod *m;
   int it;

   if (_init_count == 0)
     {