*array = tmp;
}
-Eina_Bool
-edje_program_is_strncmp(const char *str)
-{
- unsigned int length;
-
- length = strlen(str);
-
- if (strpbrk(str, "*?[\\") != str + length)
- return EINA_FALSE;
- if (str[length] == '['
- || str[length] == '\\')
- return EINA_FALSE;
- return EINA_TRUE;
-}
-
-Eina_Bool
-edje_program_is_strrncmp(const char *str)
-{
- if (*str != '*' && *str != '?')
- return EINA_FALSE;
- if (strpbrk(str + 1, "*?[\\") != NULL)
- return EINA_FALSE;
- return EINA_TRUE;
-}
-
Edje_Part_Collection *
_edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc)
{
const Edje_File *_edje_file_get(void);
void _edje_file_set(const Edje_File *edf);
-Eina_Bool edje_program_is_strncmp(const char *str);
-Eina_Bool edje_program_is_strrncmp(const char *str);
-
#endif
return EINA_TRUE;
}
-static void
-_edje_edit_program_remove(Edje *ed, Edje_Program *p)
-{
- Edje_Program ***array;
- unsigned int *count;
- unsigned int i;
-
- if (!p->signal && !p->source)
- {
- array = &ed->collection->programs.nocmp;
- count = &ed->collection->programs.nocmp_count;
- }
- else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
- && p->source && strpbrk(p->source, "*?[\\") == NULL)
- {
- array = &ed->collection->programs.strcmp;
- count = &ed->collection->programs.strcmp_count;
- }
- else if (p->signal && edje_program_is_strncmp(p->signal)
- && p->source && edje_program_is_strncmp(p->source))
- {
- array = &ed->collection->programs.strncmp;
- count = &ed->collection->programs.strncmp_count;
- }
- else if (p->signal && edje_program_is_strrncmp(p->signal)
- && p->source && edje_program_is_strrncmp(p->source))
- {
- array = &ed->collection->programs.strrncmp;
- count = &ed->collection->programs.strrncmp_count;
- }
- else
- {
- array = &ed->collection->programs.fnmatch;
- count = &ed->collection->programs.fnmatch_count;
- }
-
- for (i = 0; i < *count; ++i)
- if ((*array)[i] == p)
- {
- memmove(*array + i, *array + i + 1, sizeof (Edje_Program *) * (*count - i -1));
- (*count)--;
- break;
- }
-}
-
-static void
-_edje_edit_program_insert(Edje *ed, Edje_Program *p)
-{
- Edje_Program ***array;
- unsigned int *count;
-
- if (!p->signal && !p->source)
- {
- array = &ed->collection->programs.nocmp;
- count = &ed->collection->programs.nocmp_count;
- }
- else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
- && p->source && strpbrk(p->source, "*?[\\") == NULL)
- {
- array = &ed->collection->programs.strcmp;
- count = &ed->collection->programs.strcmp_count;
- }
- else if (p->signal && edje_program_is_strncmp(p->signal)
- && p->source && edje_program_is_strncmp(p->source))
- {
- array = &ed->collection->programs.strncmp;
- count = &ed->collection->programs.strncmp_count;
- }
- else if (p->signal && edje_program_is_strrncmp(p->signal)
- && p->source && edje_program_is_strrncmp(p->source))
- {
- array = &ed->collection->programs.strrncmp;
- count = &ed->collection->programs.strrncmp_count;
- }
- else
- {
- array = &ed->collection->programs.fnmatch;
- count = &ed->collection->programs.fnmatch_count;
- }
-
- *array = realloc(*array, sizeof (Edje_Program *) * (*count + 1));
- (*array)[(*count)++] = p;
-
-}
-
EAPI Eina_Bool
edje_edit_program_del(Evas_Object *obj, const char *prog)
{
//Remove program from programs list
id = epr->id;
- _edje_edit_program_remove(ed, epr);
+ edje_edit_program_remove(ed, epr);
/* fix table program */
if (epr->id != ed->table_programs_size - 1)
if (!source) return EINA_FALSE;
/* Remove from program array */
- _edje_edit_program_remove(ed, epr);
+ edje_edit_program_remove(ed, epr);
_edje_if_string_free(ed, epr->source);
/* Insert it back */
epr->source = eina_stringshare_add(source);
- _edje_edit_program_insert(ed, epr);
+ edje_edit_program_insert(ed, epr);
//Update patterns
_edje_programs_patterns_clean(ed);
if (!signal) return EINA_FALSE;
/* Remove from program array */
- _edje_edit_program_remove(ed, epr);
+ edje_edit_program_remove(ed, epr);
_edje_if_string_free(ed, epr->signal);
/* Insert it back */
epr->signal = eina_stringshare_add(signal);
- _edje_edit_program_insert(ed, epr);
+ edje_edit_program_insert(ed, epr);
//Update patterns
_edje_programs_patterns_clean(ed);
void _edje_module_init();
void _edje_module_shutdown();
-
-
-
-
-
+Eina_Bool edje_program_is_strncmp(const char *str);
+Eina_Bool edje_program_is_strrncmp(const char *str);
+void edje_edit_program_insert(Edje *ed, Edje_Program *p);
+void edje_edit_program_remove(Edje *ed, Edje_Program *p);
// new lua stuff - supercedes the old
#define LUA2 1
edje_object_signal_callback_del(obj, EDJE_PRELOAD_EMISSION, EDJE_PRELOAD_SOURCE, _edje_object_signal_preload_cb);
_edje_object_preload(ed);
}
+
+void
+edje_edit_program_remove(Edje *ed, Edje_Program *p)
+{
+ Edje_Program ***array;
+ unsigned int *count;
+ unsigned int i;
+
+ if (!p->signal && !p->source)
+ {
+ array = &ed->collection->programs.nocmp;
+ count = &ed->collection->programs.nocmp_count;
+ }
+ else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
+ && p->source && strpbrk(p->source, "*?[\\") == NULL)
+ {
+ array = &ed->collection->programs.strcmp;
+ count = &ed->collection->programs.strcmp_count;
+ }
+ else if (p->signal && edje_program_is_strncmp(p->signal)
+ && p->source && edje_program_is_strncmp(p->source))
+ {
+ array = &ed->collection->programs.strncmp;
+ count = &ed->collection->programs.strncmp_count;
+ }
+ else if (p->signal && edje_program_is_strrncmp(p->signal)
+ && p->source && edje_program_is_strrncmp(p->source))
+ {
+ array = &ed->collection->programs.strrncmp;
+ count = &ed->collection->programs.strrncmp_count;
+ }
+ else
+ {
+ array = &ed->collection->programs.fnmatch;
+ count = &ed->collection->programs.fnmatch_count;
+ }
+
+ for (i = 0; i < *count; ++i)
+ if ((*array)[i] == p)
+ {
+ memmove(*array + i, *array + i + 1, sizeof (Edje_Program *) * (*count - i -1));
+ (*count)--;
+ break;
+ }
+}
+
+void
+edje_edit_program_insert(Edje *ed, Edje_Program *p)
+{
+ Edje_Program ***array;
+ unsigned int *count;
+
+ if (!p->signal && !p->source)
+ {
+ array = &ed->collection->programs.nocmp;
+ count = &ed->collection->programs.nocmp_count;
+ }
+ else if (p->signal && strpbrk(p->signal, "*?[\\") == NULL
+ && p->source && strpbrk(p->source, "*?[\\") == NULL)
+ {
+ array = &ed->collection->programs.strcmp;
+ count = &ed->collection->programs.strcmp_count;
+ }
+ else if (p->signal && edje_program_is_strncmp(p->signal)
+ && p->source && edje_program_is_strncmp(p->source))
+ {
+ array = &ed->collection->programs.strncmp;
+ count = &ed->collection->programs.strncmp_count;
+ }
+ else if (p->signal && edje_program_is_strrncmp(p->signal)
+ && p->source && edje_program_is_strrncmp(p->source))
+ {
+ array = &ed->collection->programs.strrncmp;
+ count = &ed->collection->programs.strrncmp_count;
+ }
+ else
+ {
+ array = &ed->collection->programs.fnmatch;
+ count = &ed->collection->programs.fnmatch_count;
+ }
+
+ *array = realloc(*array, sizeof (Edje_Program *) * (*count + 1));
+ (*array)[(*count)++] = p;
+}
+
+Eina_Bool
+edje_program_is_strncmp(const char *str)
+{
+ unsigned int length;
+
+ length = strlen(str);
+
+ if (strpbrk(str, "*?[\\") != str + length)
+ return EINA_FALSE;
+ if (str[length] == '['
+ || str[length] == '\\')
+ return EINA_FALSE;
+ return EINA_TRUE;
+}
+
+Eina_Bool
+edje_program_is_strrncmp(const char *str)
+{
+ if (*str != '*' && *str != '?')
+ return EINA_FALSE;
+ if (strpbrk(str + 1, "*?[\\") != NULL)
+ return EINA_FALSE;
+ return EINA_TRUE;
+}