aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table-model.h
blob: dc18d972b52ed76426b9152ba9a9a27841ca8c38 (plain) (blame)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
#ifndef _E_TABLE_MODEL_H_
#define _E_TABLE_MODEL_H_

#include <gtk/gtkobject.h>

#define E_TABLE_MODEL_TYPE        (e_table_model_get_type ())
#define E_TABLE_MODEL(o)          (GTK_CHECK_CAST ((o), E_TABLE_MODEL_TYPE, ETableModel))
#define E_TABLE_MODEL_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), E_TABLE_MODEL_TYPE, ETableModelClass))
#define E_IS_TABLE_MODEL(o)       (GTK_CHECK_TYPE ((o), E_TABLE_MODEL_TYPE))
#define E_IS_TABLE_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TABLE_MODEL_TYPE))

typedef struct {
    GtkObject   base;
} ETableModel;

typedef struct {
    GtkObjectClass parent_class;

    /*
     * Virtual methods
     */
    int         (*column_count)     (ETableModel *etm);
    int         (*row_count)        (ETableModel *etm);
    void       *(*value_at)         (ETableModel *etm, int col, int row);
    void        (*set_value_at)     (ETableModel *etm, int col, int row, const void *value);
    gboolean    (*is_cell_editable) (ETableModel *etm, int col, int row);
    gint        (*append_row)       (ETableModel *etm);

    /* Allocate a copy of the given value. */
    void       *(*duplicate_value)  (ETableModel *etm, int col, const void *value);
    /* Free an allocated value. */
    void        (*free_value)       (ETableModel *etm, int col, void *value);
    /* Return an allocated empty value. */
    void       *(*initialize_value) (ETableModel *etm, int col);
    /* Return TRUE if value is equivalent to an empty cell. */
    gboolean    (*value_is_empty)   (ETableModel *etm, int col, const void *value);
    /* Return an allocated string. */
    char       *(*value_to_string)  (ETableModel *etm, int col, const void *value);
    
    /*
     * Signals
     */

    /*
     * These all come after the change has been made.
     * Major structural changes: model_changed
     * Changes only in a row: row_changed
     * Only changes in a cell: cell_changed
     * A row inserted: row_inserted
     * A row deleted: row_deleted
     */
    void        (*model_changed)      (ETableModel *etm);
    void        (*model_row_changed)  (ETableModel *etm, int row);
    void        (*model_cell_changed) (ETableModel *etm, int col, int row);
    void        (*model_row_inserted) (ETableModel *etm, int row);
    void        (*model_row_deleted)  (ETableModel *etm, int row);
} ETableModelClass;

GtkType     e_table_model_get_type (void);
    
int         e_table_model_column_count     (ETableModel *e_table_model);
const char *e_table_model_column_name      (ETableModel *e_table_model, int col);
int         e_table_model_row_count        (ETableModel *e_table_model);
void       *e_table_model_value_at         (ETableModel *e_table_model, int col, int row);
void        e_table_model_set_value_at     (ETableModel *e_table_model, int col, int row, const void *value);
gboolean    e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row);
gint        e_table_model_append_row       (ETableModel *e_table_model);

void       *e_table_model_duplicate_value  (ETableModel *e_table_model, int col, const void *value);
void        e_table_model_free_value       (ETableModel *e_table_model, int col, void *value);
void       *e_table_model_initialize_value (ETableModel *e_table_model, int col);
gboolean    e_table_model_value_is_empty   (ETableModel *e_table_model, int col, const void *value);
char       *e_table_model_value_to_string  (ETableModel *e_table_model, int col, const void *value);

/*
 * Routines for emitting signals on the e_table
 */
void        e_table_model_changed          (ETableModel *e_table_model);
void        e_table_model_row_changed      (ETableModel *e_table_model, int row);
void        e_table_model_cell_changed     (ETableModel *e_table_model, int col, int row);
void        e_table_model_row_inserted     (ETableModel *e_table_model, int row);
void        e_table_model_row_deleted      (ETableModel *e_table_model, int row);

