aboutsummaryrefslogtreecommitdiffstats
path: root/AUTHORS
Commit message (Expand)AuthorAgeFilesLines
* Vanity, thy name is trow.Jon Trowbridge2001-06-091-0/+1
* i18n fixes, added missing includes.Gediminas Paulauskas2001-04-111-0/+1
* Brag.Kjartan Maraas2001-04-051-0/+1
* In a burst of egomania, added myself.Jon Trowbridge2001-03-281-0/+1
* color coded app icons and some new icons. also a new splash (probably to be r...Jakub Steiner2001-03-211-0/+1
* Ximianize. Also update the README a bit and mention the OAF stable branch.Dan Winship2001-01-131-26/+26
* Update - hopefully I assigned blame correctly :-)JP Rosevear2000-11-281-0/+8
* Updated.Ettore Perazzoli2000-07-111-24/+57
* Listed myself as the author of the shell.Ettore Perazzoli2000-05-091-0/+1
* Added myself as a co-author of Evolution.Ettore Perazzoli2000-01-201-4/+7
* More work on the code. Added more for the framework.Arturo Espinosa2000-01-191-5/+24
* stat was not testing the good file. Fixed.bertrand1999-08-061-0/+9
* Do not use GStrings any more. Added assertion code. Cosmetic reformatingbertrand1999-07-151-1/+1
* Initial revisionBertrand Guiheneuf1999-04-181-0/+1
a id='n170' href='#n170'>170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
 *
 *  Authors: Michel Zucchi <notzed@ximian.com>
 *
 *  Copyright 2003 Ximian, Inc. (www.ximian.com)
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
 *
 */

#ifndef __E_CONFIG_H__
#define __E_CONFIG_H__

#include <glib-object.h>
#include "libedataserver/e-msgport.h"

