aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-reflow-model.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-03-03 04:35:31 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-03-03 08:45:09 +0800
commit7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2 (patch)
tree1ccda4c2c864e0c0dccccde1811093ecefde1753 /e-util/e-reflow-model.c
parent18bdb8b9205e70f725bf49a6f13dc3c2fe3fadf7 (diff)
downloadgsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.gz
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.bz2
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.lz
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.xz
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.tar.zst
gsoc2013-evolution-7dcd0b44996ade2fc7713a927eb0ff44c5ff9fb2.zip
Update API documentation.
Diffstat (limited to 'e-util/e-reflow-model.c')
-rw-r--r--e-util/e-reflow-model.c129
1 files changed, 62 insertions, 67 deletions
diff --git a/e-util/e-reflow-model.c b/e-util/e-reflow-model.c
index 4f5b219b90..336afc4038 100644
--- a/e-util/e-reflow-model.c
+++ b/e-util/e-reflow-model.c
@@ -48,68 +48,68 @@ static guint signals[LAST_SIGNAL] = { 0, };
/**
* e_reflow_model_set_width:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @width: The new value for the width of each item.
*/
void
-e_reflow_model_set_width (EReflowModel *e_reflow_model,
+e_reflow_model_set_width (EReflowModel *reflow_model,
gint width)
{
EReflowModelClass *class;
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_if_fail (class->set_width != NULL);
- class->set_width (e_reflow_model, width);
+ class->set_width (reflow_model, width);
}
/**
* e_reflow_model_count:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
*
* Returns: the number of items in the reflow model.
*/
gint
-e_reflow_model_count (EReflowModel *e_reflow_model)
+e_reflow_model_count (EReflowModel *reflow_model)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->count != NULL, 0);
- return class->count (e_reflow_model);
+ return class->count (reflow_model);
}
/**
* e_reflow_model_height:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item number to get the height of.
* @parent: The parent GnomeCanvasItem.
*
* Returns: the height of the nth item.
*/
gint
-e_reflow_model_height (EReflowModel *e_reflow_model,
+e_reflow_model_height (EReflowModel *reflow_model,
gint n,
GnomeCanvasGroup *parent)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->height != NULL, 0);
- return class->height (e_reflow_model, n, parent);
+ return class->height (reflow_model, n, parent);
}
/**
* e_reflow_model_incarnate:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item to create.
* @parent: The parent GnomeCanvasItem to create a child of.
*
@@ -118,23 +118,23 @@ e_reflow_model_height (EReflowModel *e_reflow_model,
* Returns: the new GnomeCanvasItem.
*/
GnomeCanvasItem *
-e_reflow_model_incarnate (EReflowModel *e_reflow_model,
+e_reflow_model_incarnate (EReflowModel *reflow_model,
gint n,
GnomeCanvasGroup *parent)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), NULL);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), NULL);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->incarnate != NULL, NULL);
- return class->incarnate (e_reflow_model, n, parent);
+ return class->incarnate (reflow_model, n, parent);
}
/**
* e_reflow_model_create_cmp_cache:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
*
* Creates a compare cache for quicker sorting. The sorting function
* may not depend on the cache, but it should benefit from it if available.
@@ -143,28 +143,28 @@ e_reflow_model_incarnate (EReflowModel *e_reflow_model,
* automatically freed with g_hash_table_destroy() when no longer needed.
**/
GHashTable *
-e_reflow_model_create_cmp_cache (EReflowModel *e_reflow_model)
+e_reflow_model_create_cmp_cache (EReflowModel *reflow_model)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), NULL);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), NULL);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
if (class->create_cmp_cache == NULL)
return NULL;
- return class->create_cmp_cache (e_reflow_model);
+ return class->create_cmp_cache (reflow_model);
}
/**
* e_reflow_model_compare:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n1: The first item to compare
* @n2: The second item to compare
* @cmp_cache: #GHashTable of cached compare values, created by
* e_reflow_model_create_cmp_cache(). This can be NULL, when
- * caching is not available, even when @e_reflow_model defines
+ * caching is not available, even when @reflow_model defines
* the create_cmp_cache function.
*
* Compares item n1 and item n2 to see which should come first.
@@ -172,42 +172,42 @@ e_reflow_model_create_cmp_cache (EReflowModel *e_reflow_model)
* Returns: strcmp like semantics for the comparison value.
*/
gint
-e_reflow_model_compare (EReflowModel *e_reflow_model,
+e_reflow_model_compare (EReflowModel *reflow_model,
gint n1,
gint n2,
GHashTable *cmp_cache)
{
EReflowModelClass *class;
- g_return_val_if_fail (E_IS_REFLOW_MODEL (e_reflow_model), 0);
+ g_return_val_if_fail (E_IS_REFLOW_MODEL (reflow_model), 0);
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_val_if_fail (class->compare != NULL, 0);
- return class->compare (e_reflow_model, n1, n2, cmp_cache);
+ return class->compare (reflow_model, n1, n2, cmp_cache);
}
/**
* e_reflow_model_reincarnate:
- * @e_reflow_model: The e-reflow-model to operate on
+ * @reflow_model: The e-reflow-model to operate on
* @n: The item to create.
* @item: The item to reuse.
*
* Update item to represent the nth piece of data.
*/
void
-e_reflow_model_reincarnate (EReflowModel *e_reflow_model,
+e_reflow_model_reincarnate (EReflowModel *reflow_model,
gint n,
GnomeCanvasItem *item)
{
EReflowModelClass *class;
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
- class = E_REFLOW_MODEL_GET_CLASS (e_reflow_model);
+ class = E_REFLOW_MODEL_GET_CLASS (reflow_model);
g_return_if_fail (class->reincarnate != NULL);
- class->reincarnate (e_reflow_model, n, item);
+ class->reincarnate (reflow_model, n, item);
}
static void
@@ -290,11 +290,11 @@ print_tabs (void)
/**
* e_reflow_model_changed:
- * @e_reflow_model: the reflow model to notify of the change
+ * @reflow_model: the reflow model to notify of the change
*
* Use this function to notify any views of this reflow model that
* the contents of the reflow model have changed. This will emit
- * the signal "model_changed" on the @e_reflow_model object.
+ * the signal "model_changed" on the @reflow_model object.
*
* It is preferable to use the e_reflow_model_item_changed() signal to
* notify of smaller changes than to invalidate the entire model, as
@@ -302,21 +302,20 @@ print_tabs (void)
* from the model.
*/
void
-e_reflow_model_changed (EReflowModel *e_reflow_model)
+e_reflow_model_changed (EReflowModel *reflow_model)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
- d (g_print ("Emitting model_changed on model 0x%p.\n", e_reflow_model));
+ d (g_print ("Emitting model_changed on model 0x%p.\n", reflow_model));
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_CHANGED], 0);
+ g_signal_emit (reflow_model, signals[MODEL_CHANGED], 0);
d (depth--);
}
/**
* e_reflow_model_comparison_changed:
- * @e_reflow_model: the reflow model to notify of the change
+ * @reflow_model: the reflow model to notify of the change
*
* Use this function to notify any views of this reflow model that the
* sorting has changed. The actual contents of the items hasn't, so
@@ -324,23 +323,22 @@ e_reflow_model_changed (EReflowModel *e_reflow_model)
* individual items.
*/
void
-e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
+e_reflow_model_comparison_changed (EReflowModel *reflow_model)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (g_print (
"Emitting comparison_changed on model 0x%p.\n",
- e_reflow_model));
+ reflow_model));
d (depth++);
- g_signal_emit (e_reflow_model, signals[COMPARISON_CHANGED], 0);
+ g_signal_emit (reflow_model, signals[COMPARISON_CHANGED], 0);
d (depth--);
}
/**
* e_reflow_model_items_inserted:
- * @e_reflow_model: The model changed.
+ * @reflow_model: The model changed.
* @position: The position the items were insert in.
* @count: The number of items inserted.
*
@@ -348,17 +346,16 @@ e_reflow_model_comparison_changed (EReflowModel *e_reflow_model)
* of items have been inserted.
**/
void
-e_reflow_model_items_inserted (EReflowModel *e_reflow_model,
+e_reflow_model_items_inserted (EReflowModel *reflow_model,
gint position,
gint count)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (depth++);
g_signal_emit (
- e_reflow_model,
+ reflow_model,
signals[MODEL_ITEMS_INSERTED], 0,
position, count);
d (depth--);
@@ -366,46 +363,44 @@ e_reflow_model_items_inserted (EReflowModel *e_reflow_model,
/**
* e_reflow_model_item_removed:
- * @e_reflow_model: The model changed.
+ * @reflow_model: The model changed.
* @n: The position from which the items were removed.
*
* Use this function to notify any views of the reflow model that an
* item has been removed.
**/
void
-e_reflow_model_item_removed (EReflowModel *e_reflow_model,
+e_reflow_model_item_removed (EReflowModel *reflow_model,
gint n)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_ITEM_REMOVED], 0, n);
+ g_signal_emit (reflow_model, signals[MODEL_ITEM_REMOVED], 0, n);
d (depth--);
}
/**
* e_reflow_model_item_changed:
- * @e_reflow_model: the reflow model to notify of the change
- * @item: the item that was changed in the model.
+ * @reflow_model: the reflow model to notify of the change
+ * @n: the item that was changed in the model.
*
* Use this function to notify any views of the reflow model that the
* contents of item @item have changed in model such that the height
* has changed or the item needs to be reincarnated. This function
- * will emit the "model_item_changed" signal on the @e_reflow_model
+ * will emit the "model_item_changed" signal on the @reflow_model
* object
*/
void
-e_reflow_model_item_changed (EReflowModel *e_reflow_model,
+e_reflow_model_item_changed (EReflowModel *reflow_model,
gint n)
{
- g_return_if_fail (e_reflow_model != NULL);
- g_return_if_fail (E_IS_REFLOW_MODEL (e_reflow_model));
+ g_return_if_fail (E_IS_REFLOW_MODEL (reflow_model));
d (print_tabs ());
- d (g_print ("Emitting item_changed on model 0x%p, n=%d.\n", e_reflow_model, n));
+ d (g_print ("Emitting item_changed on model 0x%p, n=%d.\n", reflow_model, n));
d (depth++);
- g_signal_emit (e_reflow_model, signals[MODEL_ITEM_CHANGED], 0, n);
+ g_signal_emit (reflow_model, signals[MODEL_ITEM_CHANGED], 0, n);
d (depth--);
}