Edit changeText

From TrillWiki

Jump to: navigation, search

The edit_changeText event is sent whenever the contents of the edit area are changed.

Compatibility: 2.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "edit_changeText", edit_event_t *data, void *userData);

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

Edit changeText utilitizes the edit_event_t structure.

 struct edit_event_t { 
 	unsigned int   				struct_size; 
 
 	int					window_id; 
 	int     				edit_event_id; 
 
 	char					*event; 
 
 	ttkCallback				callback; 
 	void					*data; 
 };



window_id
The window id associated with this event.
edit_event_id
The edit event id.
event
The type of change that occurred. The options for this variable include: edit_insert_picture, edit_cut, edit_delete_selected, edit_clear, edit_paste, edit_delete, edit_backspace_selected, edit_backspace_word, edit_backspace, edit_history, edit_tab, edit_split, edit_mirc_color, edit_format, edit_alias, edit_foreground, edit_background, edit_ime_add, edit_character, edit_remote_add, edit_event, edit_size.
data
A char* representing the text within the edit box at this time.


Return Value

Must return 0.

Remarks

Note that this event is sent when text is changed both by the user and by plugins. Be sure that if you are changing the text within a plugin in response to this event, that you do not get into an endless loop.


See also: editEventRegister

Personal tools