libinstpatch Reference Manual | ||||
---|---|---|---|---|
Top | Description |
IpatchIter; IpatchIterMethods; #define IPATCH_TYPE_ITER GType ipatch_iter_get_type (void
); IpatchIter * ipatch_iter_alloc (void
); void ipatch_iter_free (IpatchIter *iter
); IpatchIter * ipatch_iter_duplicate (IpatchIter *iter
); #define ipatch_iter_get (iter) #define ipatch_iter_next (iter) #define ipatch_iter_first (iter) #define ipatch_iter_last (iter) #define ipatch_iter_index (iter, pos) #define ipatch_iter_insert (iter, item) #define ipatch_iter_remove (iter) #define ipatch_iter_count (iter) #define IPATCH_ITER_GSLIST_GET_LIST (iter) #define IPATCH_ITER_GSLIST_GET_POS (iter) #define IPATCH_ITER_GSLIST_SET_LIST (iter, list) #define IPATCH_ITER_GSLIST_SET_POS (iter, pos) void ipatch_iter_GSList_init (IpatchIter *iter
,GSList **list
); gpointer ipatch_iter_GSList_get (IpatchIter *iter
); gpointer ipatch_iter_GSList_next (IpatchIter *iter
); gpointer ipatch_iter_GSList_first (IpatchIter *iter
); gpointer ipatch_iter_GSList_last (IpatchIter *iter
); gpointer ipatch_iter_GSList_index (IpatchIter *iter
,int index
); void ipatch_iter_GSList_insert (IpatchIter *iter
,gpointer item
); void ipatch_iter_GSList_remove (IpatchIter *iter
); int ipatch_iter_GSList_count (IpatchIter *iter
); #define IPATCH_ITER_GLIST_GET_LIST (iter) #define IPATCH_ITER_GLIST_GET_POS (iter) #define IPATCH_ITER_GLIST_SET_LIST (iter, list) #define IPATCH_ITER_GLIST_SET_POS (iter, pos) void ipatch_iter_GList_init (IpatchIter *iter
,GList **list
); gpointer ipatch_iter_GList_get (IpatchIter *iter
); gpointer ipatch_iter_GList_next (IpatchIter *iter
); gpointer ipatch_iter_GList_first (IpatchIter *iter
); gpointer ipatch_iter_GList_last (IpatchIter *iter
); gpointer ipatch_iter_GList_index (IpatchIter *iter
,int index
); void ipatch_iter_GList_insert (IpatchIter *iter
,gpointer item
); void ipatch_iter_GList_remove (IpatchIter *iter
); int ipatch_iter_GList_count (IpatchIter *iter
); #define IPATCH_ITER_ARRAY_GET_ARRAY (iter) #define IPATCH_ITER_ARRAY_GET_SIZE (iter) #define IPATCH_ITER_ARRAY_GET_POS (iter) #define IPATCH_ITER_ARRAY_SET_ARRAY (iter, array) #define IPATCH_ITER_ARRAY_SET_SIZE (iter, size) #define IPATCH_ITER_ARRAY_SET_POS (iter, pos) void ipatch_iter_array_init (IpatchIter *iter
,gpointer *array
,guint size
); gpointer ipatch_iter_array_get (IpatchIter *iter
); gpointer ipatch_iter_array_next (IpatchIter *iter
); gpointer ipatch_iter_array_first (IpatchIter *iter
); gpointer ipatch_iter_array_last (IpatchIter *iter
); gpointer ipatch_iter_array_index (IpatchIter *iter
,int index
); void ipatch_iter_array_insert (IpatchIter *iter
,gpointer item
); void ipatch_iter_array_remove (IpatchIter *iter
); int ipatch_iter_array_count (IpatchIter *iter
);
typedef struct { gpointer (*get)(IpatchIter *iter); /* get item method */ gpointer (*next)(IpatchIter *iter); /* next item method */ gpointer (*first)(IpatchIter *iter); /* first item method */ gpointer (*last)(IpatchIter *iter); /* last item method */ gpointer (*index)(IpatchIter *iter, int index); /* index item method */ void (*insert)(IpatchIter *iter, gpointer item); /* insert item method */ void (*remove)(IpatchIter *iter); /* remove current item method */ int (*count)(IpatchIter *iter); /* count items method */ } IpatchIterMethods;
GType ipatch_iter_get_type (void
);
Gets the GBoxed derived type for IpatchIter structures.
Returns : |
GType of IpatchIter structures. |
IpatchIter * ipatch_iter_alloc (void
);
Allocates an item iterator. This function is seldom used since IpatchIter structures are usually allocated on the stack.
Returns : |
Newly allocated item iterator. Should be freed with
ipatch_iter_free() when finished with it.
|
void ipatch_iter_free (IpatchIter *iter
);
Frees an item iterator that was allocated with ipatch_iter_alloc()
.
Seldom used since IpatchIter structures are usually allocated on the
stack.
|
Item iterator |
IpatchIter * ipatch_iter_duplicate (IpatchIter *iter
);
Duplicates a patch iterator. Seldom used since IpatchIter structures are usually allocated on the stack and can be copied directly.
|
Patch iterator to duplicate |
Returns : |
Newly allocated patch iter identical to iter . Free it with
ipatch_iter_free() when finished.
|
void ipatch_iter_GSList_init (IpatchIter *iter
,GSList **list
);
Initialize an iterator to iterate over a GSList.
|
Iterator to initialize |
|
Pointer to root GSList pointer to initialize iterator to |
gpointer ipatch_iter_GSList_get (IpatchIter *iter
);
GSList item iterator method to get the current item.
|
Item iterator initialized with a GSList |
Returns : |
Current item or NULL if no current item.
|
gpointer ipatch_iter_GSList_next (IpatchIter *iter
);
GSList item iterator method to get the next item and advance the iterator's position.
|
Item iterator initialized with a GSList |
Returns : |
Next item or NULL if no more items.
|
gpointer ipatch_iter_GSList_first (IpatchIter *iter
);
GSList item iterator method to get the first item and set the iterator's position to it.
|
Item iterator initialized with a GSList |
Returns : |
First item or NULL if GSList is empty.
|
gpointer ipatch_iter_GSList_last (IpatchIter *iter
);
GSList item iterator method to get the last item and set the iterator's position to it.
|
Item iterator initialized with a GSList |
Returns : |
Last item or NULL if GSList is empty.
|
gpointer ipatch_iter_GSList_index (IpatchIter *iter
,int index
);
GSList item iterator method to get an item at a given index and set the iterator's position to it.
|
Item iterator initialized with a GSList |
|
Index, from 0, of item to get |
Returns : |
item at the index position or NULL if index is off
the end of the GSList.
|
void ipatch_iter_GSList_insert (IpatchIter *iter
,gpointer item
);
GSList item iterator method to insert an item pointer.
|
Item iterator initialized with a GSList |
|
Pointer to insert |
void ipatch_iter_GSList_remove (IpatchIter *iter
);
GSList item iterator method to remove the current item and advance the current position.
|
Item iterator initialized with a GSList |
int ipatch_iter_GSList_count (IpatchIter *iter
);
GSList item iterator method to get the count of items.
|
Item iterator initialized with a GSList |
Returns : |
Count of items in GSList iterator. |
void ipatch_iter_GList_init (IpatchIter *iter
,GList **list
);
Initialize an iterator to iterate over a GList.
|
Iterator to initialize |
|
Pointer to root GList pointer to initialize iterator to |
gpointer ipatch_iter_GList_get (IpatchIter *iter
);
GList item iterator method to get the current item.
|
Item iterator initialized with a GList |
Returns : |
Current item or NULL if no current item.
|
gpointer ipatch_iter_GList_next (IpatchIter *iter
);
GList item iterator method to get the next item and advance the iterator's position.
|
Item iterator initialized with a GList |
Returns : |
Next item or NULL if no more items.
|
gpointer ipatch_iter_GList_first (IpatchIter *iter
);
GList item iterator method to get the first item and set the iterator's position to it.
|
Item iterator initialized with a GList |
Returns : |
First item or NULL if GList is empty.
|
gpointer ipatch_iter_GList_last (IpatchIter *iter
);
GList item iterator method to get the last item and set the iterator's position to it.
|
Item iterator initialized with a GList |
Returns : |
Last item or NULL if GList is empty.
|
gpointer ipatch_iter_GList_index (IpatchIter *iter
,int index
);
GList item iterator method to get an item at a given index and set the iterator's position to it.
|
Item iterator initialized with a GList |
|
Index, from 0, of item to get |
Returns : |
item at the index position or NULL if index is off
the end of the GList.
|
void ipatch_iter_GList_insert (IpatchIter *iter
,gpointer item
);
GList item iterator method to insert an item pointer.
|
Item iterator initialized with a GList |
|
Pointer to insert |
void ipatch_iter_GList_remove (IpatchIter *iter
);
GList item iterator method to remove the current item and advance the current position.
|
Item iterator initialized with a GList |
int ipatch_iter_GList_count (IpatchIter *iter
);
GList item iterator method to get the count of items.
|
Item iterator initialized with a GList |
Returns : |
Count of items in GList iterator. |
#define IPATCH_ITER_ARRAY_GET_SIZE(iter) (GPOINTER_TO_UINT (iter->data2))
void ipatch_iter_array_init (IpatchIter *iter
,gpointer *array
,guint size
);
Initialize an iterator to iterate over an array (read only).
|
Iterator to initialize |
|
Pointer to an array of pointers |
|
Count of elements in array .
|
gpointer ipatch_iter_array_get (IpatchIter *iter
);
Array item iterator method to get the current item.
|
Item iterator initialized with an array |
Returns : |
Current item or NULL if no current item.
|
gpointer ipatch_iter_array_next (IpatchIter *iter
);
Array item iterator method to get the next item and advance the iterator's position.
|
Item iterator initialized with an array |
Returns : |
Next item or NULL if no more items.
|
gpointer ipatch_iter_array_first (IpatchIter *iter
);
Array item iterator method to get the first item and set the iterator's position to it.
|
Item iterator initialized with an array |
Returns : |
First item or NULL if array is empty.
|
gpointer ipatch_iter_array_last (IpatchIter *iter
);
Array item iterator method to get the last item and set the iterator's position to it.
|
Item iterator initialized with an array |
Returns : |
Last item or NULL if array is empty.
|
gpointer ipatch_iter_array_index (IpatchIter *iter
,int index
);
Array item iterator method to get an item at a given index and set the iterator's position to it.
|
Item iterator initialized with an array |
|
Index, from 0, of item to get |
Returns : |
item at the index position or NULL if index is off
the end of the array.
|
void ipatch_iter_array_insert (IpatchIter *iter
,gpointer item
);
array item iterator method to insert an item pointer.
|
Item iterator initialized with a array |
|
Pointer to insert |
void ipatch_iter_array_remove (IpatchIter *iter
);
array item iterator method to remove the current item and advance the current position.
|
Item iterator initialized with a array |
int ipatch_iter_array_count (IpatchIter *iter
);
array item iterator method to get the count of items.
|
Item iterator initialized with a array |
Returns : |
Count of items in array iterator. |