move a chunk of stuff to use evas_smart_class_new() - evas_smart_new() will

probably die as it's already got legacy funcion methods for layer etc. stuff.


SVN revision: 31161
This commit is contained in:
Carsten Haitzler 2007-08-04 13:12:43 +00:00
parent ffa9faff45
commit a960cd070b
19 changed files with 313 additions and 201 deletions

View File

@ -649,10 +649,13 @@ static void
_e_box_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_box",
{
static const Evas_Smart_Class sc =
{
"e_box",
EVAS_SMART_CLASS_VERSION,
_e_box_smart_add,
_e_box_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_box_smart_move,
_e_box_smart_resize,
_e_box_smart_show,
@ -660,7 +663,10 @@ _e_box_smart_init(void)
_e_box_smart_color_set,
_e_box_smart_clip_set,
_e_box_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -74,18 +74,22 @@ e_editable_add(Evas *evas)
{
if (!_e_editable_smart)
{
_e_editable_smart = evas_smart_new("e_editable",
_e_editable_smart_add, /* add */
_e_editable_smart_del, /* del */
NULL, NULL, NULL, NULL, NULL, /* stacking */
_e_editable_smart_move, /* move */
_e_editable_smart_resize, /* resize */
_e_editable_smart_show, /* show */
_e_editable_smart_hide, /* hide */
_e_editable_color_set, /* color_set */
_e_editable_clip_set, /* clip_set */
_e_editable_clip_unset, /* clip_unset */
NULL); /* data*/
static const Evas_Smart_Class sc =
{
"e_editable",
EVAS_SMART_CLASS_VERSION,
_e_editable_smart_add,
_e_editable_smart_del,
_e_editable_smart_move,
_e_editable_smart_resize,
_e_editable_smart_show,
_e_editable_smart_hide,
_e_editable_color_set,
_e_editable_clip_set,
_e_editable_clip_unset,
NULL
};
_e_editable_smart = evas_smart_class_new(&sc);
_e_editable_smart_use = 0;
}

View File

@ -70,18 +70,22 @@ e_entry_add(Evas *evas)
{
if (!_e_entry_smart)
{
_e_entry_smart = evas_smart_new("e_entry",
_e_entry_smart_add, /* add */
_e_entry_smart_del, /* del */
NULL, NULL, NULL, NULL, NULL, /* stacking */
_e_entry_smart_move, /* move */
_e_entry_smart_resize, /* resize */
_e_entry_smart_show, /* show */
_e_entry_smart_hide, /* hide */
_e_entry_color_set, /* color_set */
_e_entry_clip_set, /* clip_set */
_e_entry_clip_unset, /* clip_unset */
NULL); /* data*/
static const Evas_Smart_Class sc =
{
"e_entry",
EVAS_SMART_CLASS_VERSION,
_e_entry_smart_add,
_e_entry_smart_del,
_e_entry_smart_move,
_e_entry_smart_resize,
_e_entry_smart_show,
_e_entry_smart_hide,
_e_entry_color_set,
_e_entry_clip_set,
_e_entry_clip_unset,
NULL
};
_e_entry_smart = evas_smart_class_new(&sc);
_e_entry_smart_use = 0;
}

View File

@ -822,10 +822,12 @@ static void
_e_flowlayout_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_flowlayout",
{
static const Evas_Smart_Class sc =
{
"e_flowlayout",
_e_flowlayout_smart_add,
_e_flowlayout_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_flowlayout_smart_move,
_e_flowlayout_smart_resize,
_e_flowlayout_smart_show,
@ -833,7 +835,10 @@ _e_flowlayout_smart_init(void)
_e_flowlayout_smart_color_set,
_e_flowlayout_smart_clip_set,
_e_flowlayout_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -369,10 +369,13 @@ e_fm2_init(void)
ecore_file_mkpath(path);
_e_fm2_meta_path = strdup(path);
_e_fm2_smart = evas_smart_new("e_fm",
{
static const Evas_Smart_Class sc =
{
"e_fm",
EVAS_SMART_CLASS_VERSION,
_e_fm2_smart_add, /* add */
_e_fm2_smart_del, /* del */
NULL, NULL, NULL, NULL, NULL,
_e_fm2_smart_move, /* move */
_e_fm2_smart_resize, /* resize */
_e_fm2_smart_show,/* show */
@ -380,7 +383,10 @@ e_fm2_init(void)
_e_fm2_smart_color_set, /* color_set */
_e_fm2_smart_clip_set, /* clip_set */
_e_fm2_smart_clip_unset, /* clip_unset */
NULL); /* data*/
NULL
};
_e_fm2_smart = evas_smart_class_new(&sc);
}
// _e_fm2_client_spawn();
e_fm2_custom_file_init();
efreet_mime_init();

View File

@ -2924,10 +2924,13 @@ static void
_e_gadcon_layout_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_gadcon_layout",
{
static const Evas_Smart_Class sc =
{
"e_gadcon_layout",
EVAS_SMART_CLASS_VERSION,
_e_gadcon_layout_smart_add,
_e_gadcon_layout_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_gadcon_layout_smart_move,
_e_gadcon_layout_smart_resize,
_e_gadcon_layout_smart_show,
@ -2935,7 +2938,10 @@ _e_gadcon_layout_smart_init(void)
_e_gadcon_layout_smart_color_set,
_e_gadcon_layout_smart_clip_set,
_e_gadcon_layout_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -272,10 +272,13 @@ static void
_e_icon_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_icon",
{
static const Evas_Smart_Class sc =
{
"e_icon",
EVAS_SMART_CLASS_VERSION,
_e_icon_smart_add,
_e_icon_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_icon_smart_move,
_e_icon_smart_resize,
_e_icon_smart_show,
@ -283,7 +286,10 @@ _e_icon_smart_init(void)
_e_icon_smart_color_set,
_e_icon_smart_clip_set,
_e_icon_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -712,11 +712,24 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME, _e_smart_add, _e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move, _e_smart_resize, _e_smart_show,
_e_smart_hide, _e_smart_color_set,
_e_smart_clip_set, _e_smart_clip_unset, NULL);
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
_e_smart_hide,
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -572,7 +572,14 @@ _cb_unload(void *data, void *data2)
if (!item->selected) continue;
lbl = e_widget_ilist_nth_label_get(cfdata->o_loaded, idx);
mod = _get_module(cfdata, lbl);
if ((mod) && (mod->enabled)) e_module_disable(mod);
if ((mod) && (mod->enabled))
{
e_module_disable(mod);
// FIXME: we need to UNLOAD modules by deleting their objects too! right now
// this is done next restart
// cfdata->modules = evas_list_remove(cfdata->modules, mod);
// e_object_del(E_OBJECT(mod));
}
}
if (l) evas_list_free(l);
}

View File

@ -350,10 +350,13 @@ static void
_e_layout_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_layout",
{
static const Evas_Smart_Class sc =
{
"e_layout",
EVAS_SMART_CLASS_VERSION,
_e_layout_smart_add,
_e_layout_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_layout_smart_move,
_e_layout_smart_resize,
_e_layout_smart_show,
@ -361,7 +364,10 @@ _e_layout_smart_init(void)
_e_layout_smart_color_set,
_e_layout_smart_clip_set,
_e_layout_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -196,10 +196,13 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME,
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
@ -207,6 +210,9 @@ _e_smart_init(void)
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -73,11 +73,11 @@ e_module_all_load(void)
evas_list_append(_e_modules_delayed,
evas_stringshare_add(em->name));
}
else
else if (em->enabled)
{
m = NULL;
if (em->name) m = e_module_new(em->name);
if ((m) && (em->enabled)) e_module_enable(m);
if (m) e_module_enable(m);
}
}
}

View File

@ -249,10 +249,13 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME,
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
@ -260,6 +263,9 @@ _e_smart_init(void)
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -783,10 +783,13 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME,
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
@ -794,6 +797,9 @@ _e_smart_init(void)
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -533,10 +533,13 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME,
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
@ -544,6 +547,9 @@ _e_smart_init(void)
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -152,11 +152,14 @@ _e_spectrum_smart_clip_unset(Evas_Object *o)
static void
_e_spectrum_smart_init()
{
if ( _e_spectrum_smart ) return;
_e_spectrum_smart = evas_smart_new("e_spectrum",
if (_e_spectrum_smart) return;
{
static const Evas_Smart_Class sc =
{
"e_spectrum",
EVAS_SMART_CLASS_VERSION,
_e_spectrum_smart_add,
_e_spectrum_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_spectrum_smart_move,
_e_spectrum_smart_resize,
_e_spectrum_smart_show,
@ -164,7 +167,10 @@ _e_spectrum_smart_init()
_e_spectrum_smart_color_set,
_e_spectrum_smart_clip_set,
_e_spectrum_smart_clip_unset,
NULL);
NULL
};
_e_spectrum_smart = evas_smart_class_new(&sc);
}
}
void

View File

@ -825,10 +825,13 @@ static void
_e_table_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new("e_table",
{
static const Evas_Smart_Class sc =
{
"e_table",
EVAS_SMART_CLASS_VERSION,
_e_table_smart_add,
_e_table_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_table_smart_move,
_e_table_smart_resize,
_e_table_smart_show,
@ -836,7 +839,10 @@ _e_table_smart_init(void)
_e_table_smart_color_set,
_e_table_smart_clip_set,
_e_table_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}
static void

View File

@ -549,16 +549,23 @@ _e_smart_clip_unset(Evas_Object * obj)
static void
_e_smart_init(void)
{
if (_e_smart)
return;
_e_smart = evas_smart_new(SMART_NAME,
if (_e_smart) return;
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
_e_smart_hide,
_e_smart_color_set,
_e_smart_clip_set, _e_smart_clip_unset, NULL);
_e_smart_clip_set,
_e_smart_clip_unset,
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}

View File

@ -563,10 +563,13 @@ static void
_e_smart_init(void)
{
if (_e_smart) return;
_e_smart = evas_smart_new(SMART_NAME,
{
static const Evas_Smart_Class sc =
{
SMART_NAME,
EVAS_SMART_CLASS_VERSION,
_e_smart_add,
_e_smart_del,
NULL, NULL, NULL, NULL, NULL,
_e_smart_move,
_e_smart_resize,
_e_smart_show,
@ -574,5 +577,8 @@ _e_smart_init(void)
_e_smart_color_set,
_e_smart_clip_set,
_e_smart_clip_unset,
NULL);
NULL
};
_e_smart = evas_smart_class_new(&sc);
}
}