From 847ac65b7efd6e3d55aaa0e6adc3891b24d0f7c6 Mon Sep 17 00:00:00 2001 From: Michael Bouchaud Date: Thu, 20 Mar 2014 00:44:20 +0000 Subject: [PATCH] entrance: final step to split configuration panel code, add call to init and shutdown generic interface. Add files to autotools --- src/bin/Makefile.am | 4 ++++ src/bin/entrance_client.c | 4 ++++ src/bin/entrance_client.h | 4 +++- src/bin/entrance_conf.h | 21 +++++++++++++++++++++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am index 195d93a..1124e5a 100644 --- a/src/bin/Makefile.am +++ b/src/bin/Makefile.am @@ -18,6 +18,10 @@ entrance_client.h \ entrance_client.c \ entrance_conf.h \ entrance_conf.c \ +entrance_conf_main.h \ +entrance_conf_main.c \ +entrance_conf_user.h \ +entrance_conf_user.c \ entrance_connect.h \ entrance_connect.c \ entrance_fill.h \ diff --git a/src/bin/entrance_client.c b/src/bin/entrance_client.c index a757364..ea3fdb3 100644 --- a/src/bin/entrance_client.c +++ b/src/bin/entrance_client.c @@ -62,11 +62,15 @@ main(int argc, char **argv) entrance_login_init(); PT("gui init\n"); if (!entrance_gui_init(theme)) return EXIT_FAILURE; + PT("conf init\n"); + entrance_conf_init(); PT("connect init\n"); entrance_connect_init(); elm_run(); PT("connect shutdown\n"); entrance_connect_shutdown(); + PT("conf shutdown\n"); + entrance_conf_init(); PT("gui shutdown\n"); entrance_gui_shutdown(); PT("login shutdown\n"); diff --git a/src/bin/entrance_client.h b/src/bin/entrance_client.h index 1dbb10a..ed2113a 100644 --- a/src/bin/entrance_client.h +++ b/src/bin/entrance_client.h @@ -11,11 +11,13 @@ #include "../event/entrance_event.h" #include "entrance_gui.h" +#include "entrance_fill.h" #include "entrance_conf.h" +#include "entrance_conf_main.h" +#include "entrance_conf_user.h" #include "entrance_connect.h" #include "entrance_client.h" #include "entrance_gui.h" -#include "entrance_fill.h" #include "entrance_login.h" #define PT(f, x...) \ diff --git a/src/bin/entrance_conf.h b/src/bin/entrance_conf.h index 802b800..8082bea 100644 --- a/src/bin/entrance_conf.h +++ b/src/bin/entrance_conf.h @@ -1,6 +1,27 @@ #ifndef ENTRANCE_CONFIG_H #define ENTRANCE_CONFIG_H +typedef struct Entrance_Conf_Background_ +{ + const char *path; + const char *group; + const char *name; +} Entrance_Conf_Background; + +typedef void (*Entrance_Conf_Begin) (void); +typedef void (*Entrance_Conf_End) (void); +typedef Evas_Object *(*Entrance_Conf_Build) (Evas_Object *obj); +typedef Eina_Bool (*Entrance_Conf_Check) (void); +typedef void (*Entrance_Conf_Apply) (void); + +void entrance_conf_init(void); +void entrance_conf_shutdown(void); +void entrance_conf_module_register(const char *label, Entrance_Conf_Begin begin, Entrance_Conf_End end, Entrance_Conf_Build build, Entrance_Conf_Check check, Entrance_Conf_Apply apply); void entrance_conf_begin(Evas_Object *obj, Evas_Object *parent); +void entrance_conf_changed(void); +Eina_List *entrance_conf_backgrounds_get(Evas_Object *obj, const char *user); +Entrance_Fill *entrance_conf_background_fill_get(void); + + #endif /* ENTRANCE_CONFIG_H */