#endif /* _E_TABLE_MODEL_H_ */
l to -1, itChristopher James Lahey2001-02-151-0/+6 * Add the --no-tty flag.Jeffrey Stedfast2001-02-152-0/+5 * Changed this code to match the glibc iconv signature.Christopher James Lahey2001-02-153-5/+11 * Ignore generated .oaf filesDan Winship2001-02-1510-2/+18 * Rewrite explanatory comments to use normal regexps rather than procmailDan Winship2001-02-152-52/+68 * New marshallersDan Winship2001-02-152-8/+88 * Undefine E_STRING_PROP and E_LIST_PROP here.Christopher James Lahey2001-02-1510-32/+105 * (create_folder): Oops, and fix bug involving namespacesDan Winship2001-02-152-5/+5 * Connect to the "create_folder" signal on the storage.Dan Winship2001-02-152-0/+60 * New method to create a folder when you don't know its full name.Dan Winship2001-02-154-9/+95 * add asyncCreateFolder and asyncRemoveFolder interfaces. (UseDan Winship2001-02-158-41/+346 * Remove the fancy handleURI stuffIain Holmes2001-02-152-7/+5 * Setup the Trash folder.Jeffrey Stedfast2001-02-155-43/+261 * Removed this unused function.Christopher James Lahey2001-02-154-10/+15 * this logo is more visible than the hazy "Ximian" text in the old splash.Tuomas Kuosmanen2001-02-151-0/+0 * Fix crashes, remove gnome.h includes, add a timer check for the RDF summary, ...Iain Holmes2001-02-1515-50/+284 * Updated Slovak translationStano Visnovsky2001-02-142-81/+280 * Added summary of services, with summary service summaries.Aaron Weber2001-02-146-230/+348 * Added libmenus.la.Christopher James Lahey2001-02-147-9/+82 * call task_editor_focusJP Rosevear2001-02-142-1/+6 * Set toolbar new appointment icon (set_pixmap): load files rather thanJP Rosevear2001-02-149-43/+60 * Missing change log entryJP Rosevear2001-02-141-2/+0 * This new function updates the minimum width of all of the columns based onChristopher James Lahey2001-02-144-1/+41 * implementedRodrigo Moya2001-02-142-38/+78 * Missing change log bitJP Rosevear2001-02-141-0/+2 * override value to string virtual method (calendar_model_value_to_string):JP Rosevear2001-02-143-6/+53 * Use the camel-internet-address code to format the address rather thanJeffrey Stedfast2001-02-142-6/+11 * Set policy of scrolled window to be automatic/automatic.Christopher James Lahey2001-02-143-6/+5 * Fix the crash when ETableItems are destroyed.Christopher James Lahey2001-02-141-1/+4 * Fix some uninitialized variables.Christopher James Lahey2001-02-142-4/+10 * Updated Slovenian translationAndraz Tori2001-02-131-1292/+1400 * cal_backend_db_update_object(): manage both updates and additions/addRodrigo Moya2001-02-132-194/+496 * Updated French translation.Christophe Merlet2001-02-132-1280/+1576 * Remove dead glade file that was not being distedJP Rosevear2001-02-132-1/+4 * if doing a full update, save the cursor pos and restore it afterwards.Not Zed2001-02-133-5/+64 * Add address headers to list that we dont fold when writing. The areNot Zed2001-02-134-8/+73 * Updated Norwegian translation. Added *.oaf.in files.Kjartan Maraas2001-02-133-1382/+1945 * Clean out the cruft in the Accounts section before writing the currentJeffrey Stedfast2001-02-132-0/+5 * Translations.Kjartan Maraas2001-02-132-2/+3 * Strip the leading "/" from the Namespace/Path entry if the providerJeffrey Stedfast2001-02-132-1/+38 * mbox, mh, and maildir camel-url's need absolute paths.Jeffrey Stedfast2001-02-133-3/+11 * Do it in the dead dir too. Look mum, no ChangeLog...Kjartan Maraas2001-02-132-6/+9 * xml-i18n-tools setup for .oaf.in files. Mark strings for translation.Kjartan Maraas2001-02-136-14/+27 * xml-i18n-tools setup. Mark strings for translation.Kjartan Maraas2001-02-133-4/+14 * Forgot thisKjartan Maraas2001-02-131-1/+1 * xml-i18n-tools setup. Mark strings for translation.Kjartan Maraas2001-02-132-2/+10 * xml-i18n-tools setup. Mark strings for translation.Kjartan Maraas2001-02-133-14/+23 * Hook up the xml-i18n-tools + .oaf.in stuff. Marked strings forKjartan Maraas2001-02-135-13/+25 * added DB3 transactions supportRodrigo Moya2001-02-131-29/+145 * Marked strings for translation in this newly created file. Hook up theKjartan Maraas2001-02-1310-49/+74 * added the new DB3-based backend. This is just the beginning, there areRodrigo Moya2001-02-134-0/+1058 * Removed an ancient #include <libgnorba/gnorba.h>Jason Leach2001-02-122-1/+5 * rework ldap check logic so it'll work to --disable-ldap if you'veChris Toshok2001-02-122-1/+7 * Re-add non-static forward_messages. mail-view.c needs it.Dan Winship2001-02-123-1/+7 * Updated Slovak translationStano Visnovsky2001-02-122-461/+614 * ackJeffrey Stedfast2001-02-111-0/+1 * Don't leak memory. (forward_messages): change doinline to be a gbooleanJeffrey Stedfast2001-02-114-11/+19 * Made a width other than the default possible if the children have widthsChristopher James Lahey2001-02-112-5/+27 * Fix selection so that changing a model row equal to 31 mod 32 works.Christopher James Lahey2001-02-111-1/+1 * Let e_canvas_item_show_area_delayed deal with a delayed area show insteadChristopher James Lahey2001-02-111-28/+8 * Added this function.Christopher James Lahey2001-02-112-9/+60 * removed e-contact-editor-strings.hJeffrey Stedfast2001-02-112-1/+4 * Check the full list of IDs instead of just the default id and if we findJeffrey Stedfast2001-02-112-19/+96 * Updated. We might want to change the corba interface for this to allowJeffrey Stedfast2001-02-115-5/+23 * Getting almost full and proper use of xml-i18n-tools.Gediminas Paulauskas2001-02-11103-1766/+445 * Stable->HEAd commitFatih Demir2001-02-102-2030/+4694 * Merge from the stable branch: display the `SUB_VERSION' in the aboutEttore Perazzoli2001-02-102-32/+49 * multipart/* is another mime type we DO NOT want to encode ;-)Jeffrey Stedfast2001-02-102-20/+27 * Overhaul. Now accurate and truthful and clear.Aaron Weber2001-02-1012-116/+272 * Added hacks to check for Mozilla libs like nspr and nss that we will needJeffrey Stedfast2001-02-102-0/+110 * Since gdkevent is a union, casting a smaller struct to a gdkevent causedJP Rosevear2001-02-101-7/+16 * update the error message to say Bonobo 0.36 is needed rather than 0.31Jeffrey Stedfast2001-02-101-1/+1 * Add \n to fix a compile error.Anders Carlsson2001-02-102-1/+5 * Updates for CamelStore changes, small memory leak fixes. (lookup_folder):Dan Winship2001-02-1012-566/+443 * save, THEN commitDan Winship2001-02-101-4/+6 * Rewrite a bunch. Replace the existing folder cache stuff with much simplerDan Winship2001-02-1015-449/+243 * Updated Slovenian translationAndraz Tori2001-02-101-1609/+1992 * Updated French translation.Christophe Merlet2001-02-102-2584/+3894 * Updated Slovak translationStano Visnovsky2001-02-092-1715/+2002 * Updated Spanish translation.Hector Garcia2001-02-092-1167/+1119 * The built sources shouldn't be cleaneJP Rosevear2001-02-092-9/+6 * its NEEDS-ACTION rather than NEEDSACTION (icalparameter_as_ical_string):JP Rosevear2001-02-092-4/+10 * New location for this function.Jeffrey Stedfast2001-02-094-148/+148 * depend on bonobo >= 0.36Michael Meeks2001-02-092-2/+6 * Reworked some keep-mail-on-server logic so that we ALWAYS look for aJeffrey Stedfast2001-02-093-28/+38 * only free driver, if set. (fetch_mail_fetched): Unref the driver here, soNot Zed2001-02-095-89/+239 * Oops, remove old widgetJP Rosevear2001-02-094-80/+8 * fill in new classification stuff properly (get_widgets): load new class.JP Rosevear2001-02-099-1603/+1711 * Set the sensitivity of the spin button based on the state of the checkbox.Jeffrey Stedfast2001-02-092-0/+5 * more reasonable default for the auto-check minutes spin boxJeffrey Stedfast2001-02-091-1/+1 * Properly do defaults here. (mail_config_write): Removed some of theJeffrey Stedfast2001-02-092-40/+58 * Cast the CamelMedium to a CamelMimePart before performing actions on it asJeffrey Stedfast2001-02-098-1/+139 * Ooop, change log entryJP Rosevear2001-02-091-0/+4 * Remove useless ldflagsJP Rosevear2001-02-091-2/+0 * Move the get_change code hereJP Rosevear2001-02-094-149/+191 * Upped the version number of gal required to 0.5.Christopher James Lahey2001-02-092-3/+7 * Change the folder selection dialog so that, when you click on "New"Ettore Perazzoli2001-02-096-23/+116 * Add a missing gtk_object_ref.Dan Winship2001-02-091-0/+1 * More 0.9 stuffJP Rosevear2001-02-092-0/+35 * Pull up from 0.9 branchJP Rosevear2001-02-0910-1380/+1214 * Minor Changes.Aaron Weber2001-02-0914-216/+336 * Use e_format_number.Christopher James Lahey2001-02-091-1/+1 * Set the dnd_code on the header properly.Christopher James Lahey2001-02-091-1/+6 * Commented out this function since it's not being used.Christopher James Lahey2001-02-091-0/+3 * Added a "header" argument to set the label at the top of the dialog.Christopher James Lahey2001-02-091-30/+31 * Don't handle C-Enter.Christopher James Lahey2001-02-092-8/+8 * Added this function. Made frozen an int so that recursive freezes andChristopher James Lahey2001-02-092-8/+26 * Oops, include the camel-tcp-stream-ssl header instead of the raw one.Jeffrey Stedfast2001-02-082-1/+6 * Added more test rules.Jeffrey Stedfast2001-02-082-0/+3 * Use "contains" because the subject might be broken into subparts and usingJeffrey Stedfast2001-02-082-1/+7 * Changed to allocate raw blocks for the data, and keep track of them withNot Zed2001-02-082-44/+29 * Init active_downloads hash if it hasn't been yet.Not Zed2001-02-082-0/+11 * flesh out this check. #ifdef the entire thing OPENLDAP2, as it only worksChris Toshok2001-02-082-2/+53 * Handle internal camel status return. (receive_done): Remove activeNot Zed2001-02-087-58/+186 * Changed to push the operation into a status stack.Not Zed2001-02-0812-296/+729 * Updated Swedish translation.Christian Rose2001-02-082-1949/+2332 * Check current_message for NULL - this fixes a bug running under SunOS (notJeffrey Stedfast2001-02-082-1/+7 * updateKenneth Christiansen2001-02-081-167/+158 * Added test for xml-i18n-tools if AM_PROG_XML_I18N_TOOLS is found.Kenneth Christiansen2001-02-081-0/+5 * Added N_("* Click here to add a contact *").Christopher James Lahey2001-02-082-0/+6 * Store the whole GdkColor instead of just the pixel.Christopher James Lahey2001-02-082-13/+9 * only set the DEBUG_LEVEL if we're OPENLDAP2.Chris Toshok2001-02-082-0/+7 * Quote first argument to AC_DEFUN. Likewise. Likewise. Likewise. Likewise.Pavel Roskin2001-02-087-14/+14 * Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-6/+20 * Added Akira's japanese etc. encodings to e-fontLauris Kaplinski2001-02-081-5/+10 * Macro for making comparisons easy. (camel_ustrcasecmp): UseJeffrey Stedfast2001-02-082-52/+48 * Fix the title and icon bug, and sort the UIDs into order beforeIain Holmes2001-02-082-1/+144 * s/contact manager/address book/ and revised text.Aaron Weber2001-02-0810-94/+138 * Updated tr.po from Goerkem CetinFatih Demir2001-02-082-4335/+2204 * Update to latest requirementsJP Rosevear2001-02-072-4/+10 * return TRUE if equal, FALSE otherwise. (business_compare): same.Chris Toshok2001-02-072-40/+95 * Oops, save the seen_timeout variable.Jeffrey Stedfast2001-02-072-0/+11 * Added a comment.Christopher James Lahey2001-02-071-0/+1 * Added -DEVOLUTION_DATADIR=\""$(datadir)"\".Christopher James Lahey2001-02-073-2/+12 * Create the local directory when saving if it doesn't exist already.Christopher James Lahey2001-02-071-1/+2 * Added e_format_number and e_create_directory.Christopher James Lahey2001-02-07