SkinEnumerate
From TrillWiki
The skinEnumerate function allows a plugin to search through the current skin loaded and enumerate the contents.
Compatibility: 2.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "skinEnumerate", skin_enum_t *)
Note that all Trillian functions and notifications begin with a lower-case letter, despite the Wiki requirement that all pages start with a capital letter.
Parameters
SkinEnumerate utilitizes the skin_enum_t structure.
struct skin_enum_t {
unsigned int struct_size;
char *search_type;
void *search_data;
ttkCallback callback;
void *data;
};
- search_type
- The type of search to perform. The choices for this include (in parens is the return value with the enum_add): window (skin_window_t), font (skin_font_t), bitmap (skin_bitmap_t), sound (skin_sound_t), taskbaricon (skin_taskbaricon_t), component (skin_component_t), icontrol (skin_icontrol_t), control (skin_control_t), frame (skin_frame_t), drawer (skin_drawer_t) or settings (skin_control_entry_t).
- search_data
- The data associated with the above search. Not all searches require data. The ones that provide data include (in parens is the data provided): icontrol (skin_component_t), frame (skin_component_t), drawer (skin_component_t), settings (skin_control_t).
- callback
- The enumeration callback to receive the enumeration notifications.
- data
- The data to send along with the above callback.
Return Value
Returns negative on error, number of added entries on success.
Remarks
When doing a settings based enumeration, there is a skin_control_entry_t that is passed back. The data within this structure will change to point to different structures depending on the type of tag it is. An example is that for a font tag, it will set control to "font" and then point to skin_control_font_t with the tagdata. For a list of these structures, please see the plugin.h (there are a lot of them).
