STCategory

STCategory — a structure for defining a category.

Synopsis




struct      STCategory;
gboolean    (*STCategoryURLCallback)        (STCategory *category);
STCategory* st_category_new                 (void);
void        st_category_free                (STCategory *category);

Description

Details

struct STCategory

struct STCategory {

  char				*name;
  char				*label;
  char				*url_postfix;
  STCategoryURLCallback		url_cb;
};

char *namethe category internal name.
char *labelthe category human-readable name.
char *url_postfixthe category URL postfix.
STCategoryURLCallback url_cba function which will be called when the category is about to be reloaded.

STCategoryURLCallback ()

gboolean    (*STCategoryURLCallback)        (STCategory *category);

Specifies the type of function to be stored in the url_cb member of the STCategory structure. The function will be called before reloading category, and may update its label and url_postfix members.

category : the category which is about to be reloaded.
Returns : the function should return FALSE if the reload should be cancelled.

st_category_new ()

STCategory* st_category_new                 (void);

Creates a new STCategory. The structure members are initialized to NULL, and at least the name and label members must be filled manually.

Returns : a new STCategory.

st_category_free ()

void        st_category_free                (STCategory *category);

Destroys category (g_free() will be called on the name, label and url_postfix members).

category : the STCategory to destroy.

See Also

STHandlerEvent, st_handler_set_stock_categories()