EAPI Eina_Bool edje_text_class_set (const char *text_class, const char *font, Evas_Font_Size size);
/**
+ * @brief Get the font and the font size from Edje text class.
+ *
+ * @param text_class The text class name
+ * @param font The font name
+ * @param size The font size
+ *
+ * @return @c EINA_TRUE, on success or @c EINA_FALSE, on error
+ *
+ * This function gets the font and the font name from the specified Edje
+ * text class. The font string will only be valid until the text class is
+ * changed or edje is shut down.
+ * @see edje_text_class_set().
+ *
+ * @since 1.14
+ */
+EAPI Eina_Bool edje_text_class_get (const char *text_class, const char **font, Evas_Font_Size *size);
+
+/**
* @brief Delete the text class.
*
* @param text_class The text class name string
@in Edje_Cursor cur; /*@ The cursor to adjust. */
}
}
+ text_class_get @const {
+ /*@
+ @brief Gets font and font size from edje text class.
+
+ @return @c EINA_TRUE, on success or @c EINA_FALSE, on error
+
+ This function gets the font and the font size from the object
+ text class. The font string will only be valid until the text
+ class is changed or the edje object is deleted. */
+ return: bool;
+ params {
+ @in const(char)* text_class; /*@ The text class name */
+ @out const(char)* font; /*@ Font name */
+ @out Evas_Font_Size size; /*@ Font Size */
+ }
+ }
color_class_set {
/*@
@brief Sets the object color class.
void _color_class_set(Eo *obj, void *_pd, va_list *list);
void _color_class_get(Eo *obj, void *_pd, va_list *list);
void _text_class_set(Eo *obj, void *_pd, va_list *list);
+void _text_class_get(Eo *obj, void *_pd, va_list *list);
void _part_exists(Eo *obj, void *_pd, va_list *list);
void _part_object_get(Eo *obj, void *_pd, va_list *list);
void _part_geometry_get(Eo *obj, void *_pd, va_list *list);
return EINA_TRUE;
}
+EAPI Eina_Bool
+edje_text_class_get(const char *text_class, const char **font, Evas_Font_Size *size)
+{
+ Edje_Text_Class *tc;
+
+ if (!text_class) return EINA_FALSE;
+
+ tc = eina_hash_find(_edje_text_class_hash, text_class);
+
+ if (tc)
+ {
+ if (font) *font = tc->font;
+ if (size) *size = tc->size;
+ }
+ else
+ {
+ if (font) *font = NULL;
+ if (size) *size = 0;
+
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
void
edje_text_class_del(const char *text_class)
{
}
EOLIAN Eina_Bool
+_edje_object_text_class_get(Eo *obj EINA_UNUSED, Edje *ed, const char *text_class, const char **font, Evas_Font_Size *size)
+{
+ Edje_Text_Class *tc = _edje_text_class_find(ed, text_class);
+
+ if (tc)
+ {
+ if (font) *font = tc->font;
+ if (size) *size = tc->size;
+ }
+ else
+ {
+ if (font) *font = NULL;
+ if (size) *size = 0;
+
+ return EINA_FALSE;
+ }
+ return EINA_TRUE;
+}
+
+EOLIAN Eina_Bool
_edje_object_part_exists(Eo *obj EINA_UNUSED, Edje *ed, const char *part)
{
Edje_Real_Part *rp;