diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-05-27 22:29:19 +0800 |
commit | 948235c3d1076dbe6ed2e57a24c16a083bbd9f01 (patch) | |
tree | 4133b1adfd94d8f889ca7ad4ad851346518f4171 /widgets/table/e-table-model.c | |
parent | cc3a98fc1ad5bb87aa7335f3de404ee7feee1541 (diff) | |
download | gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.gz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.bz2 gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.lz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.xz gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.tar.zst gsoc2013-evolution-948235c3d1076dbe6ed2e57a24c16a083bbd9f01.zip |
Prefer GLib basic types over C types.
Diffstat (limited to 'widgets/table/e-table-model.c')
-rw-r--r-- | widgets/table/e-table-model.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/widgets/table/e-table-model.c b/widgets/table/e-table-model.c index efe097c4e1..2badb768c9 100644 --- a/widgets/table/e-table-model.c +++ b/widgets/table/e-table-model.c @@ -59,7 +59,7 @@ static guint e_table_model_signals [LAST_SIGNAL] = { 0, }; * * Returns: the number of columns in the table model. */ -int +gint e_table_model_column_count (ETableModel *e_table_model) { g_return_val_if_fail (e_table_model != NULL, 0); @@ -75,7 +75,7 @@ e_table_model_column_count (ETableModel *e_table_model) * * Returns: the number of rows in the Table model. */ -int +gint e_table_model_row_count (ETableModel *e_table_model) { g_return_val_if_fail (e_table_model != NULL, 0); @@ -92,7 +92,7 @@ e_table_model_row_count (ETableModel *e_table_model) * */ void -e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int row) +e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -120,8 +120,8 @@ e_table_model_append_row (ETableModel *e_table_model, ETableModel *source, int r * data in that cell. rows_deleted affects all data in those rows. * rows_inserted and no_change don't affect any data in this way. **/ -void * -e_table_model_value_at (ETableModel *e_table_model, int col, int row) +gpointer +e_table_model_value_at (ETableModel *e_table_model, gint col, gint row) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -142,10 +142,10 @@ e_table_model_value_at (ETableModel *e_table_model, int col, int row) * * There should be an agreement between the Table Model and the user * of this function about the data being stored. Typically it will - * be a pointer to a set of data, or a datum that fits inside a void *. + * be a pointer to a set of data, or a datum that fits inside a gpointer . */ void -e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const void *value) +e_table_model_set_value_at (ETableModel *e_table_model, gint col, gint row, gconstpointer value) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -163,7 +163,7 @@ e_table_model_set_value_at (ETableModel *e_table_model, int col, int row, const * edited, %FALSE otherwise */ gboolean -e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row) +e_table_model_is_cell_editable (ETableModel *e_table_model, gint col, gint row) { g_return_val_if_fail (e_table_model != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE); @@ -172,8 +172,8 @@ e_table_model_is_cell_editable (ETableModel *e_table_model, int col, int row) } -void * -e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void *value) +gpointer +e_table_model_duplicate_value (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -185,7 +185,7 @@ e_table_model_duplicate_value (ETableModel *e_table_model, int col, const void * } void -e_table_model_free_value (ETableModel *e_table_model, int col, void *value) +e_table_model_free_value (ETableModel *e_table_model, gint col, gpointer value) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -206,8 +206,8 @@ e_table_model_has_save_id (ETableModel *e_table_model) return FALSE; } -char * -e_table_model_get_save_id (ETableModel *e_table_model, int row) +gchar * +e_table_model_get_save_id (ETableModel *e_table_model, gint row) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -230,8 +230,8 @@ e_table_model_has_change_pending(ETableModel *e_table_model) return FALSE; } -void * -e_table_model_initialize_value (ETableModel *e_table_model, int col) +gpointer +e_table_model_initialize_value (ETableModel *e_table_model, gint col) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -243,7 +243,7 @@ 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) +e_table_model_value_is_empty (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, FALSE); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), FALSE); @@ -254,8 +254,8 @@ e_table_model_value_is_empty (ETableModel *e_table_model, int col, const void *v return FALSE; } -char * -e_table_model_value_to_string (ETableModel *e_table_model, int col, const void *value) +gchar * +e_table_model_value_to_string (ETableModel *e_table_model, gint col, gconstpointer value) { g_return_val_if_fail (e_table_model != NULL, NULL); g_return_val_if_fail (E_IS_TABLE_MODEL (e_table_model), NULL); @@ -381,7 +381,7 @@ e_table_model_init (ETableModel *e_table_model) static void print_tabs (void) { - int i; + gint i; for (i = 0; i < depth; i++) g_print("\t"); } @@ -475,7 +475,7 @@ e_table_model_changed (ETableModel *e_table_model) * object */ void -e_table_model_row_changed (ETableModel *e_table_model, int row) +e_table_model_row_changed (ETableModel *e_table_model, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -503,7 +503,7 @@ e_table_model_row_changed (ETableModel *e_table_model, int row) * object */ void -e_table_model_cell_changed (ETableModel *e_table_model, int col, int row) +e_table_model_cell_changed (ETableModel *e_table_model, gint col, gint row) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -531,7 +531,7 @@ e_table_model_cell_changed (ETableModel *e_table_model, int col, int row) * @e_table_model object */ void -e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count) +e_table_model_rows_inserted (ETableModel *e_table_model, gint row, gint count) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -557,7 +557,7 @@ e_table_model_rows_inserted (ETableModel *e_table_model, int row, int count) * the "model_rows_inserted" signal on the @e_table_model object */ void -e_table_model_row_inserted (ETableModel *e_table_model, int row) +e_table_model_row_inserted (ETableModel *e_table_model, gint row) { e_table_model_rows_inserted(e_table_model, row, 1); } @@ -574,7 +574,7 @@ e_table_model_row_inserted (ETableModel *e_table_model, int row) * @e_table_model object */ void -e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count) +e_table_model_rows_deleted (ETableModel *e_table_model, gint row, gint count) { g_return_if_fail (e_table_model != NULL); g_return_if_fail (E_IS_TABLE_MODEL (e_table_model)); @@ -600,7 +600,7 @@ e_table_model_rows_deleted (ETableModel *e_table_model, int row, int count) * the "model_rows_deleted" signal on the @e_table_model object */ void -e_table_model_row_deleted (ETableModel *e_table_model, int row) +e_table_model_row_deleted (ETableModel *e_table_model, gint row) { e_table_model_rows_deleted(e_table_model, row, 1); } |