AlpProxyCacheModel
[UI Utilities]


Data Structures

struct  _AlpProxyCacheModelRowItemClass
 Data structure containing user-defined member functions for managing RowItems. More...

Defines

#define ALP_PROXY_CACHE_IS_MODEL(obj)   (GTK_CHECK_TYPE((obj), ALP_PROXY_CACHE_MODEL_TYPE))
#define ALP_PROXY_CACHE_IS_MODEL_CLASS(klass)   (GTK_CHECK_CLASS_TYPE((obj), ALP_PROXY_CACHE_MODEL_TYPE))
#define ALP_PROXY_CACHE_MODEL(obj)   (GTK_CHECK_CAST((obj), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModel))
#define ALP_PROXY_CACHE_MODEL_CLASS(klass)   (GTK_CHECK_CLASS_CAST((klass), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModelClass))
#define ALP_PROXY_CACHE_MODEL_GET_CLASS(obj)   (GTK_CHECK_GET_CLASS((obj), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModelClass))
#define ALP_PROXY_CACHE_MODEL_TYPE   (alp_proxy_cache_model_get_type())

Typedefs

typedef _AlpProxyCacheModel AlpProxyCacheModel
typedef _AlpProxyCacheModelClass AlpProxyCacheModelClass
typedef _AlpProxyCacheModelRowItemClass AlpProxyCacheModelRowItemClass

Functions

alp_status_t alp_proxy_cache_model_clear (AlpProxyCacheModel *model)
 Resize the existing proxy array. Invalidates all cached items, potentially causing data to be re-fetched the next time GtkTreeView requests it. Per-row user_data persists beyond this call.
alp_status_t alp_proxy_cache_model_delete (AlpProxyCacheModel *model, gint row)
 Delete a proxy item at this row and collapse everything down by 1. This call will resize the proxy array and invalidate (clear) all items after the deleted row.
alp_status_t alp_proxy_cache_model_get_index_from_iter (AlpProxyCacheModel *model, GtkTreeIter *iter, gint *index)
 Convenience function to get the row index from a given iter.
gint alp_proxy_cache_model_get_n_rows (AlpProxyCacheModel *model)
 Convenience function to determine number of rows in the model.
GType alp_proxy_cache_model_get_type (void)
 Return class structure (GType) for this AlpProxyCacheModel.
alp_status_t alp_proxy_cache_model_get_user_data (AlpProxyCacheModel *model, void **user_data)
 Get user_data for the model.
alp_status_t alp_proxy_cache_model_get_user_data_row (AlpProxyCacheModel *model, gint row, void **user_data)
 Get user_data for a given row.
alp_status_t alp_proxy_cache_model_insert (AlpProxyCacheModel *model, gint row)
 Insert a proxy item before this row. This will resize the proxy array and move all items down one. You can reasonably expect a call to AlpProxyCacheListModelRowItem::create() shortly after this call.
alp_status_t alp_proxy_cache_model_invalidate (AlpProxyCacheModel *model, gint row, gint n)
 Invalidates one or more cached rows and causes the row(s) to be reloaded and updated in the GtkTreeView. This has no effect for rows not in the current cache (see alp_proxy_cache_model_valid()).
GtkTreeModel * alp_proxy_cache_model_new (const AlpProxyCacheModelRowItemClass *proxy_class, gint rows, gint cache_size)
 Create a new list model. Cache_size is either 0 (all cached data persists) or a positive integer.
alp_status_t alp_proxy_cache_model_resize (AlpProxyCacheModel *model, gint newsize)
 Resize the existing proxy array. If a larger size is requested, new proxy items will be added to the end of the internal proxy array. If a user method for create_user_data() was specified, it will be called for each additional item. This call will not result in cache invalidation (no data fetched) unless the call affects visible items.
alp_status_t alp_proxy_cache_model_set_user_data (AlpProxyCacheModel *model, void *user_data)
 Set user data for the model This data persists as long as the array isn't resized.
alp_status_t alp_proxy_cache_model_set_user_data_row (AlpProxyCacheModel *model, gint row, void *user_data)
 Set user data for a given row. This data persists as long as the array isn't resized.
gboolean alp_proxy_cache_model_valid (AlpProxyCacheModel *model, gint row)
 Convenience function to determine if a given row is currently in the cache.


Define Documentation

#define ALP_PROXY_CACHE_IS_MODEL obj   )     (GTK_CHECK_TYPE((obj), ALP_PROXY_CACHE_MODEL_TYPE))
 

#define ALP_PROXY_CACHE_IS_MODEL_CLASS klass   )     (GTK_CHECK_CLASS_TYPE((obj), ALP_PROXY_CACHE_MODEL_TYPE))
 

#define ALP_PROXY_CACHE_MODEL obj   )     (GTK_CHECK_CAST((obj), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModel))
 

#define ALP_PROXY_CACHE_MODEL_CLASS klass   )     (GTK_CHECK_CLASS_CAST((klass), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModelClass))
 

#define ALP_PROXY_CACHE_MODEL_GET_CLASS obj   )     (GTK_CHECK_GET_CLASS((obj), ALP_PROXY_CACHE_MODEL_TYPE, AlpProxyCacheModelClass))
 

