projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use strict and all warnings. Simplify parsing. Add "@c End:" line to
[pspp]
/
lib
/
gtksheet
/
gsheetmodel.h
diff --git
a/lib/gtksheet/gsheetmodel.h
b/lib/gtksheet/gsheetmodel.h
index 50746462b93db8a8efd647b92a9cb691e98933f4..6d60e032f9fb741b97d389b1ae1f50781b5ff298 100644
(file)
--- a/
lib/gtksheet/gsheetmodel.h
+++ b/
lib/gtksheet/gsheetmodel.h
@@
-15,11
+15,12
@@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+
#ifndef __G_SHEET_MODEL_H__
#define __G_SHEET_MODEL_H__
#ifndef __G_SHEET_MODEL_H__
#define __G_SHEET_MODEL_H__
-/* This file provides an abstract interface or the data displayed by the
+/* This file provides an abstract interface or the data displayed by the
GtkSheet widget */
#include <glib-object.h>
GtkSheet widget */
#include <glib-object.h>
@@
-36,11
+37,11
@@
G_BEGIN_DECLS
typedef enum
{
typedef enum
{
- GTK_SHEET_LEFT_BORDER = 1 << 0,
- GTK_SHEET_RIGHT_BORDER = 1 << 1,
- GTK_SHEET_TOP_BORDER = 1 << 2,
- GTK_SHEET_BOTTOM_BORDER = 1 << 3
-} GtkSheetBorderType ;
+ GTK_SHEET_LEFT_BORDER = 1 << 0,
+ GTK_SHEET_RIGHT_BORDER = 1 << 1,
+ GTK_SHEET_TOP_BORDER = 1 << 2,
+ GTK_SHEET_BOTTOM_BORDER = 1 << 3
+} GtkSheetBorderType ;
typedef struct _GSheetModel GSheetModel; /* Dummy typedef */
typedef struct _GSheetModel GSheetModel; /* Dummy typedef */
@@
-50,8
+51,8
@@
typedef struct _GtkSheetCellBorder GtkSheetCellBorder;
struct _GtkSheetRange
{
struct _GtkSheetRange
{
- g
int
row0,col0; /* upper-left cell */
- g
int
rowi,coli; /* lower-right cell */
+ g
long
row0,col0; /* upper-left cell */
+ g
long
rowi,coli; /* lower-right cell */
};
struct _GtkSheetCellBorder
};
struct _GtkSheetCellBorder
@@
-70,46
+71,61
@@
struct _GSheetModelIface
{
GTypeInterface g_iface;
{
GTypeInterface g_iface;
+ gboolean free_strings;
+
/* Signals */
void (* range_changed) (GSheetModel *sheet_model,
/* Signals */
void (* range_changed) (GSheetModel *sheet_model,
- g
int row0, gint col0,
- g
int rowi, gint
coli);
+ g
long row0, glong col0,
+ g
long rowi, glong
coli);
void (* rows_inserted) (GSheetModel *sheet_model,
void (* rows_inserted) (GSheetModel *sheet_model,
- g
int row, gint
n_rows);
+ g
long row, glong
n_rows);
void (* rows_deleted) (GSheetModel *sheet_model,
void (* rows_deleted) (GSheetModel *sheet_model,
- gint row, gint n_rows);
+ glong row, glong n_rows);
+
+ void (* columns_inserted) (GSheetModel *sheet_model,
+ glong column, glong n_columns);
+
+ void (* columns_deleted) (GSheetModel *sheet_model,
+ glong column, glong n_columns);
+
/* Virtual Table */
/* Virtual Table */
- const gchar * (* get_string) (const GSheetModel *sheet_model,
- gint row, gint column);
- gboolean (* set_string) (GSheetModel *sheet_model,
- const gchar *s, gint row, gint column);
+ gchar * (* get_string) (const GSheetModel *sheet_model,
+ glong row, glong column);
+
+ gboolean (* set_string) (GSheetModel *sheet_model,
+ const gchar *s, glong row, glong column);
- gboolean (* clear_datum) (GSheetModel *sheet_model,
- g
int row, gint
column);
+ gboolean (* clear_datum) (GSheetModel *sheet_model,
+ g
long row, glong
column);
- gboolean (* is_visible) (const GSheetModel *sheet_model, g
int row, gint
column);
- gboolean (* is_editable) (const GSheetModel *sheet_model, g
int row, gint
column);
+ gboolean (* is_visible) (const GSheetModel *sheet_model, g
long row, glong
column);
+ gboolean (* is_editable) (const GSheetModel *sheet_model, g
long row, glong
column);
- const GdkColor * (* get_foreground) (const GSheetModel *sheet_model,
- g
int row, gint
column);
+ const GdkColor * (* get_foreground) (const GSheetModel *sheet_model,
+ g
long row, glong
column);
- const GdkColor * (* get_background) (const GSheetModel *sheet_model,
- g
int row, gint
column);
+ const GdkColor * (* get_background) (const GSheetModel *sheet_model,
+ g
long row, glong
column);
- const GtkJustification * (* get_justification) (const GSheetModel *sheet_model,
- g
int row, gint
column);
+ const GtkJustification * (* get_justification) (const GSheetModel *sheet_model,
+ g
long row, glong
column);
- const PangoFontDescription * (* get_font_desc) (const GSheetModel *sheet_model,
- g
int row, gint
column);
+ const PangoFontDescription * (* get_font_desc) (const GSheetModel *sheet_model,
+ g
long row, glong
column);
- const GtkSheetCellBorder * (* get_cell_border) (const GSheetModel *sheet_model,
- gint row, gint column);
+ const GtkSheetCellBorder * (* get_cell_border) (const GSheetModel *sheet_model,
+ glong row, glong column);
+
+
+ glong (*get_column_count) (const GSheetModel *model);
+
+ glong (*get_row_count) (const GSheetModel *model);
};
};
@@
-118,53
+134,63
@@
struct _GSheetModelIface
GType g_sheet_model_get_type (void) G_GNUC_CONST;
GType g_sheet_model_get_type (void) G_GNUC_CONST;
-inline
const gchar * g_sheet_model_get_string (const GSheetModel *sheet_model,
- g
int row, gint
column);
+inline
gchar * g_sheet_model_get_string (const GSheetModel *sheet_model,
+ g
long row, glong
column);
-inline gboolean g_sheet_model_set_string (GSheetModel *sheet_model,
- const gchar *s,
- g
int row, gint
column);
+inline gboolean g_sheet_model_set_string (GSheetModel *sheet_model,
+ const gchar *s,
+ g
long row, glong
column);
-inline gboolean g_sheet_model_datum_clear (GSheetModel *sheet_model,
- g
int row, gint
column);
+inline gboolean g_sheet_model_datum_clear (GSheetModel *sheet_model,
+ g
long row, glong
column);
inline void g_sheet_model_range_changed (GSheetModel *sheet_model,
inline void g_sheet_model_range_changed (GSheetModel *sheet_model,
- g
int row0, gint
col0,
- g
int rowi, gint
coli);
+ g
long row0, glong
col0,
+ g
long rowi, glong
coli);
inline void g_sheet_model_rows_deleted (GSheetModel *sheet_model,
inline void g_sheet_model_rows_deleted (GSheetModel *sheet_model,
- g
int row, gint
n_rows);
+ g
long row, glong
n_rows);
inline void g_sheet_model_rows_inserted (GSheetModel *sheet_model,
inline void g_sheet_model_rows_inserted (GSheetModel *sheet_model,
- gint row, gint n_rows);
+ glong row, glong n_rows);
+
+inline void g_sheet_model_columns_inserted (GSheetModel *sheet_model,
+ glong column, glong n_columns);
+
+inline void g_sheet_model_columns_deleted (GSheetModel *sheet_model,
+ glong column, glong n_columns);
+
-inline gboolean g_sheet_model_is_editable (const GSheetModel *model,
- g
int row, gint
column);
+inline gboolean g_sheet_model_is_editable (const GSheetModel *model,
+ g
long row, glong
column);
-inline gboolean g_sheet_model_is_visible
- (const GSheetModel *model, g
int row, gint
column);
+inline gboolean g_sheet_model_is_visible
+ (const GSheetModel *model, g
long row, glong
column);
-inline const GdkColor *g_sheet_model_get_foreground
- (const GSheetModel *model, g
int row, gint
column);
+inline const GdkColor *g_sheet_model_get_foreground
+ (const GSheetModel *model, g
long row, glong
column);
-inline const GdkColor *g_sheet_model_get_background
- (const GSheetModel *model, g
int row, gint
column);
+inline const GdkColor *g_sheet_model_get_background
+ (const GSheetModel *model, g
long row, glong
column);
-inline const GtkJustification *g_sheet_model_get_justification
- (const GSheetModel *model, g
int row, gint
column);
+inline const GtkJustification *g_sheet_model_get_justification
+ (const GSheetModel *model, g
long row, glong
column);
inline const PangoFontDescription *g_sheet_model_get_font_desc
inline const PangoFontDescription *g_sheet_model_get_font_desc
- (const GSheetModel *model, g
int row, gint
column);
+ (const GSheetModel *model, g
long row, glong
column);
-inline const GtkSheetCellBorder * g_sheet_model_get_cell_border
- (const GSheetModel *model, g
int row, gint
column);
+inline const GtkSheetCellBorder * g_sheet_model_get_cell_border
+ (const GSheetModel *model, g
long row, glong
column);
+inline gboolean g_sheet_model_free_strings (const GSheetModel *sheet_model);
+inline glong g_sheet_model_get_column_count (const GSheetModel *sheet_model);
+inline gint g_sheet_model_get_row_count (const GSheetModel *sheet_model);
G_END_DECLS
G_END_DECLS