## EConfigHook EConfigHook |

## Functions

void | (*EConfigFactoryFunc) ()
gboolean | (*EConfigCheckFunc) ()
void | (*EConfigItemsFunc) ()
GtkWidget | (*EConfigItemFactoryFunc) ()
EConfigFactory * | e_config_class_add_factory ()
EConfig * | e_config_construct ()
void | e_config_add_items ()
void | e_config_add_page_check ()
void | e_config_set_target ()
GtkWidget * | e_config_create_widget ()
void | e_config_target_changed ()
gboolean | e_config_page_check ()
void | e_config_abort ()
void | e_config_commit ()
gpointer | e_config_target_new ()
void | e_config_target_free ()
void | (*EConfigHookFunc) ()
void | (*EConfigHookItemFactoryFunc) ()
void | e_config_hook_class_add_target_map ()

## Types and Values

enum | e_config_target_change_t
enum | e_config_t
struct | EConfigItem
struct | EConfigTarget
typedef | EConfigHookTargetMap
typedef | EConfigHookTargetMask
struct | EConfigHookItemFactoryData
struct | EConfigHookPageCheckData
struct | EConfigHookGroup
struct | EConfigHookClass
| EConfigFactory

## Description

## Functions

### EConfigFactoryFunc ()

    void
    (*EConfigFactoryFunc) (EConfig *config,
                           gpointer data);

`EConfigFactoryFunc` is deprecated and should not be used in newly-written code.

### EConfigCheckFunc ()

    gboolean
    (*EConfigCheckFunc) (EConfig *config,
                         const gchar *pageid,
                         gpointer data);

`EConfigCheckFunc` is deprecated and should not be used in newly-written code.

### EConfigItemsFunc ()

    void
    (*EConfigItemsFunc) (EConfig *config,
                         GSList *items,
                         gpointer data);

`EConfigItemsFunc` is deprecated and should not be used in newly-written code.

### EConfigItemFactoryFunc ()

    GtkWidget
    (*EConfigItemFactoryFunc) (EConfig *config,
                               EConfigItem *item,
                               GtkWidget *parent,
                               GtkWidget *old,
                               gint position,
                               gpointer data);

`EConfigItemFactoryFunc` is deprecated and should not be used in newly-written code.

### e_config_class_add_factory ()

    EConfigFactory *
    e_config_class_add_factory (EConfigClass *klass,
                                const gchar *id,
                                EConfigFactoryFunc func,
                                gpointer user_data);

`e_config_class_add_factory` is deprecated and should not be used in newly-written code.

Add a config factory which will be called to `add_items()` any extra items's if wants to, to the current Config window.

TODO: Make the id a pattern?

#### Parameters

klass | Implementing class pointer. |
id | The name of the configuration window you're interested in. This may be NULL to be called for all windows. |
func | An EConfigFactoryFunc to call when the window `id` is being created. |
user_data | Callback data. |

#### Returns

A handle to the factory.

### e_config_construct ()

    EConfig *
    e_config_construct (EConfig *config,
                        const gchar *id);

`e_config_construct` is deprecated and should not be used in newly-written code.

Used by implementing classes to initialise base parameters.

#### Parameters

config | The instance to initialise. |
id | The name of the configuration window this manager drives. |

#### Returns

`config` is returned.

### e_config_add_items ()

    void
    e_config_add_items (EConfig *config,
                        GSList *items,
                        EConfigItemsFunc freefunc,
                        gpointer data);

`e_config_add_items` is deprecated and should not be used in newly-written code.

Add new EConfigItems to the configuration window. Nothing will be done with them until the widget is built.

TODO: perhaps commit and abort should just be signals.

#### Parameters

config | An initialised implementing instance of EConfig. |
items | A list of EConfigItem's to add to the configuration manager. |
freefunc | If supplied, called to free the item list (and/or items) once they are no longer needed. |
data | Data for the callback methods. |

### e_config_add_page_check ()

    void
    e_config_add_page_check (EConfig *config,
                             const gchar *pageid,
                             EConfigCheckFunc func,
                             gpointer data);

`e_config_add_page_check` is deprecated and should not be used in newly-written code.

