stricter type allocations.
inline void
-g_sheet_column_set_width (GSheetColumn *column, gint col, gint size)
+g_sheet_column_set_width (GSheetColumn *column, glong col, gint size)
{
g_return_if_fail (G_IS_SHEET_COLUMN (column));
inline gint
-g_sheet_column_get_width (const GSheetColumn *column, gint col)
+g_sheet_column_get_width (const GSheetColumn *column, glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), -1);
inline gboolean
g_sheet_column_get_visibility(const GSheetColumn *column,
- gint col)
+ glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE);
inline gboolean
g_sheet_column_get_sensitivity(const GSheetColumn *column,
- gint col)
+ glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE);
inline GtkSheetButton *
g_sheet_column_get_button(const GSheetColumn *column,
- gint col)
+ glong col)
{
GtkSheetButton *button = gtk_sheet_button_new();
inline GtkJustification
g_sheet_column_get_justification(const GSheetColumn *column,
- gint col)
+ glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), FALSE);
}
inline gchar *
-g_sheet_column_get_subtitle (const GSheetColumn *column, gint col)
+g_sheet_column_get_subtitle (const GSheetColumn *column, glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), NULL);
inline gint
g_sheet_column_get_left_text_column (const GSheetColumn *column,
- gint col)
+ glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), -1);
inline gint
g_sheet_column_get_right_text_column (const GSheetColumn *column,
- gint col)
+ glong col)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (column), -1);
inline void
g_sheet_column_set_left_text_column (const GSheetColumn *column,
- gint col, gint i)
+ glong col, gint i)
{
g_return_if_fail (G_IS_SHEET_COLUMN (column));
inline void
g_sheet_column_set_right_text_column (const GSheetColumn *column,
- gint col, gint i)
+ glong col, gint i)
{
g_return_if_fail (G_IS_SHEET_COLUMN (column));
(G_SHEET_COLUMN_GET_IFACE (column)->set_right_text_column) (column, col, i);
}
-inline gint
+inline glong
g_sheet_column_get_column_count(const GSheetColumn *geo)
{
g_return_val_if_fail (G_IS_SHEET_COLUMN (geo), -1);
}
inline gint
-g_sheet_column_start_pixel(const GSheetColumn *geo, gint col)
+g_sheet_column_start_pixel(const GSheetColumn *geo, glong col)
{
gint i;
gint start_pixel = 0;
inline void
g_sheet_column_columns_changed(GSheetColumn *geo,
- gint first, gint n_columns)
+ glong first, glong n_columns)
{
g_return_if_fail (G_IS_SHEET_COLUMN (geo));
/* Signals */
void (* columns_changed) (GSheetColumn *geo,
- gint col, gint n_columns);
+ glong col, glong n_columns);
/* Virtual Table */
- gint (* get_width) (const GSheetColumn *gcolumn, gint col);
- void (* set_width) (GSheetColumn *gcolumn, gint col, gint width);
+ gint (* get_width) (const GSheetColumn *gcolumn, glong col);
+ void (* set_width) (GSheetColumn *gcolumn, glong col, gint width);
- gboolean (* get_visibility) (const GSheetColumn *gcolumn, gint col);
- gboolean (* get_sensitivity) (const GSheetColumn *gcolumn, gint col);
- const GtkSheetButton * (* get_button) (const GSheetColumn *gcolumn, gint col);
- GtkJustification (* get_justification) (const GSheetColumn *gcolumn, gint col);
+ gboolean (* get_visibility) (const GSheetColumn *gcolumn, glong col);
+ gboolean (* get_sensitivity) (const GSheetColumn *gcolumn, glong col);
+ const GtkSheetButton * (* get_button) (const GSheetColumn *gcolumn, glong col);
+ GtkJustification (* get_justification) (const GSheetColumn *gcolumn, glong col);
gint (*get_left_text_column) (const GSheetColumn *gcolumn,
- gint col);
+ glong col);
gint (*get_right_text_column) (const GSheetColumn *gcolumn,
- gint col);
+ glong col);
void (* set_left_text_column) (const GSheetColumn *gcolumn,
- gint col, gint i);
+ glong col, gint i);
void (* set_right_text_column) (const GSheetColumn *gcolumn,
- gint col, gint i);
+ glong col, gint i);
- gint (* get_column_count) (const GSheetColumn *geo);
+ glong (* get_column_count) (const GSheetColumn *geo);
- GtkStateType (*get_button_state)(const GSheetColumn *geo, gint col);
- gchar * (*get_button_label)(const GSheetColumn *geo, gint col);
- gchar * (*get_subtitle)(const GSheetColumn *geo, gint col);
+ GtkStateType (*get_button_state)(const GSheetColumn *geo, glong col);
+ gchar * (*get_button_label)(const GSheetColumn *geo, glong col);
+ gchar * (*get_subtitle)(const GSheetColumn *geo, glong col);
gboolean (*get_button_visibility)(const GSheetColumn *geo,
- gint col);
+ glong col);
const GtkSheetChild * (*get_button_child)(const GSheetColumn *geo,
- gint col);
+ glong col);
GtkJustification * (*get_button_justification)(const GSheetColumn *geo,
- gint col);
+ glong col);
};
inline gint g_sheet_column_get_width (const GSheetColumn *gcolumn,
- gint col);
+ glong col);
inline void g_sheet_column_set_width (GSheetColumn *gcolumn,
- gint col, gint size);
+ glong col, gint size);
-inline gboolean g_sheet_column_get_visibility(const GSheetColumn *gcolumn,
- gint col);
+inline gboolean g_sheet_column_get_visibility (const GSheetColumn *gcolumn,
+ glong col);
-inline gboolean g_sheet_column_get_sensitivity(const GSheetColumn *gcolumn,
- gint col);
+inline gboolean g_sheet_column_get_sensitivity (const GSheetColumn *gcolumn,
+ glong col);
-inline GtkSheetButton *g_sheet_column_get_button(const GSheetColumn *gcolumn,
- gint col);
+inline GtkSheetButton *g_sheet_column_get_button (const GSheetColumn *gcolumn,
+ glong col);
-gchar *g_sheet_column_get_subtitle (const GSheetColumn *, gint);
+gchar *g_sheet_column_get_subtitle (const GSheetColumn *, glong);
-inline GtkJustification g_sheet_column_get_justification(const GSheetColumn *gcolumn, gint col);
+inline GtkJustification g_sheet_column_get_justification (const GSheetColumn *gcolumn, glong col);
inline gint g_sheet_column_get_left_text_column (const GSheetColumn *gcolumn,
- gint col);
+ glong col);
inline gint g_sheet_column_get_right_text_column (const GSheetColumn *gcolumn,
- gint col);
+ glong col);
inline void g_sheet_column_set_left_text_column (const GSheetColumn *gcolumn,
- gint col, gint i);
+ glong col, gint i);
inline void g_sheet_column_set_right_text_column (const GSheetColumn *gcolumn,
- gint col, gint i);
+ glong col, gint i);
-inline gint g_sheet_column_get_column_count(const GSheetColumn *geo);
+inline glong g_sheet_column_get_column_count (const GSheetColumn *geo);
-inline gint g_sheet_column_start_pixel(const GSheetColumn *geo, gint col);
+inline gint g_sheet_column_start_pixel (const GSheetColumn *geo, glong col);
-inline void g_sheet_column_columns_changed(GSheetColumn *geo,
- gint first, gint n_columns);
+inline void g_sheet_column_columns_changed (GSheetColumn *geo,
+ glong first, glong n_columns);
G_END_DECLS
retval = g_object_new (G_TYPE_SHEET_HETERO_COLUMN, NULL);
- hg = G_SHEET_HETERO_COLUMN(retval);
+ hg = G_SHEET_HETERO_COLUMN (retval);
hg->n_columns = n_columns;
hg->default_width = default_width;
- hg->col = g_new0(struct GSheetHeteroColumnUnit, n_columns);
+ hg->col = g_new0 (struct GSheetHeteroColumnUnit, n_columns);
for (i = 0 ; i < hg->n_columns; ++i )
{
}
static gint
-g_sheet_hetero_column_get_width(const GSheetColumn *geom, gint i)
+g_sheet_hetero_column_get_width (const GSheetColumn *geom, glong i)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (geom);
- g_return_val_if_fail(i < hg->n_columns, -1);
+ g_return_val_if_fail (i < hg->n_columns, -1);
return hg->col[i].width;
}
-static gint
-g_sheet_hetero_column_get_sensitivity(const GSheetColumn *geom, gint u)
+static gboolean
+g_sheet_hetero_column_get_sensitivity (const GSheetColumn *geom, glong u)
{
return TRUE;
}
-static gint
-g_sheet_hetero_column_get_visibility(const GSheetColumn *geom, gint u)
+static gboolean
+g_sheet_hetero_column_get_visibility (const GSheetColumn *geom, glong u)
{
return TRUE;
}
static gchar *
-g_sheet_hetero_column_get_button_label(const GSheetColumn *geom, gint u)
+g_sheet_hetero_column_get_button_label (const GSheetColumn *geom, glong u)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (geom);
- return g_locale_to_utf8(hg->col[u].button.label, -1, 0, 0, 0);
+ return g_locale_to_utf8 (hg->col[u].button.label, -1, 0, 0, 0);
}
static GtkJustification
-g_sheet_hetero_column_get_justification(const GSheetColumn *geom, gint u)
+g_sheet_hetero_column_get_justification (const GSheetColumn *geom, glong u)
{
return GTK_JUSTIFY_FILL;
}
-static gint
-g_sheet_hetero_column_get_column_count(const GSheetColumn *geom)
+static glong
+g_sheet_hetero_column_get_column_count (const GSheetColumn *geom)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geom);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (geom);
return hg->n_columns;
}
static void
g_sheet_hetero_column_finalize (GObject *object)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(object);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (object);
- g_free(hg->col);
+ g_free (hg->col);
}
static void
-hetero_column_set_width(GSheetColumn *geo, gint i, gint size)
+hetero_column_set_width (GSheetColumn *geo, glong i, gint size)
{
- GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN(geo);
+ GSheetHeteroColumn *hg = G_SHEET_HETERO_COLUMN (geo);
- g_return_if_fail(i < hg->n_columns);
+ g_return_if_fail (i < hg->n_columns);
hg->col[i].width = size;
}
void
-g_sheet_hetero_column_set_button_label(GSheetHeteroColumn *geo,
- gint i, const gchar *label)
+g_sheet_hetero_column_set_button_label (GSheetHeteroColumn *geo,
+ glong i, const gchar *label)
{
- g_return_if_fail(i < geo->n_columns);
+ g_return_if_fail (i < geo->n_columns);
- g_free(geo->col[i].button.label);
- geo->col[i].button.label = g_malloc(strlen(label) + 1);
+ g_free (geo->col[i].button.label);
+ geo->col[i].button.label = g_malloc (strlen (label) + 1);
- g_stpcpy(geo->col[i].button.label, label);
+ g_stpcpy (geo->col[i].button.label, label);
}
inline void
-g_sheet_hetero_column_set_width(GSheetHeteroColumn *geo, gint i, gint size)
+g_sheet_hetero_column_set_width (GSheetHeteroColumn *geo, glong i, gint size)
{
- GSheetColumn *iface = G_SHEET_COLUMN(geo);
+ GSheetColumn *iface = G_SHEET_COLUMN (geo);
- hetero_column_set_width(iface, i, size);
+ hetero_column_set_width (iface, i, size);
}
typedef struct _GSheetHeteroColumnClass GSheetHeteroColumnClass;
- void g_sheet_hetero_column_set_button_label(GSheetHeteroColumn *geo,
- gint i, const gchar *label);
+ void g_sheet_hetero_column_set_button_label (GSheetHeteroColumn *geo,
+ glong i, const gchar *label);
- void g_sheet_hetero_column_set_width(GSheetHeteroColumn *geo,
- gint i, gint size);
+ void g_sheet_hetero_column_set_width (GSheetHeteroColumn *geo,
+ glong i, gint size);
#ifdef __cplusplus
}
void
g_sheet_row_set_height (GSheetRow *row_geo,
- gint row, gint size, gpointer data)
+ glong row, gint size, gpointer data)
{
g_return_if_fail (G_IS_SHEET_ROW (row_geo));
gint
g_sheet_row_get_height (const GSheetRow *row_geo,
- gint row, gpointer data)
+ glong row, gpointer data)
{
g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), -1);
gboolean
g_sheet_row_get_visibility(const GSheetRow *row_geo,
- gint row, gpointer data)
+ glong row, gpointer data)
{
g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), FALSE);
gboolean
g_sheet_row_get_sensitivity(const GSheetRow *row_geo,
- gint row, gpointer data)
+ glong row, gpointer data)
{
g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), FALSE);
GtkSheetButton *
g_sheet_row_get_button(const GSheetRow *row_geo,
- gint row, gpointer data)
+ glong row, gpointer data)
{
GtkSheetButton *button = gtk_sheet_button_new();
}
inline gchar *
-g_sheet_row_get_subtitle (const GSheetRow *row_geo, gint row)
+g_sheet_row_get_subtitle (const GSheetRow *row_geo, glong row)
{
g_return_val_if_fail (G_IS_SHEET_ROW (row_geo), NULL);
-gint
-g_sheet_row_get_row_count(const GSheetRow *geo, gpointer data)
+glong
+g_sheet_row_get_row_count (const GSheetRow *geo, gpointer data)
{
g_return_val_if_fail (G_IS_SHEET_ROW (geo), -1);
*/
gint
-g_sheet_row_start_pixel(const GSheetRow *geo, gint row, gpointer data)
+g_sheet_row_start_pixel(const GSheetRow *geo, glong row, gpointer data)
{
gint i;
gint start_pixel = 0;
}
-gint
-g_sheet_row_pixel_to_row(const GSheetRow *geo, gint pixel,
+glong
+g_sheet_row_pixel_to_row (const GSheetRow *geo, gint pixel,
gpointer data)
{
gint i, cy;
void
-g_sheet_row_rows_deleted(GSheetRow *geo,
- gint first, gint n_rows)
+g_sheet_row_rows_deleted (GSheetRow *geo,
+ glong first, glong n_rows)
{
g_return_if_fail (G_IS_SHEET_ROW (geo));
/* Signals */
void (* rows_changed) (GSheetRow *geo,
- gint row, gint n_rows);
+ glong row, glong n_rows);
/* Virtual Table */
- gint (* get_height) (const GSheetRow *grow, gint row, gpointer);
- void (* set_height) (GSheetRow *grow, gint row, gint height,
+ gint (* get_height) (const GSheetRow *grow, glong row, gpointer);
+ void (* set_height) (GSheetRow *grow, glong row, gint height,
gpointer);
- gboolean (* get_visibility) (const GSheetRow *grow, gint row,
+ gboolean (* get_visibility) (const GSheetRow *grow, glong row,
gpointer);
- gboolean (* get_sensitivity) (const GSheetRow *grow, gint row,
+ gboolean (* get_sensitivity) (const GSheetRow *grow, glong row,
gpointer);
- const GtkSheetButton * (* get_button) (const GSheetRow *grow, gint row,
+ const GtkSheetButton * (* get_button) (const GSheetRow *grow, glong row,
gpointer);
- gint (* get_row_count) (const GSheetRow *geo, gpointer);
+ glong (* get_row_count) (const GSheetRow *geo, gpointer);
- GtkStateType (*get_button_state)(const GSheetRow *geo, gint row,
+ GtkStateType (*get_button_state) (const GSheetRow *geo, glong row,
gpointer);
- gchar * (*get_button_label)(const GSheetRow *geo, gint row,
+ gchar * (*get_button_label) (const GSheetRow *geo, glong row,
gpointer);
- gchar * (*get_subtitle) (const GSheetRow *geo, gint row);
+ gchar * (*get_subtitle) (const GSheetRow *geo, glong row);
- gboolean (*get_button_visibility)(const GSheetRow *geo,
- gint row, gpointer);
+ gboolean (*get_button_visibility) (const GSheetRow *geo,
+ glong row, gpointer);
- const GtkSheetChild * (*get_button_child)(const GSheetRow *geo,
- gint row, gpointer);
+ const GtkSheetChild * (*get_button_child) (const GSheetRow *geo,
+ glong row, gpointer);
- guint (*top_ypixel)(const GSheetRow *geo, gint row, gpointer);
- gint (*pixel_to_row)(const GSheetRow *geo, guint pixel, gpointer);
+ guint (*top_ypixel) (const GSheetRow *geo, glong row, gpointer);
+ glong (*pixel_to_row) (const GSheetRow *geo, guint pixel, gpointer);
};
gint g_sheet_row_get_height (const GSheetRow *grow,
- gint row, gpointer);
+ glong row, gpointer);
void g_sheet_row_set_height (GSheetRow *grow,
- gint row, gint size, gpointer);
+ glong row, gint size, gpointer);
-gboolean g_sheet_row_get_visibility(const GSheetRow *grow,
- gint row, gpointer);
+gboolean g_sheet_row_get_visibility (const GSheetRow *grow,
+ glong row, gpointer);
-gboolean g_sheet_row_get_sensitivity(const GSheetRow *grow,
- gint row, gpointer);
+gboolean g_sheet_row_get_sensitivity (const GSheetRow *grow,
+ glong row, gpointer);
-GtkSheetButton *g_sheet_row_get_button(const GSheetRow *grow,
- gint row, gpointer);
+GtkSheetButton *g_sheet_row_get_button (const GSheetRow *grow,
+ glong row, gpointer);
-gint g_sheet_row_get_row_count(const GSheetRow *geo, gpointer);
+glong g_sheet_row_get_row_count (const GSheetRow *geo, gpointer);
/* Return the top pixel of row ROW */
-gint g_sheet_row_start_pixel(const GSheetRow *geo, gint row,
+gint g_sheet_row_start_pixel (const GSheetRow *geo, glong row,
gpointer);
/* Return the row contained by pixel PIXEL */
-gint g_sheet_row_pixel_to_row(const GSheetRow *geo, gint pixel,
+glong g_sheet_row_pixel_to_row (const GSheetRow *geo, gint pixel,
gpointer);
-void g_sheet_row_rows_deleted(GSheetRow *geo,
- gint first, gint n_rows);
+void g_sheet_row_rows_deleted (GSheetRow *geo,
+ glong first, glong n_rows);
-gchar *g_sheet_row_get_subtitle (const GSheetRow *row_geo, gint row);
+gchar *g_sheet_row_get_subtitle (const GSheetRow *row_geo, glong row);
G_END_DECLS
}
static gint
-g_sheet_uniform_column_get_width(const GSheetColumn *geom, gint u)
+g_sheet_uniform_column_get_width (const GSheetColumn *geom, glong u)
{
- GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom);
+ GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom);
return ug->width;
}
-static gint
-g_sheet_uniform_column_get_sensitivity(const GSheetColumn *geom, gint u)
+static gboolean
+g_sheet_uniform_column_get_sensitivity (const GSheetColumn *geom, glong u)
{
- GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom);
+ GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom);
return ug->is_sensitive;
}
-static gint
-g_sheet_uniform_column_get_visibility(const GSheetColumn *geom, gint u)
+static gboolean
+g_sheet_uniform_column_get_visibility (const GSheetColumn *geom, glong u)
{
- GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom);
+ GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom);
return ug->is_visible;
}
static gchar *
-g_sheet_uniform_column_get_button_label(const GSheetColumn *geom, gint u)
+g_sheet_uniform_column_get_button_label (const GSheetColumn *geom, glong u)
{
- gchar *label = g_strdup_printf("%d", u);
+ gchar *label = g_strdup_printf ("%ld", u);
return label;
}
static GtkJustification
-g_sheet_uniform_column_get_justification(const GSheetColumn *geom, gint u)
+g_sheet_uniform_column_get_justification (const GSheetColumn *geom, glong u)
{
return GTK_JUSTIFY_FILL;
}
-static gint
-g_sheet_uniform_column_get_column_count(const GSheetColumn *geom)
+static glong
+g_sheet_uniform_column_get_column_count (const GSheetColumn *geom)
{
- GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN(geom);
+ GSheetUniformColumn *ug = G_SHEET_UNIFORM_COLUMN (geom);
return ug->n_columns;
}
}
static void
-g_sheet_uniform_column_finalize (GObject *object)
+g_sheet_uniform_column_finalize (GObject *object)
{
}
}
static gint
-g_sheet_uniform_row_get_height(const GSheetRow *geom, gint u, gpointer data)
+g_sheet_uniform_row_get_height (const GSheetRow *geom, glong u, gpointer data)
{
GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geom);
}
static gboolean
-g_sheet_uniform_row_get_sensitivity(const GSheetRow *geom, gint u, gpointer data)
+g_sheet_uniform_row_get_sensitivity (const GSheetRow *geom, glong u,
+ gpointer data)
{
GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geom);
static gboolean
-g_sheet_uniform_row_get_visibility(const GSheetRow *geom, gint u, gpointer data)
+g_sheet_uniform_row_get_visibility (const GSheetRow *geom, glong u,
+ gpointer data)
{
- GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geom);
+ GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW (geom);
return ug->is_visible;
}
static gchar *
-g_sheet_uniform_row_get_button_label(const GSheetRow *geom, gint u, gpointer data)
+g_sheet_uniform_row_get_button_label(const GSheetRow *geom, glong u, gpointer data)
{
- gchar *label = g_strdup_printf("%d", u);
+ gchar *label = g_strdup_printf("%ld", u);
return label;
}
-static gint
-g_sheet_uniform_row_get_row_count(const GSheetRow *geom, gpointer data)
+static glong
+g_sheet_uniform_row_get_row_count (const GSheetRow *geom, gpointer data)
{
GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geom);
}
static void
-g_sheet_uniform_row_finalize (GObject *object)
+g_sheet_uniform_row_finalize (GObject *object)
{
}
static guint
-g_sheet_uniform_row_top_ypixel(const GSheetRow *geo, gint row, gpointer data)
+g_sheet_uniform_row_top_ypixel (const GSheetRow *geo, glong row, gpointer data)
{
GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geo);
return row * ug->height;
}
-static gint
-g_sheet_uniform_row_pixel_to_row(const GSheetRow *geo, guint pixel,
+static glong
+g_sheet_uniform_row_pixel_to_row (const GSheetRow *geo, guint pixel,
gpointer data)
{
GSheetUniformRow *ug = G_SHEET_UNIFORM_ROW(geo);
**/
inline gchar *
g_sheet_model_get_string (const GSheetModel *sheet_model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), 0);
gboolean
g_sheet_model_set_string (GSheetModel *sheet_model,
const gchar *text,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
**/
gboolean
g_sheet_model_datum_clear (GSheetModel *sheet_model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (sheet_model), FALSE);
**/
void
g_sheet_model_range_changed (GSheetModel *sheet_model,
- gint row0, gint col0,
- gint rowi, gint coli)
+ glong row0, glong col0,
+ glong rowi, glong coli)
{
g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
**/
void
g_sheet_model_rows_inserted (GSheetModel *sheet_model,
- gint row, gint n_rows)
+ glong row, glong n_rows)
{
g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
**/
void
g_sheet_model_columns_inserted (GSheetModel *sheet_model,
- gint column, gint n_columns)
+ glong column, glong n_columns)
{
g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
**/
void
g_sheet_model_rows_deleted (GSheetModel *sheet_model,
- gint row, gint n_rows)
+ glong row, glong n_rows)
{
g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
**/
void
g_sheet_model_columns_deleted (GSheetModel *sheet_model,
- gint column, gint n_columns)
+ glong column, glong n_columns)
{
g_return_if_fail (G_IS_SHEET_MODEL (sheet_model));
**/
inline gboolean
g_sheet_model_is_editable (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), TRUE);
**/
inline gboolean
g_sheet_model_is_visible (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), TRUE);
**/
inline const GdkColor *
g_sheet_model_get_foreground (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
**/
inline const GdkColor *
g_sheet_model_get_background (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
**/
inline const GtkJustification *
g_sheet_model_get_justification (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
**/
inline const PangoFontDescription *
g_sheet_model_get_font_desc(const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_font_desc)
**/
inline const GtkSheetCellBorder *
g_sheet_model_get_cell_border (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), NULL);
if ( ! G_SHEET_MODEL_GET_IFACE (model)->get_cell_border)
*
* Returns the total number of columns represented by the model
**/
-inline gint
-g_sheet_model_get_column_count(const GSheetModel *model)
+inline glong
+g_sheet_model_get_column_count (const GSheetModel *model)
{
g_return_val_if_fail (G_IS_SHEET_MODEL (model), -1);
struct _GtkSheetRange
{
- gint row0,col0; /* upper-left cell */
- gint rowi,coli; /* lower-right cell */
+ glong row0,col0; /* upper-left cell */
+ glong rowi,coli; /* lower-right cell */
};
struct _GtkSheetCellBorder
/* Signals */
void (* range_changed) (GSheetModel *sheet_model,
- gint row0, gint col0,
- gint rowi, gint coli);
+ glong row0, glong col0,
+ glong rowi, glong coli);
void (* rows_inserted) (GSheetModel *sheet_model,
- gint row, gint n_rows);
+ glong row, glong n_rows);
void (* rows_deleted) (GSheetModel *sheet_model,
- gint row, gint n_rows);
+ glong row, glong n_rows);
void (* columns_inserted) (GSheetModel *sheet_model,
- gint column, gint n_columns);
+ glong column, glong n_columns);
void (* columns_deleted) (GSheetModel *sheet_model,
- gint column, gint n_columns);
+ glong column, glong n_columns);
/* Virtual Table */
gchar * (* get_string) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
gboolean (* set_string) (GSheetModel *sheet_model,
- const gchar *s, gint row, gint column);
+ const gchar *s, glong row, glong column);
gboolean (* clear_datum) (GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
- gboolean (* is_visible) (const GSheetModel *sheet_model, gint row, gint column);
- gboolean (* is_editable) (const GSheetModel *sheet_model, gint row, gint column);
+ gboolean (* is_visible) (const GSheetModel *sheet_model, glong row, glong column);
+ gboolean (* is_editable) (const GSheetModel *sheet_model, glong row, glong column);
const GdkColor * (* get_foreground) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
const GdkColor * (* get_background) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
const GtkJustification * (* get_justification) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
const PangoFontDescription * (* get_font_desc) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
const GtkSheetCellBorder * (* get_cell_border) (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
- gint (*get_column_count) (const GSheetModel *model);
+ glong (*get_column_count) (const GSheetModel *model);
- gint (*get_row_count) (const GSheetModel *model);
+ glong (*get_row_count) (const GSheetModel *model);
};
inline gchar * g_sheet_model_get_string (const GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
inline gboolean g_sheet_model_set_string (GSheetModel *sheet_model,
const gchar *s,
- gint row, gint column);
+ glong row, glong column);
inline gboolean g_sheet_model_datum_clear (GSheetModel *sheet_model,
- gint row, gint column);
+ glong row, glong column);
inline void g_sheet_model_range_changed (GSheetModel *sheet_model,
- gint row0, gint col0,
- gint rowi, gint coli);
+ glong row0, glong col0,
+ glong rowi, glong coli);
inline void g_sheet_model_rows_deleted (GSheetModel *sheet_model,
- gint row, gint n_rows);
+ glong row, glong n_rows);
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,
- gint column, gint n_columns);
+ glong column, glong n_columns);
inline void g_sheet_model_columns_deleted (GSheetModel *sheet_model,
- gint column, gint n_columns);
+ glong column, glong n_columns);
inline gboolean g_sheet_model_is_editable (const GSheetModel *model,
- gint row, gint column);
+ glong row, glong column);
inline gboolean g_sheet_model_is_visible
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline const GdkColor *g_sheet_model_get_foreground
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline const GdkColor *g_sheet_model_get_background
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline const GtkJustification *g_sheet_model_get_justification
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline const PangoFontDescription *g_sheet_model_get_font_desc
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline const GtkSheetCellBorder * g_sheet_model_get_cell_border
- (const GSheetModel *model, gint row, gint column);
+ (const GSheetModel *model, glong row, glong column);
inline gboolean g_sheet_model_free_strings (const GSheetModel *sheet_model);
-inline gint g_sheet_model_get_column_count(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);
+inline gint g_sheet_model_get_row_count (const GSheetModel *sheet_model);
G_END_DECLS
gboolean
-psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_cases, gint first)
+psppire_case_file_delete_cases (PsppireCaseFile *cf, casenumber n_cases, casenumber first)
{
g_return_val_if_fail (cf, FALSE);
g_return_val_if_fail (cf->datasheet, FALSE);
/* Insert case CC into the case file before POSN */
gboolean
psppire_case_file_insert_case (PsppireCaseFile *cf,
- struct ccase *cc,
- gint posn)
+ struct ccase *cc,
+ casenumber posn)
{
struct ccase tmp;
bool result ;
if ( result )
g_signal_emit (cf, signals [CASE_INSERTED], 0, posn);
else
- g_warning ("Cannot insert case at position %d\n", posn);
+ g_warning ("Cannot insert case at position %ld\n", posn);
return result;
}
/* Set the IDXth value of case C to V.
Returns true if successful, false on I/O error. */
gboolean
-psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum, gint idx,
+psppire_case_file_set_value (PsppireCaseFile *cf, casenumber casenum, gint idx,
union value *v, gint width)
{
bool ok;
/* Set the IDXth value of case C using D_IN */
gboolean
-psppire_case_file_data_in (PsppireCaseFile *cf, gint casenum, gint idx,
+psppire_case_file_data_in (PsppireCaseFile *cf, casenumber casenum, gint idx,
struct substring input, const struct fmt_spec *fmt)
{
union value *value;
Returns true on success, false otherwise.
*/
gboolean
-psppire_case_file_get_case (const PsppireCaseFile *cf, gint casenum,
+psppire_case_file_get_case (const PsppireCaseFile *cf, casenumber casenum,
struct ccase *c)
{
g_return_val_if_fail (cf, FALSE);
PsppireCaseFile *psppire_case_file_new (const struct casereader *);
-gboolean psppire_case_file_insert_case (PsppireCaseFile *cf, struct ccase *c, gint row);
+gboolean psppire_case_file_insert_case (PsppireCaseFile *cf, struct ccase *c, casenumber row);
casenumber psppire_case_file_get_case_count (const PsppireCaseFile *cf);
struct fmt_spec;
-gboolean psppire_case_file_data_in (PsppireCaseFile *cf, gint c, gint idx,
+gboolean psppire_case_file_data_in (PsppireCaseFile *cf, casenumber c, gint idx,
struct substring input,
const struct fmt_spec *);
-gboolean psppire_case_file_set_value (PsppireCaseFile *cf, gint casenum,
+gboolean psppire_case_file_set_value (PsppireCaseFile *cf, casenumber casenum,
gint idx, union value *v, gint width);
void psppire_case_file_clear (PsppireCaseFile *cf);
-gboolean psppire_case_file_delete_cases (PsppireCaseFile *cf, gint n_rows,
- gint first);
+gboolean psppire_case_file_delete_cases (PsppireCaseFile *cf, casenumber n_rows,
+ casenumber first);
gboolean psppire_case_file_insert_values (PsppireCaseFile *cf, gint n_values, gint before);
void psppire_case_file_sort (PsppireCaseFile *cf, struct case_ordering *);
-gboolean psppire_case_file_get_case (const PsppireCaseFile *cf, gint casenum,
- struct ccase *c);
+gboolean psppire_case_file_get_case (const PsppireCaseFile *cf,
+ casenumber casenum,
+ struct ccase *c);
struct casereader * psppire_case_file_make_reader (PsppireCaseFile *cf);
static void psppire_data_store_finalize (GObject *object);
static gboolean psppire_data_store_clear_datum (GSheetModel *model,
- gint row, gint column);
+ glong row, glong column);
#define MIN_COLUMNS 10
-static gint
+static glong
psppire_data_store_get_var_count (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_case_file_get_case_count (store->case_file);
}
-static gint
+static glong
psppire_data_store_get_case_count_from_model (const GSheetModel *model)
{
const PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
return psppire_case_file_get_case_count (store->case_file);
}
-
-
-
static void
psppire_data_store_init (PsppireDataStore *data_store)
{
const PangoFontDescription *
psppire_data_store_get_font_desc (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
}
static inline gchar *
-psppire_data_store_get_string_wrapper (const GSheetModel *model, gint row,
- gint column)
+psppire_data_store_get_string_wrapper (const GSheetModel *model, glong row,
+ glong column)
{
return psppire_data_store_get_string (PSPPIRE_DATA_STORE (model), row, column);
}
static inline gboolean
psppire_data_store_set_string_wrapper (GSheetModel *model,
const gchar *text,
- gint row, gint column)
+ glong row, glong column)
{
return psppire_data_store_set_string (PSPPIRE_DATA_STORE (model), text,
row, column);
static void
-delete_cases_callback (GtkWidget *w, gint first, gint n_cases, gpointer data)
+delete_cases_callback (GtkWidget *w,
+ casenumber first, casenumber n_cases, gpointer data)
{
PsppireDataStore *store ;
static void
-insert_case_callback (GtkWidget *w, gint casenum, gpointer data)
+insert_case_callback (GtkWidget *w, casenumber casenum, gpointer data)
{
PsppireDataStore *store ;
/* Insert a blank case before POSN */
gboolean
-psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn)
+psppire_data_store_insert_new_case (PsppireDataStore *ds, casenumber posn)
{
gboolean result;
gint val_cnt, v;
gchar *
-psppire_data_store_get_string (PsppireDataStore *store, gint row, gint column)
+psppire_data_store_get_string (PsppireDataStore *store, glong row, glong column)
{
gint idx;
char *text;
static gboolean
psppire_data_store_clear_datum (GSheetModel *model,
- gint row, gint col)
-
+ glong row, glong col)
{
PsppireDataStore *store = PSPPIRE_DATA_STORE (model);
*/
gboolean
psppire_data_store_set_string (PsppireDataStore *store,
- const gchar *text, gint row, gint col)
+ const gchar *text, glong row, glong col)
{
const struct variable *pv = psppire_dict_get_variable (store->dict, col);
g_return_val_if_fail (pv, FALSE);
/* Column related funcs */
-static gint
+static glong
geometry_get_column_count (const GSheetColumn *geom)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gint
-geometry_get_width (const GSheetColumn *geom, gint unit)
+geometry_get_width (const GSheetColumn *geom, glong unit)
{
const struct variable *pv ;
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
}
static void
-geometry_set_width (GSheetColumn *geom, gint unit, gint width)
+geometry_set_width (GSheetColumn *geom, glong unit, gint width)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static GtkJustification
-geometry_get_justification (const GSheetColumn *geom, gint unit)
+geometry_get_justification (const GSheetColumn *geom, glong unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
const struct variable *pv ;
static const gchar null_var_name[]=N_("var");
static gchar *
-geometry_get_column_button_label (const GSheetColumn *geom, gint unit)
+geometry_get_column_button_label (const GSheetColumn *geom, glong unit)
{
gchar *text;
struct variable *pv ;
static gchar *
-geometry_get_column_subtitle (const GSheetColumn *geom, gint unit)
+geometry_get_column_subtitle (const GSheetColumn *geom, glong unit)
{
gchar *text;
const struct variable *v ;
static gboolean
-geometry_get_sensitivity (const GSheetColumn *geom, gint unit)
+geometry_get_sensitivity (const GSheetColumn *geom, glong unit)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
/* Row related funcs */
-static gint
+static glong
geometry_get_row_count (const GSheetRow *geom, gpointer data)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gint
-geometry_get_height (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_height (const GSheetRow *geom, glong unit, gpointer data)
{
return 25;
}
static gboolean
-geometry_get_row_sensitivity (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_row_sensitivity (const GSheetRow *geom, glong unit, gpointer data)
{
PsppireDataStore *ds = PSPPIRE_DATA_STORE (geom);
static gchar *
-geometry_get_row_button_label (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_row_button_label (const GSheetRow *geom, glong unit, gpointer data)
{
gchar *text;
gchar *s;
TRAILING_ROWS + psppire_case_file_get_case_count (ds->case_file))
return 0;
- s = g_strdup_printf (_("%d"), unit + FIRST_CASE_NUMBER);
+ s = g_strdup_printf (_("%ld"), unit + FIRST_CASE_NUMBER);
text = pspp_locale_to_utf8 (s, -1, 0);
iface->get_button_label = geometry_get_row_button_label;
}
-
-
-
void psppire_data_store_clear (PsppireDataStore *data_store);
-gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn);
+gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, casenumber posn);
struct casereader * psppire_data_store_get_reader (PsppireDataStore *ds);
gchar * psppire_data_store_get_string (PsppireDataStore *ds,
- gint row, gint column);
+ casenumber row, glong column);
gboolean psppire_data_store_set_string (PsppireDataStore *ds,
const gchar *text,
- gint row, gint column);
+ glong row, glong column);
casenumber psppire_data_store_get_case_count (PsppireDataStore *store);
G_CALLBACK (delete_event_callback),
dialog);
+ gtk_window_set_type_hint (GTK_WINDOW (dialog),
+ GDK_WINDOW_TYPE_HINT_DIALOG);
+
gtk_widget_show_all (dialog->box);
}
gchar * missing_values_to_string (const struct variable *pv, GError **err);
-static gchar *psppire_var_store_get_string (const GSheetModel *sheet_model, gint row, gint column);
+static gchar *psppire_var_store_get_string (const GSheetModel *sheet_model, glong row, glong column);
-static gboolean psppire_var_store_clear (GSheetModel *model, gint row, gint col);
+static gboolean psppire_var_store_clear (GSheetModel *model, glong row, glong col);
static gboolean psppire_var_store_set_string (GSheetModel *model,
- const gchar *text, gint row, gint column);
+ const gchar *text, glong row, glong column);
-static gint psppire_var_store_get_row_count (const GSheetModel * model);
+static glong psppire_var_store_get_row_count (const GSheetModel * model);
static gchar *text_for_column (const struct variable *pv, gint c, GError **err);
}
static gboolean
-psppire_var_store_item_editable (PsppireVarStore *var_store, gint row, gint column)
+psppire_var_store_item_editable (PsppireVarStore *var_store, glong row, glong column)
{
const struct fmt_spec *write_spec ;
struct variable *
-psppire_var_store_get_var (PsppireVarStore *store, gint row)
+psppire_var_store_get_var (PsppireVarStore *store, glong row)
{
return psppire_dict_get_variable (store->dict, row);
}
static gboolean
-psppire_var_store_is_editable (const GSheetModel *model, gint row, gint column)
+psppire_var_store_is_editable (const GSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
return psppire_var_store_item_editable (store, row, column);
static const GdkColor *
-psppire_var_store_get_foreground (const GSheetModel *model, gint row, gint column)
+psppire_var_store_get_foreground (const GSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
const PangoFontDescription *
psppire_var_store_get_font_desc (const GSheetModel *model,
- gint row, gint column)
+ glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
static void
-var_insert_callback (GtkWidget *w, gint row, gpointer data)
+var_insert_callback (GtkWidget *w, glong row, gpointer data)
{
GSheetModel *model = G_SHEET_MODEL (data);
}
static gchar *
-psppire_var_store_get_string (const GSheetModel *model, gint row, gint column)
+psppire_var_store_get_string (const GSheetModel *model, glong row, glong column)
{
PsppireVarStore *store = PSPPIRE_VAR_STORE (model);
Returns true if anything was updated, false otherwise.
*/
static gboolean
-psppire_var_store_clear (GSheetModel *model, gint row, gint col)
+psppire_var_store_clear (GSheetModel *model, glong row, glong col)
{
struct variable *pv ;
*/
static gboolean
psppire_var_store_set_string (GSheetModel *model,
- const gchar *text, gint row, gint col)
+ const gchar *text, glong row, glong col)
{
struct variable *pv ;
}
-static gint
+static glong
psppire_var_store_get_row_count (const GSheetModel * model)
{
gint rows = 0;
/* Row related funcs */
-static gint
+static glong
geometry_get_row_count (const GSheetRow *geom, gpointer data)
{
gint rows = 0;
static gint
-geometry_get_height (const GSheetRow *geom, gint row, gpointer data)
+geometry_get_height (const GSheetRow *geom, glong row, gpointer data)
{
return 25;
}
static gboolean
-geometry_is_sensitive (const GSheetRow *geom, gint row, gpointer data)
+geometry_is_sensitive (const GSheetRow *geom, glong row, gpointer data)
{
PsppireVarStore *vs = PSPPIRE_VAR_STORE (geom);
static gchar *
-geometry_get_button_label (const GSheetRow *geom, gint unit, gpointer data)
+geometry_get_button_label (const GSheetRow *geom, glong unit, gpointer data)
{
- gchar *label = g_strdup_printf (_("%d"), unit);
+ gchar *label = g_strdup_printf (_("%ld"), unit);
return label;
}
-
static void
psppire_var_store_sheet_row_init (GSheetRowIface *iface)
{
GType psppire_var_store_get_type (void) G_GNUC_CONST;
PsppireVarStore *psppire_var_store_new (PsppireDict *dict);
-struct variable * psppire_var_store_get_var (PsppireVarStore *store, gint row);
+struct variable * psppire_var_store_get_var (PsppireVarStore *store, glong row);
void psppire_var_store_set_dictionary (PsppireVarStore *var_store, PsppireDict *dict);