summaryrefslogtreecommitdiff
path: root/src/bin/e_config_dialog.h
blob: 7e1e5b4bf50fbae2c898256abb7c42eacb3709ee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifdef E_TYPEDEFS

typedef enum _E_Config_Dialog_CFData_Type
{
   E_CONFIG_DIALOG_CFDATA_TYPE_BASIC,
   E_CONFIG_DIALOG_CFDATA_TYPE_ADVANCED,
   E_CONFIG_DIALOG_CFDATA_TYPE_NORMAL_WINDOW
} E_Config_Dialog_CFData_Type;

typedef struct _E_Config_Dialog      E_Config_Dialog;
typedef struct _E_Config_Dialog_View E_Config_Dialog_View;
typedef struct _E_Config_Dialog_Data E_Config_Dialog_Data;

#else
#ifndef E_CONFIG_DIALOG_H
#define E_CONFIG_DIALOG_H

#define E_CONFIG_DIALOG_TYPE 0xE0b01017

struct _E_Config_Dialog_View
{
   unsigned char override_auto_apply : 1;
   unsigned char basic_only : 1;
   unsigned char normal_win : 1;
   unsigned char scroll : 1;

   void           *(*create_cfdata)     (E_Config_Dialog *cfd);
   void            (*free_cfdata)       (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
   int             (*close_cfdata)      (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
   struct {
      int          (*apply_cfdata)      (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
      Evas_Object *(*create_widgets)    (E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
      int          (*check_changed)     (E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
   } basic, advanced;
};

struct _E_Config_Dialog
{
   E_Object                     e_obj_inherit;

   E_Config_Dialog_CFData_Type  view_type;
   E_Config_Dialog_View        *view;
   E_Config_Dialog_Data        *cfdata;
   E_Container                 *con;
   const char                  *title;
   const char                  *icon;
   const char                  *name;
   const char                  *class;
   int                          icon_size;
   E_Dialog                    *dia;
   void                        *data;
   Ecore_Timer                 *auto_apply_timer;
   unsigned char                hide_buttons : 1;
   unsigned char                cfg_changed : 1;
   unsigned char                cfg_changed_auto : 1;
};

EAPI E_Config_Dialog *e_config_dialog_new(E_Container *con, const char *title, const char *name, const char *class, const char *icon, int icon_size, E_Config_Dialog_View *view, void *data);
EAPI int e_config_dialog_find(const char *name, const char *class);
EAPI E_Config_Dialog *e_config_dialog_get(const char *name, const char *class);

EAPI void e_config_dialog_changed_auto_set(E_Config_Dialog *cfd, unsigned char value);
EAPI void e_config_dialog_changed_set(E_Config_Dialog *cfd, unsigned char value);

#endif
#endif