Add a page-checking function callback. It will be called to validate the data in the given page or pages. If `pageid` is NULL then it will be called to validate every page, or the whole configuration window.

In the latter case, the pageid in the callback will be either the specific page being checked, or NULL when the whole config window is being checked.

The page check function is used to validate input before allowing the assistant to continue or the notebook to close.

#### Parameters

config | Initialised implemeting instance of EConfig. |
pageid | pageid to check. |
func | checking callback. |
data | user-data for the callback. |

### e_config_set_target ()

    void
    e_config_set_target (EConfig *config,
                         EConfigTarget *target);

`e_config_set_target` is deprecated and should not be used in newly-written code.

Sets the target object for the config window. Generally the target is set only once, and will supply its own "changed" signal which can be used to drive the modal. This is a virtual method so that the implementing class can connect to the changed signal and initiate a `e_config_target_changed()` call where appropriate.

#### Parameters

config | An initialised EConfig. |
target | A target allocated from `config` . |

### e_config_create_widget ()

    GtkWidget *
    e_config_create_widget (EConfig *config);

`e_config_create_widget` is deprecated and should not be used in newly-written code.

Create the GtkNotebook described by `config` .

This object will be self-driving, but will not close itself once complete.

Unless reffed otherwise, the management object `config` will be finalized when the widget is.

#### Parameters

config | An initialised EConfig object. |

#### Returns

The widget, also available in `config.widget`

### e_config_target_changed ()

    void
    e_config_target_changed (EConfig *config,
                             e_config_target_change_t how);

`e_config_target_changed` is deprecated and should not be used in newly-written code.

Indicate that the target has changed. This may be called by the self-aware target itself, or by the driving code. If `how` is `E_CONFIG_TARGET_CHANGED_REBUILD`, then the entire configuration widget may be recreated based on the changed target.

This is used to sensitise Assistant next/back buttons and the Apply button for the Notebook mode.

#### Parameters

config | an EConfig |
how | an enum value indicating how the target has changed |

### e_config_page_check ()

    gboolean
    e_config_page_check (EConfig *config,
                         const gchar *pageid);

`e_config_page_check` is deprecated and should not be used in newly-written code.

Check that a given page is complete. If `pageid` is NULL, then check the whole config. No check is made that the page actually exists.

#### Parameters

config | an EConfig |
pageid | the path of the page item |

#### Returns

FALSE if the data is inconsistent/incomplete.

### e_config_abort ()

    void
    e_config_abort (EConfig *config);

`e_config_abort` is deprecated and should not be used in newly-written code.

Signify that the stateful configuration changes must be discarded to all listeners. This is used by self-driven assistant or notebook, or may be used by code using the widget directly.

#### Parameters

config | an EConfig |

### e_config_commit ()

    void
    e_config_commit (EConfig *config);

`e_config_commit` is deprecated and should not be used in newly-written code.

Signify that the stateful configuration changes should be saved. This is used by the self-driven assistant or notebook, or may be used by code driving the widget directly.

#### Parameters

config | an EConfig |

### e_config_target_new ()

    gpointer
    e_config_target_new (EConfig *config,
                         gint type,
                         gsize size);

`e_config_target_new` is deprecated and should not be used in newly-written code.

Allocate a new config target suitable for this class. Implementing classes will define the actual content of the target.

#### Parameters

config | an EConfig |
type | type, up to implementor |
size | size of object to allocate |

### e_config_target_free ()

    void
    e_config_target_free (EConfig *config,
                          gpointer target);

`e_config_target_free` is deprecated and should not be used in newly-written code.

Free a target. The implementing class can override this method to free custom targets.

#### Parameters

config | an EConfig |
target | the target to free |

### EConfigHookFunc ()

    void
    (*EConfigHookFunc) (EPlugin *plugin,
                        EConfigTarget *target);

`EConfigHookFunc` is deprecated and should not be used in newly-written code.

### EConfigHookItemFactoryFunc ()

    void
    (*EConfigHookItemFactoryFunc) (EPlugin *plugin,
                                   EConfigHookItemFactoryData *data);

`EConfigHookItemFactoryFunc` is deprecated and should not be used in newly-written code.