#define ALP_PROXY_CACHE_MODEL_TYPE   (alp_proxy_cache_model_get_type())
 


Typedef Documentation

typedef struct _AlpProxyCacheModel AlpProxyCacheModel
 

typedef struct _AlpProxyCacheModelClass AlpProxyCacheModelClass
 

typedef struct _AlpProxyCacheModelRowItemClass AlpProxyCacheModelRowItemClass
 


Function Documentation

alp_status_t alp_proxy_cache_model_clear AlpProxyCacheModel model  ) 
 

Resize the existing proxy array. Invalidates all cached items, potentially causing data to be re-fetched the next time GtkTreeView requests it. Per-row user_data persists beyond this call.

Parameters:
[in] model the AlpProxyCacheModel
[in] newsize size of the proxy array. Typically the same as the number of items in the list.
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_delete AlpProxyCacheModel model,
gint  row
 

Delete a proxy item at this row and collapse everything down by 1. This call will resize the proxy array and invalidate (clear) all items after the deleted row.

Parameters:
[in] model the AlpProxyCacheModel
[in] row the row before which to insert a new proxy
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_get_index_from_iter AlpProxyCacheModel model,
GtkTreeIter *  iter,
gint *  index
 

Convenience function to get the row index from a given iter.

Parameters:
[in] model the AlpProxyCacheModel
[in] iter the iterator
[out] index the index of the iterator
Returns:
alp_status_t ALP_STATUS_OK or an error

gint alp_proxy_cache_model_get_n_rows AlpProxyCacheModel model  ) 
 

Convenience function to determine number of rows in the model.

Parameters:
[in] model the AlpProxyCacheModel
Returns:
gint total number of rows in the model or -1 on error

GType alp_proxy_cache_model_get_type void   ) 
 

Return class structure (GType) for this AlpProxyCacheModel.

Returns:
GType a GType object for this type

alp_status_t alp_proxy_cache_model_get_user_data AlpProxyCacheModel model,
void **  user_data
 

Get user_data for the model.

Parameters:
[in] model the AlpProxyCacheModel
[in] user_data address of a pointer to user data
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_get_user_data_row AlpProxyCacheModel model,
gint  row,
void **  user_data
 

Get user_data for a given row.

Parameters:
[in] model the AlpProxyCacheModel
[in] row the row to get user_data from
[in] user_data address of a pointer to user data
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_insert AlpProxyCacheModel model,
gint  row
 

Insert a proxy item before this row. This will resize the proxy array and move all items down one. You can reasonably expect a call to AlpProxyCacheListModelRowItem::create() shortly after this call.

Parameters:
[in] model the AlpProxyCacheModel
[in] row the row before which to insert a new proxy
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_invalidate AlpProxyCacheModel model,
gint  row,
gint  n
 

Invalidates one or more cached rows and causes the row(s) to be reloaded and updated in the GtkTreeView. This has no effect for rows not in the current cache (see alp_proxy_cache_model_valid()).

Parameters:
[in] model the AlpProxyCacheModel
[in] row the starting row to invalidate
[in] n the total number of rows to invalidate
Returns:
alp_status_t ALP_STATUS_OK if successful

GtkTreeModel* alp_proxy_cache_model_new const AlpProxyCacheModelRowItemClass proxy_class,
gint  rows,
gint  cache_size
 

Create a new list model. Cache_size is either 0 (all cached data persists) or a positive integer.

Parameters:
[in] proxy_class pointer to filled-in data structure for custom proxy class
[in] rows number of rows in the list
[in] cache_size size of the cache. 0 for unlimited (grows up to number of rows)
Returns:
AlpProxyCacheModel* NULL on error

alp_status_t alp_proxy_cache_model_resize AlpProxyCacheModel model,
gint  newsize
 

Resize the existing proxy array. If a larger size is requested, new proxy items will be added to the end of the internal proxy array. If a user method for create_user_data() was specified, it will be called for each additional item. This call will not result in cache invalidation (no data fetched) unless the call affects visible items.

Parameters:
[in] model the AlpProxyCacheModel
[in] newsize size of the proxy array. Typically the same as the number of items in the list.
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_set_user_data AlpProxyCacheModel model,
void *  user_data
 

Set user data for the model This data persists as long as the array isn't resized.

Parameters:
[in] model the AlpProxyCacheModel
[in] user_data user data
Returns:
alp_status_t ALP_STATUS_OK if successful

alp_status_t alp_proxy_cache_model_set_user_data_row AlpProxyCacheModel model,
gint  row,
void *  user_data
 

Set user data for a given row. This data persists as long as the array isn't resized.

Parameters:
[in] model the AlpProxyCacheModel
[in] row the row to attach user_data to
[in] user_data user data
Returns:
alp_status_t ALP_STATUS_OK if successful

gboolean alp_proxy_cache_model_valid AlpProxyCacheModel model,
gint  row
 

Convenience function to determine if a given row is currently in the cache.

Parameters:
[in] model the AlpProxyCacheModel
[in] row the row to test
Returns:
gboolean true if valid


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.