PrefsShow
From TrillWiki
If the plugin has preferences, see prefsInitialize, this will be called to tell it to either show or hide its preferences window.
Compatibility: 1.0 and higher
Contents |
Syntax
plugin_main("prefsShow", plugin_prefs_show_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
PrefsShow utilitizes the plugin_prefs_show_t structure.
struct plugin_prefs_show_t {
unsigned int struct_size;
int show; //1 shows, 0 hides
char *pref_name;
char *sub_entry;
HWND hwnd;
int x;
int y;
struct plugin_prefs_info_t prefs_info;
};
- hwnd
- [in] The hwnd of the preferences window it must use as the parent
- x
- [in] The x location to position the dialog window.
- y
- [in] The y location to position the dialog window.
- show
- [in] The show parameter, when this is set to 1 the dialog must set itself visible and 0 should hide.
- pref_name
- [in] The preference's name that was given in prefsInitialize
- sub_entry
- [in] Always NULL.
- prefs_info
- [out] See below.
struct plugin_prefs_info_t
{
unsigned int struct_size;
char name[128];
char description[1024];
HBITMAP bitmap;
}
- name
- [out] The name to show at the top of the preferences.
- description
- [out] The description to show at the top of preferences.
- bitmap
- [out] The bitmap to use at the top of preferences. No copy is made so do not remove this bitmap while preferences are shown.
Return Value
Must return 0.
Remarks
The sizes of the entries in the prefs_info struct are 255 bytes; be sure not to write beyond them. The bitmap is also not copied, so be sure not to delete the bitmap while the preferences are loaded.
The plugin will be notified when preferences closes and how it was closed using the prefsAction notification message.
See also: prefsAction