### e_config_hook_class_add_target_map ()

    void
    e_config_hook_class_add_target_map (EConfigHookClass *hook_class,
                                        const EConfigHookTargetMap *map);

`e_config_hook_class_add_target_map` is deprecated and should not be used in newly-written code.

`hook_class` : The dervied EConfigHook class. `map` : A map used to describe a single EConfigTarget type for this class.

Add a targe tmap to a concrete derived class of EConfig. The target map enumates the target types available for the implenting class.

## Types and Values

### enum e_config_target_change_t

`e_config_target_change_t` is deprecated and should not be used in newly-written code.

#### Members

E_CONFIG_TARGET_CHANGED_STATE |  |
E_CONFIG_TARGET_CHANGED_REBUILD |  |

### enum e_config_t

`e_config_t` is deprecated and should not be used in newly-written code.

#### Members

E_CONFIG_INVALID |  |
E_CONFIG_BOOK |  |
E_CONFIG_PAGE |  |
E_CONFIG_SECTION |  |
E_CONFIG_SECTION_TABLE |  |
E_CONFIG_ITEM |  |
E_CONFIG_ITEM_TABLE |  |

### struct EConfigItem

    struct EConfigItem {
    	enum _e_config_t type;
    	gchar *path;		/* absolute path, must sort
    				 * ascii-lexographically into the right spot */
    	gchar *label;
    	EConfigItemFactoryFunc factory;
    	gpointer user_data;
    };

`EConfigItem` is deprecated and should not be used in newly-written code.

### struct EConfigTarget

    struct EConfigTarget {
    	struct _EConfig *config;
    	GtkWidget *widget; /* used if you need a parent toplevel, if available */

    	guint32 type;

    	/* implementation fields follow, depends on window type */
    };

`EConfigTarget` is deprecated and should not be used in newly-written code.

### EConfigHookTargetMap

    typedef struct _EPluginHookTargetMap EConfigHookTargetMap;

`EConfigHookTargetMap` is deprecated and should not be used in newly-written code.

### EConfigHookTargetMask

    typedef struct _EPluginHookTargetKey EConfigHookTargetMask;

`EConfigHookTargetMask` is deprecated and should not be used in newly-written code.

### struct EConfigHookItemFactoryData

    struct EConfigHookItemFactoryData {
    	EConfig *config;
    	EConfigItem *item;
    	EConfigTarget *target;
    	GtkWidget *parent;
    	GtkWidget *old;
    	gint position;
    };

`EConfigHookItemFactoryData` is deprecated and should not be used in newly-written code.

### struct EConfigHookPageCheckData

    struct EConfigHookPageCheckData {
    	EConfig *config;
    	EConfigTarget *target;
    	const gchar *pageid;
    };

`EConfigHookPageCheckData` is deprecated and should not be used in newly-written code.

### struct EConfigHookGroup

    struct EConfigHookGroup {
    	struct _EConfigHook *hook; /* parent pointer */
    	gchar *id;		/* target menu id for these config items */
    	gint target_type; /* target type of this group */
    	GSList *items;		/* items to add to group */
    	gchar *check;		/* validate handler, if set */
    	gchar *commit;		/* commit handler, if set */
    	gchar *abort;		/* abort handler, if set */
    };

`EConfigHookGroup` is deprecated and should not be used in newly-written code.

### struct EConfigHookClass

    struct EConfigHookClass {
    	EPluginHookClass hook_class;

    	/* EConfigHookTargetMap by .type */
    	GHashTable *target_map;
    	/* the config class these configs's belong to */
    	EConfigClass *config_class;
    };

`EConfigHookClass` is deprecated and should not be used in newly-written code.

This is an abstract class defining the plugin hook point for configuration windows.

#### Members

EPluginHookClass `hook_class`; | Superclass. |
GHashTable *`target_map`; | A table of EConfigHookTargetMap structures describing the possible target types supported by this class. |
EConfigClass *`config_class`; | The EConfig derived class that this hook implementation drives. |

### EConfigFactory

    typedef struct _EConfigFactory EConfigFactory;

`EConfigFactory` is deprecated and should not be used in newly-written code.