2001-03-19 Christopher James Lahey <clahey@ximian.com> * configure.in: Upped the version number to 0.5.99.4. * Merged branch: 2001-03-18 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h: Added another semi-private function (e_selection_model_change_cursor.) 2001-03-18 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h: Added a couple of semi-private functions (e_selection_model_change_one_row and e_selection_model_confirm_row_count.) 2001-03-18 Christopher James Lahey <clahey@ximian.com> * tests/test-tree-1.c, tests/test-tree-3.c: Added arguments for e_tree_memory_callbacks_new of get_save_id and has_save_id to NULL. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * gal/util/e-util.c (e_sort): Switched to just using qsort directly here. 2001-03-17 Christopher James Lahey <clahey@ximian.com> * gal/util/e-util.c, gal/util/e-util.h (e_bsearch, e_sort): Added e_sort and e_bsearch. They both take a closure. e_sort guarantees a stable sort. e_bsearch returns the range of matching elements including the position where an object would be if there are no matching elements. 2001-03-16 Christopher James Lahey <clahey@ximian.com> * gal/Makefile.am (libgal_la_LIBADD): Added e-tree-sorted.lo. 2001-03-14 Christopher James Lahey <clahey@ximian.com> * gal/widgets/e-selection-model-simple.c, gal/widgets/e-selection-model-simple.h: Replaced the methods insert_row and delete_row with insert_rows and delete_rows. * gal/widgets/e-selection-model.c, gal/widgets/e-selection-model.h: Replaced the methods insert_row and delete_row with insert_rows and delete_rows. 2001-03-08 Christopher James Lahey <clahey@ximian.com> * Makefile.am: Added e-table/e-table-utils.lo, e-table/e-tree-memory-callbacks.lo, e-table/e-tree-memory.lo, e-table/e-tree-scrolled.lo, e-table/e-tree-table-adapter.lo, and e-table/e-tree.lo. Removed e-table/e-tree-simple.lo. * gal/util/e-util.c, gal/util/e-util.h: Added a whole bunch of e_marshal functions for ETree. * tests/test-tree-1.c, tests/test-tree-3.c: Reworked these to use the new tree stuff. End of branch svn path=/trunk/; revision=8840
200 lines
8.2 KiB
C
200 lines
8.2 KiB
C
#ifndef _E_UTIL_H_
|
|
#define _E_UTIL_H_
|
|
|
|
#include <glib.h>
|
|
#include <gtk/gtktypeutils.h>
|
|
#include <sys/types.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#pragma }
|
|
#endif /* __cplusplus */
|
|
|
|
#define E_MAKE_TYPE(l,str,t,ci,i,parent) \
|
|
GtkType l##_get_type(void)\
|
|
{\
|
|
static GtkType type = 0;\
|
|
if (!type){\
|
|
GtkTypeInfo info = {\
|
|
str,\
|
|
sizeof (t),\
|
|
sizeof (t##Class),\
|
|
(GtkClassInitFunc) ci,\
|
|
(GtkObjectInitFunc) i,\
|
|
NULL, /* reserved 1 */\
|
|
NULL, /* reserved 2 */\
|
|
(GtkClassInitFunc) NULL\
|
|
};\
|
|
type = gtk_type_unique (parent, &info);\
|
|
}\
|
|
return type;\
|
|
}
|
|
|
|
|
|
#define E_MAKE_X_TYPE(l,str,t,ci,i,parent,poa_init,offset) \
|
|
GtkType l##_get_type(void)\
|
|
{\
|
|
static GtkType type = 0;\
|
|
if (!type){\
|
|
GtkTypeInfo info = {\
|
|
str,\
|
|
sizeof (t),\
|
|
sizeof (t##Class),\
|
|
(GtkClassInitFunc) ci,\
|
|
(GtkObjectInitFunc) i,\
|
|
NULL, /* reserved 1 */\
|
|
NULL, /* reserved 2 */\
|
|
(GtkClassInitFunc) NULL\
|
|
};\
|
|
type = bonobo_x_type_unique (\
|
|
parent, poa_init, NULL,\
|
|
offset, &info);\
|
|
}\
|
|
return type;\
|
|
}
|
|
|
|
typedef enum {
|
|
E_FOCUS_NONE,
|
|
E_FOCUS_CURRENT,
|
|
E_FOCUS_START,
|
|
E_FOCUS_END
|
|
} EFocus;
|
|
int g_str_compare (const void *x,
|
|
const void *y);
|
|
int g_int_compare (const void *x,
|
|
const void *y);
|
|
char *e_strdup_strip (const char *string);
|
|
void e_free_object_list (GList *list);
|
|
void e_free_string_list (GList *list);
|
|
char *e_read_file (const char *filename);
|
|
int e_write_file (const char *filename,
|
|
const char *data,
|
|
int flags);
|
|
int e_mkdir_hier (const char *path,
|
|
mode_t mode);
|
|
|
|
gchar **e_strsplit (const gchar *string,
|
|
const gchar *delimiter,
|
|
gint max_tokens);
|
|
gchar *e_strstrcase (const gchar *haystack,
|
|
const gchar *needle);
|
|
void e_filename_make_safe (gchar *string);
|
|
gchar *e_format_number (gint number);
|
|
gboolean e_create_directory (gchar *directory);
|
|
|
|
|
|
typedef int (*ESortCompareFunc) (const void *first,
|
|
const void *second,
|
|
gpointer closure);
|
|
|
|
void e_sort (void *base,
|
|
size_t nmemb,
|
|
size_t size,
|
|
ESortCompareFunc compare,
|
|
gpointer closure);
|
|
void e_bsearch (const void *key,
|
|
const void *base,
|
|
size_t nmemb,
|
|
size_t size,
|
|
ESortCompareFunc compare,
|
|
gpointer closure,
|
|
size_t *start,
|
|
size_t *end);
|
|
|
|
|
|
|
|
void e_marshal_INT__INT_INT_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_INT__INT_POINTER_INT_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_NONE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT
|
|
void e_marshal_NONE__INT_INT_POINTER_POINTER_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT
|
|
void e_marshal_NONE__INT_POINTER_INT_POINTER_POINTER_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_INT_POINTER_UINT e_marshal_NONE__INT_INT_POINTER_INT
|
|
void e_marshal_NONE__INT_INT_POINTER_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_POINTER_INT_POINTER_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT
|
|
void e_marshal_NONE__INT_POINTER_INT_POINTER_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_BOOL__INT_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT
|
|
void e_marshal_BOOL__INT_INT_POINTER_INT_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_UINT e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT
|
|
void e_marshal_BOOL__INT_POINTER_INT_POINTER_INT_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT
|
|
void e_marshal_NONE__INT_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#define e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_UINT_UINT e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT
|
|
void e_marshal_NONE__INT_POINTER_INT_POINTER_INT_INT_POINTER_INT_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_NONE__POINTER_POINTER_INT (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_NONE__INT_POINTER_INT_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_INT__POINTER_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_INT__POINTER_POINTER_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
void e_marshal_INT__POINTER_POINTER_POINTER_POINTER (GtkObject *object,
|
|
GtkSignalFunc func,
|
|
gpointer func_data,
|
|
GtkArg *args);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* _E_UTIL_H_ */
|