PrefsInitialize

From TrillWiki

Jump to: navigation, search

If the plugin wishes to add entries into the preferences, it must register a location first.

Compatibility: 1.0 and higher

Contents

Syntax

plugin_send(MYGUID, "prefsInitialize", plugin_prefs_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

PrefsInitialize utilitizes the plugin_prefs_t structure.

struct plugin_prefs_t { 
 	unsigned int   			struct_size; 
 
 	int 				enabled; 
 
 	char				*pref_name; 
 
 	struct plugin_prefs_entry_t 	*sub_entry; 
 };



enabled
Specifies if the preferences will be visible or not for the user to see.
pref_name
The text string visible inside the preferences
sub_entry
If the plugin requires more than one preferences screen, it can have as many subentries as it wishes. This structure provides a way to have numerous entries linked.


Return Value

Returns negative on error, 0 on success.

Remarks

This function is usually called within the start notification.