}
EOLIAN static Eina_Bool
-_elm_prefs_file_set(Eo *obj, Elm_Prefs_Data *sd, const char *file, const char *page)
+_elm_prefs_efl_file_file_set(Eo *obj, Elm_Prefs_Data *sd, const char *file, const char *page)
{
const char *prefix;
return EINA_TRUE;
}
-EOLIAN static Eina_Bool
-_elm_prefs_file_get(Eo *obj EINA_UNUSED, Elm_Prefs_Data *sd, const char **file, const char **page)
+EOLIAN static void
+_elm_prefs_efl_file_file_get(Eo *obj EINA_UNUSED, Elm_Prefs_Data *sd, const char **file, const char **page)
{
if (file) *file = sd->file;
if (page) *page = sd->page;
-
- return EINA_TRUE;
}
EOLIAN static Eina_Bool
evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
}
+EAPI Eina_Bool
+elm_prefs_file_set(Eo *obj, const char *file, const char *page)
+{
+ return eo_do((Eo *) obj, efl_file_set(file, page));
+}
+
+EAPI Eina_Bool
+elm_prefs_file_get(const Eo *obj, const char **file, const char **page)
+{
+ eo_do((Eo *) obj, efl_file_get(file, page));
+
+ return EINA_TRUE;
+}
+
#include "elm_prefs.eo.c"
-class Elm_Prefs (Elm_Widget)
+class Elm_Prefs (Elm_Widget, Efl.File)
{
eo_prefix: elm_obj_prefs;
properties {
Elm_Prefs_Data *data; /*@ A valid prefs_data handle */
}
}
- file {
- set {
- /*@
- Set file and page to populate a given prefs widget's interface.
-
- @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
-
- Elm prefs widgets start blank, with no child widgets. It's meant to
- have its viewport populated with child elements coming from a
- declaration file. That file (usually with @b .epb extension), is a
- binary format (Eet) one, coming from a human-readable textual
- declaration. This textual form (usually with @b .epc extension) is
- translated to the binary form by means of the @b prefs_cc compiler.
-
- With this function, one thus populates a prefs widget with UI
- elements.
-
- If @a file is @c NULL, "elm_app_data_dir_get()/preferences.epb"
- will be used, by default. If @a file is a @b relative path, the
- prefix "elm_app_data_dir_get()/" will be implicitly used with it.
- If @a page is @c NULL, it is considered "main", as default.
-
- @warning If your binary is not properly installed and
- elm_app_data_dir_get() can't be figured out, a fallback value of
- "." will be tryed, instead.
-
- @see elm_prefs_file_get()
-
- @since 1.8 */
- return: bool;
- }
- get {
- /*@
- Retrieve file and page bound to a given prefs widget.
-
- @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
-
- @note Use @c NULL pointers on the components you're not
- interested in: they'll be ignored by the function.
-
- @see elm_prefs_file_set() for more information
-
- @since 1.8 */
- return: bool;
- }
- values {
- const(char)* file; /*@ The @b .epb (binary) file to get contents from */
- const(char)* page; /*@ The page, inside @a file, where to get item contents from */
- }
- }
autosave {
set {
/*@
implements {
class.constructor;
Eo.Base.constructor;
+ Efl.File.file.set;
+ Efl.File.file.get;
Evas.Object_Smart.del;
Evas.Object_Smart.add;
Elm_Widget.focus_next;
EAPI Eina_Bool elm_prefs_page_widget_common_add(Evas_Object *prefs,
Evas_Object *obj);
+/**
+ *
+ * Set file and page to populate a given prefs widget's interface.
+ *
+ * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
+ *
+ * Elm prefs widgets start blank, with no child widgets. It's meant to
+ * have its viewport populated with child elements coming from a
+ * declaration file. That file (usually with @b .epb extension), is a
+ * binary format (Eet) one, coming from a human-readable textual
+ * declaration. This textual form (usually with @b .epc extension) is
+ * translated to the binary form by means of the @b prefs_cc compiler.
+ *
+ * With this function, one thus populates a prefs widget with UI
+ * elements.
+ *
+ * If @a file is @c NULL, "elm_app_data_dir_get()/preferences.epb"
+ * will be used, by default. If @a file is a @b relative path, the
+ * prefix "elm_app_data_dir_get()/" will be implicitly used with it.
+ * If @a page is @c NULL, it is considered "main", as default.
+ *
+ * @warning If your binary is not properly installed and
+ * elm_app_data_dir_get() can't be figured out, a fallback value of
+ * "." will be tryed, instead.
+ *
+ * @see elm_prefs_file_get()
+ *
+ * @since 1.8
+ *
+ * @param[in] file The @b .epb (binary) file to get contents from
+ * @param[in] page The page, inside @a file, where to get item contents from
+ */
+EAPI Eina_Bool elm_prefs_file_set(Eo *obj, const char *file, const char *page);
+
+/**
+ *
+ * Retrieve file and page bound to a given prefs widget.
+ *
+ * @return @c EINA_TRUE, on success, @c EINA_FALSE otherwise
+ *
+ * @note Use @c NULL pointers on the components you're not
+ * interested in: they'll be ignored by the function.
+ *
+ * @see elm_prefs_file_set() for more information
+ *
+ * @since 1.8
+ *
+ * @param[out] file The @b .epb (binary) file to get contents from
+ * @param[out] page The page, inside @a file, where to get item contents from
+ */
+EAPI Eina_Bool elm_prefs_file_get(const Eo *obj, const char **file, const char **page);
+
#include "elm_prefs.eo.legacy.h"
/**
* @}