#ifdef __cplusplus
extern "C" {
#pragma }
#endif /* __cplusplus */

struct _GtkWindow;
struct _GtkWidget;

/* This is a config window management/merging class. */

typedef struct _EConfig EConfig;
typedef struct _EConfigClass EConfigClass;

typedef struct _EConfigItem EConfigItem;
typedef struct _EConfigFactory EConfigFactory;
typedef struct _EConfigTarget EConfigTarget;

typedef void (*EConfigFactoryFunc)(EConfig *ec, void *data);

typedef gboolean (*EConfigCheckFunc)(EConfig *ec, const char *pageid, void *data);

typedef void (*EConfigItemsFunc)(EConfig *ec, GSList *items, void *data);

typedef struct _GtkWidget * (*EConfigItemFactoryFunc)(EConfig *ec, EConfigItem *, struct _GtkWidget *parent, struct _GtkWidget *old, void *data);

/* ok so this is all a bit bogussy
   we need to map to glade stuff instead */

/* Add types?
   if no factory, setup appropriate container ?
   if factory, then assume that returns the right sort of object?
   what about pages ?
*/

/**
 * enum _e_config_target_changed_t - Target changed mode.
 * 
 * @E_CONFIG_TARGET_CHANGED_STATE: A state of the target has changed.
 * @E_CONFIG_TARGET_CHANGED_REBUILD: A state of the target has
 * changed, and the UI must be reconfigured as a result.
 * 
 * How the target has changed.  If @E_CONFIG_TARGET_CHANGED_REBUILD then a
 * widget reconfigure is necessary, otherwise it is used to check if
 * the widget is complete yet.
 **/
typedef
enum _e_config_target_change_t {
    E_CONFIG_TARGET_CHANGED_STATE,
    E_CONFIG_TARGET_CHANGED_REBUILD,
} e_config_target_change_t;

/**
 * enum _e_config_t - configuration item type.
 * 
 * @E_CONFIG_BOOK: A notebook item.  Only one of this or
 * @E_CONFIG_DRUID may be included in the item list for the entire
 * configuration description.
 * @E_CONFIG_DRUID: A druid item.  Only one of this or @E_CONFIG_BOOK
 * may be included in the item list for the entire configutation
 * description.
 * @E_CONFIG_PAGE: A configuration page.  The item @label will be
 * either the notebook tab label or the druid page title if no factory
 * is supplied.
 * @E_CONFIG_PAGE_START: A druid start page.  Only one of these may be
 * supplied for a druid and it should be the first page in the druid.
 * @E_CONFIG_PAGE_FINISH: A druid finish page.  Only one of these may
 * be supplied for a druid and it should be the last page of the druid.
 * @E_CONFIG_SECTION: A section in the configuration page.  A page for
 * this section must have already been defined.  The item @label if
 * supplied will be setup as a borderless hig-compliant frame title.
 * The content of the section will be a GtkVBox.  If a factory is used
 * then it is up to the factory method to create the section and add
 * it to the parent page, and return a GtkVBox for following sections.
 * @E_CONFIG_SECTION_TABLE: A table section.  The same as an
 * @E_CONFIG_SECTION but the content object is a GtkTable instead.
 * @E_CONFIG_ITEM: A configuration item.  It must have a parent
 * section defined in the configuration system.
 * @E_CONFIG_ITEM_TABLE: A configuration item with a parent
 * @E_CONFIG_SECTION_TABLE.
 * 
 * A configuration item type for each configuration item added to the
 * EConfig object.  These are merged from all contributors to the
 * configuration window, and then processed to form the combined
 * display.
 **/
enum _e_config_t {
    /* use one and only one of these for any given config-window id */
    E_CONFIG_BOOK,
    E_CONFIG_DRUID,

    E_CONFIG_PAGE,
    E_CONFIG_PAGE_START,    /* only allowed in druid types */
    E_CONFIG_PAGE_FINISH,   /* only allowed in druid types */
    E_CONFIG_SECTION,
    E_CONFIG_SECTION_TABLE,
    E_CONFIG_ITEM,
    E_CONFIG_ITEM_TABLE,    /* only allowed in table sections */
};

/**
 * struct _EConfigItem - A configuration item.
 * 
 * @type: The configuration item type.
 * @path: An absolute path positioning this item in the configuration
 * window.  This will be used as a sort key for an ASCII sort to
 * position the item in the layout tree.
 * @label: A label or section title string which is used if no factory
 * is supplied to title the page or section.
 * @factory: If supplied, this will be invoked instead to create the
 * appropriate item.
 * @user_data: User data for the factory.
 *
 * The basic descriptor of a configuration item.  This may be
 * subclassed to store extra context information for each item.
 **/
struct _EConfigItem {
    enum _e_config_t type;
    char *path;     /* absolute path, must sort ascii-lexographically into the right spot */
    char *label;
    EConfigItemFactoryFunc factory;
    void *user_data;
};

/**
 * struct _EConfigTarget - configuration context.
 * 
 * @config: The parent object.
 * @widget: A target-specific parent widget.
 * @type: The type of target, defined by implementing classes.
 * 
 * The base target object is used as the parent and placeholder for
 * configuration context for a given configuration window.  It is
 * subclassed by implementing classes to provide domain-specific
 * context.
 **/
struct _EConfigTarget {
    struct _EConfig *config;
    struct _GtkWidget *widget;  /* used if you need a parent toplevel, if available */

    guint32 type;

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

/**
 * struct _EConfig - A configuration management object.
 * 
 * @object: Superclass.
 * @priv: Private data.
 * @type: Either @E_CONFIG_BOOK or @E_CONFIG_DRIUD, describing the
 * root window type.
 * @id: The globally unique identifider for this configuration window,
 * used for hooking into it.
 * @target: The current target.
 * @widget: The GtkNoteBook or GnomeDruid created after
 * :create_widget() is called that represents the merged and combined
 * configuration window.
 * @window: If :create_window() is called, then the containing
 * toplevel GtkDialog or GtkWindow appropriate for the @type of
 * configuration window created.
 * 
 **/
struct _EConfig {
    GObject object;

    struct _EConfigPrivate *priv;

    int type;       /* E_CONFIG_BOOK or E_CONFIG_DRUID */

    char *id;

    EConfigTarget *target;

    struct _GtkWidget *widget; /* the generated internal */
    struct _GtkWidget *window; /* the window widget, GtkWindow or GtkDialog */
};

/**
 * struct _EConfigClass - Configuration management abstract class.
 * 
 * @object_class: Superclass.
 * @factories: A list of factories registered on this type of
 * configuration manager.
 * @set_target: A virtual method used to set the target on the
 * configuration manager.  This is used by subclasses so they may hook
 * into changes on the target to propery drive the manager.
 * @target_free: A virtual method used to free the target in an
 * implementation-defined way.
 * 
 **/
struct _EConfigClass {
    GObjectClass object_class;

    EDList factories;

    void (*set_target)(EConfig *ep, EConfigTarget *t);

    void (*target_free)(EConfig *ep, EConfigTarget *t);
};

GType e_config_get_type(void);

/* Static class methods */
EConfigFactory *e_config_class_add_factory(EConfigClass *klass, const char *id, EConfigFactoryFunc func, void *data);
void e_config_class_remove_factory(EConfigClass *klass, EConfigFactory *f);

EConfig *e_config_construct(EConfig *, int type, const char *id);

void e_config_add_items(EConfig *, GSList *items, EConfigItemsFunc commitfunc, EConfigItemsFunc abortfunc, EConfigItemsFunc freefunc, void *data);
void e_config_add_page_check(EConfig *, const char *pageid, EConfigCheckFunc, void *data);

void e_config_set_target(EConfig *emp, EConfigTarget *target);
struct _GtkWidget *e_config_create_widget(EConfig *);
struct _GtkWidget *e_config_create_window(EConfig *emp, struct _GtkWindow *parent, const char *title);

void e_config_target_changed(EConfig *emp, e_config_target_change_t how);

gboolean e_config_page_check(EConfig *, const char *);

struct _GtkWidget *e_config_page_get(EConfig *ec, const char *pageid);
const char *e_config_page_next(EConfig *ec, const char *pageid);
const char *e_config_page_prev(EConfig *ec, const char *pageid);

void e_config_abort(EConfig *);
void e_config_commit(EConfig *);

void *e_config_target_new(EConfig *, int type, size_t size);
void e_config_target_free(EConfig *, void *);

/* ********************************************************************** */

/* config plugin target, they are closely integrated */

/* To implement a basic config plugin, you just need to subclass
   this and initialise the class target type tables */

#include "e-util/e-plugin.h"

typedef struct _EConfigHookGroup EConfigHookGroup;
typedef struct _EConfigHook EConfigHook;
typedef struct _EConfigHookClass EConfigHookClass;

typedef struct _EPluginHookTargetMap EConfigHookTargetMap;
typedef struct _EPluginHookTargetKey EConfigHookTargetMask;

typedef struct _EConfigHookItemFactoryData EConfigHookItemFactoryData;
typedef struct _EConfigHookPageCheckData EConfigHookPageCheckData;

typedef void (*EConfigHookFunc)(struct _EPlugin *plugin, EConfigTarget *target);
typedef void (*EConfigHookItemFactoryFunc)(struct _EPlugin *plugin, EConfigHookItemFactoryData *data);

/**
 * struct _EConfigHookItemFactoryData - Factory marshalling structure.
 * 
 * @config: The parent EConfig.  This is also available in
 * @target->config but is here as a convenience. (TODO: do we need this).
 * @item: The corresponding configuration item.
 * @target: The current configuration target.  This is also available
 * on @config->target.
 * @parent: The parent widget for this item.  Depends on the item
 * type.
 * @old: The last widget created by this factory.  The factory is only
 * re-invoked if a reconfigure request is invoked on the EConfig.
 *
 * Used to marshal the callback data for the EConfigItemFactory method
 * to a single pointer for the EPlugin system.
 **/
struct _EConfigHookItemFactoryData {
    EConfig *config;
    EConfigItem *item;
    EConfigTarget *target;
    struct _GtkWidget *parent;
    struct _GtkWidget *old;
};

/**
 * struct _EConfigHookPageCheckData - Check callback data.
 * 
 * @config: 
 * @target: The current configuration target.  This is also available
 * on @config->target.
 * @pageid: Name of page to validate, or "" means check all configuration.
 * 
 **/
struct _EConfigHookPageCheckData {
    EConfig *config;
    EConfigTarget *target;
    const char *pageid;
};

/**
 * struct _EConfigHookGroup - A group of configuration items.
 * 
 * @hook: Parent object.
 * @id: The configuration window to which these items apply.
 * @target_type: The target type expected by the items.  This is
 * defined by implementing classes.
 * @items: A list of EConfigHookItem's for this group.
 * @check: A validate page handler.
 * @commit: The name of the commit function for this group of items, or NULL
 * for instant-apply configuration windows.  Its format is plugin-type defined.
 * @abort: Similar to the @commit function but for aborting or
 * cancelling a configuration edit.
 *
 * Each plugin that hooks into a given configuration page will define
 * all of the items for that page in a single group.
 **/
struct _EConfigHookGroup {
    struct _EConfigHook *hook; /* parent pointer */
    char *id;       /* target menu id for these config items */
    int target_type;    /* target type of this group */
    GSList *items;      /* items to add to group */
    char *check;        /* validate handler, if set */
    char *commit;       /* commit handler, if set */
    char *abort;        /* abort handler, if set */
};

/**
 * struct _EConfigHook - Plugin hook for configuration windows.
 * 
 * @hook: Superclass.
 * @groups: A list of EConfigHookGroup's of all configuration windows
 * this plugin hooks into.
 * 
 **/
struct _EConfigHook {
    EPluginHook hook;

    GSList *groups;
};

/**
 * struct _EConfigHookClass - Abstract class for configuration window
 * plugin hooks.
 * 
 * @hook_class: Superclass.
 * @target_map: A table of EConfigHookTargetMap structures describing
 * the possible target types supported by this class.
 * @config_class: The EConfig derived class that this hook
 * implementation drives.
 *
 * This is an abstract class defining the plugin hook point for
 * configuration windows.
 * 
 **/
struct _EConfigHookClass {
    EPluginHookClass hook_class;

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

GType e_config_hook_get_type(void);

/* for implementors */
void e_config_hook_class_add_target_map(EConfigHookClass *klass, const EConfigHookTargetMap *);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* __E_CONFIG_H__ */
pan class='deletions'>-188/+840 * - Update to 1.3.8miwi2007-05-022-5/+4 * - Update to 1.0.3miwi2007-05-024-10/+8 * - Update to 2.2.2miwi2007-05-022-5/+4 * - Update to 1.1.3miwi2007-04-303-6/+5 * Add nimbus, GNOME theme from Sun Microsystemsahze2007-04-295-0/+2905 * BROKEN on 7.0: Incorrect objformat handlingkris2007-04-222-1/+11 * BROKEN: Incorrect objformat handlingkris2007-04-221-1/+7 * BROKEN on amd64: Does not compilekris2007-04-221-0/+4 * BROKEN: Changes ownership on installed filekris2007-04-221-0/+2 * - Update to 0.52miwi2007-04-212-4/+4 * update xfce to 4.4.1oliver2007-04-124-11/+8 * Update to 2.10.1bland2007-04-113-4/+21 * Update to 2.18.1.marcus2007-04-113-11/+4 * 2007-04-10 x11-themes/kde-icons-wasp: Unfetchablemiwi2007-04-119-94/+0 * Now appears to buildkris2007-03-301-4/+0 * Point to project's sourceforge location for distfiletmclaugh2007-03-302-6/+8 * - Fix after objformat removalpav2007-03-2811-0/+15 * Add an explicit dependency on gtk20 to get GTK2_VERSION definedarved2007-03-271-0/+1 * Fix RUN_DEPENDS line after changes in qtpixmap portarved2007-03-271-1/+1 * Portlint:mezz2007-03-271-1/+2 * - Fix after objformat removalpav2007-03-242-6/+3 * Don't create lib/locale directoryarved2007-03-231-1/+1 * - Update for objformat removalahze2007-03-221-0/+1 * define USE_XFCE to get MASTER_SITE_SUBDIR definedoliver2007-03-211-1/+1 * The x11-wm/fluxbox-devel has been merged into x11-wm/fluxbox and removemezz2007-03-202-3/+3 * Presenting GNOME 2.18 for FreeBSD. GNOME 2.18 is a departure from recent GNOMEmarcus2007-03-196-42/+93 * Update to 0.8.0arved2007-03-193-6/+923 * Fix the plist, bump the PORTREVISION.mezz2007-03-182-0/+6 * Look for xscreensaver executables in the correct prefix.lofi2007-03-152-8/+10 * Reset illusia@inbox.lv due to maintainer-timeouts and no response to email.linimon2007-03-141-8/+2 * Switch to using new files Mk/bsd.ocaml.mk [1] and Mk/bsd.xfce.mk [2].linimon2007-03-142-6/+2 * Update to KDE 3.5.6 / KOffice 1.6.2lofi2007-03-144-8/+8 * - Update to 1.0.4stas2007-03-143-11/+13 * - Update to 1.1stas2007-03-143-11/+12 * - Update to 1.1stas2007-03-143-12/+13 * - Update to 1.1stas2007-03-143-11/+13 * - Fix mirrors and www.stas2007-03-142-4/+5 * - Update to 1.1stas2007-03-123-12/+13 * - Update to 1.1stas2007-03-123-12/+12 * - Add x11-themes/e17-splash-clean, a nice e17 startup splash screen.stas2007-03-124-0/+44 * - Add x11-themes/e17-theme-night_blink, a nice theme for e17 window manager.stas2007-03-114-0/+44 * - Add x11-themes/e17-theme-dali, a nice theme for e17 window manager.stas2007-03-114-0/+45 * - Connect resurrected themes to the build.stas2007-03-111-0/+4 * - Update to 0.6 (resurrect).stas2007-03-113-0/+42 * - Update to 1.0.3 (resurrect).stas2007-03-113-0/+43 * - Update to 0.9.6 (resurrect).stas2007-03-113-0/+43 * - Update to 0.0.4 (resurrect).stas2007-03-113-0/+43 * - Update to 0.0.4.3.stas2007-03-112-8/+7 * - Update to 0.99.037.3.stas2007-03-112-8/+7 * - Update to 0.3.9.stas2007-03-112-7/+7 * - Update to 0.6.5.6.stas2007-03-112-8/+8 * Update to 5.0.11jylefort2007-03-0917-92/+310 * - Update to 0.5miwi2007-03-083-14/+33 * - Update to 0.51miwi2007-03-072-4/+4 * - Update to 0.8.2rafan2007-03-053-5/+5 * Fix build after objformat removal on -current.nobutaka2007-03-051-0/+1 * - Add extra logic to Makefile.icons to handle period directorieslioux2007-03-011-0/+2 * - Remove BROKEN since port is indeed fetchablelioux2007-03-012-8/+0 * BROKEN: Size mismatchkris2007-02-271-0/+2 * Reset karma@ez.pereslavl.ru due to maintainer timeouts and no responselinimon2007-02-271-1/+1 * - fix typosmiwi2007-02-271-1/+1 * Fix crash if no splash is setahze2007-02-232-1/+12 * - Change master site to make it fetchable. The following three sitesrafan2007-02-2217-17/+17 * - Update to 0.3rafan2007-02-222-5/+5 * - Remove QTDIR from CONFIGURE_ENV, it's in there already thanks to frameworkpav2007-02-131-1/+1 * Fix runtimeahze2007-02-122-2/+2 * Schedule these broken ports for removal on 2007-04-10 if they are stillkris2007-02-117-0/+14 * Reset unreachable maintainer address:kris2007-02-111-1/+1 * - No longer need to use X11BASE or partly install to it (because of GTK locat...miwi2007-02-096-42/+46 * Update to 0.3.flz2007-02-086-14/+8 * Add icons-tango-extras 0.1.0, a complementary set of icons from the Tangoflz2007-02-075-0/+100 * Add Vanilla-DMZ-AA 0.2, the new set of cursors by Jakub "Jimmac" Steiner.flz2007-02-075-0/+128 * Add Vanilla-DMZ 0.2, the new set of cursors by Jakub "Jimmac" Steiner.flz2007-02-075-0/+130 * fix objformat problem more properlyoliver2007-02-061-1/+3 * Fix the build.danfe2007-02-051-2/+2 * fix build (by using libtool:15) with recent CURRENTs where objformat went awayoliver2007-02-041-0/+1 * - Remove support for xfree86-3pav2007-02-031-4/+0 * - Fix after objformat removalpav2007-02-021-0/+1 * - add category gnustepdinoex2007-02-011-1/+1 * - add category gnustepdinoex2007-02-014-4/+4