diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-03-27 04:42:15 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-03-27 04:42:15 +0800 |
commit | 5aab042fae43cb8cffe3c69c982f664643869031 (patch) | |
tree | aaff618b25a52f1ada083eb8d115da474d795924 /e-util/e-bit-array.h | |
parent | 4b93e802d917ddc918af720c756df9de4b831d6d (diff) | |
download | gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar.gz gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar.bz2 gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar.lz gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar.xz gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.tar.zst gsoc2013-evolution-5aab042fae43cb8cffe3c69c982f664643869031.zip |
Added util/e-bit-array.lo.
2001-03-26 Christopher James Lahey <clahey@ximian.com>
* gal/Makefile.am (libgal_la_LIBADD): Added util/e-bit-array.lo.
* gal/util/Makefile.am: Added e-bit-array.c and e-bit-array.h.
* gal/util/e-bit-array.c, gal/util/e-bit-array.h: New class
containing the implementation of the bit array used in
e-selection-model-array.
* gal/widgets/e-selection-model-array.c,
e-selection-model-array.h: Refactored the bit array implementation
into a separate class.
* gal/widgets/e-selection-model-simple.c: Changed how it clears
the bit array of the ESelectionModelArray parent class.
* gal/widgets/e-selection-model.h: Added code to make the
declaration of EForeachFunc only get included once.
svn path=/trunk/; revision=8955
Diffstat (limited to 'e-util/e-bit-array.h')
-rw-r--r-- | e-util/e-bit-array.h | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/e-util/e-bit-array.h b/e-util/e-bit-array.h new file mode 100644 index 0000000000..5cb33b22b7 --- /dev/null +++ b/e-util/e-bit-array.h @@ -0,0 +1,80 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +#ifndef _E_BIT_ARRAY_H_ +#define _E_BIT_ARRAY_H_ + +#include <gtk/gtkobject.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define E_BIT_ARRAY_TYPE (e_bit_array_get_type ()) +#define E_BIT_ARRAY(o) (GTK_CHECK_CAST ((o), E_BIT_ARRAY_TYPE, EBitArray)) +#define E_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BIT_ARRAY_TYPE, EBitArrayClass)) +#define E_IS_BIT_ARRAY(o) (GTK_CHECK_TYPE ((o), E_BIT_ARRAY_TYPE)) +#define E_IS_BIT_ARRAY_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BIT_ARRAY_TYPE)) + +#ifndef _E_FOREACH_FUNC_H_ +#define _E_FOREACH_FUNC_H_ +typedef void (*EForeachFunc) (int model_row, + gpointer closure); +#endif + +typedef struct { + GtkObject base; + + gint bit_count; + guint32 *data; +} EBitArray; + +typedef struct { + GtkObjectClass parent_class; +} EBitArrayClass; + + +GtkType e_bit_array_get_type (void); +EBitArray *e_bit_array_new (int count); + +gboolean e_bit_array_value_at (EBitArray *selection, + gint n); +void e_bit_array_foreach (EBitArray *selection, + EForeachFunc callback, + gpointer closure); +void e_bit_array_clear (EBitArray *selection); +gint e_bit_array_selected_count (EBitArray *selection); +void e_bit_array_select_all (EBitArray *selection); +void e_bit_array_invert_selection (EBitArray *selection); +int e_bit_array_bit_count (EBitArray *selection); +void e_bit_array_change_one_row (EBitArray *selection, + int row, + gboolean grow); +void e_bit_array_change_range (EBitArray *selection, + int start, + int end, + gboolean grow); +void e_bit_array_select_single_row (EBitArray *eba, + int row); +void e_bit_array_toggle_single_row (EBitArray *eba, + int row); + +/* Protected Functions */ +void e_bit_array_insert (EBitArray *esm, + int row, + int count); +void e_bit_array_delete (EBitArray *esm, + int row, + int count); +void e_bit_array_delete_single_mode (EBitArray *esm, + int row, + int count); +void e_bit_array_move_row (EBitArray *esm, + int old_row, + int new_row); +gint e_bit_array_bit_count (EBitArray *esm); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif /* _E_BIT_ARRAY_H_ */ |