EditEventRegister
From TrillWiki
The editEventRegister function allows a plugin to see events that are occurring within a particular edit area of a chat window.
Compatibility: 2.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "editEventRegister", edit_event_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
EditEventRegister 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 to monitor the events for. This id is returned on a messageOpen and also may be retrieved from a window creation event. Set this to -1 to receive events from all windows.
- event
- The particular event to register for. For a list of event types, look in the Edit Notification section of these docs. If you wish to receive all events, leave this NULL.
- callback
- Callback to receive the events that the edit area generates.
- data
- Data passed along with each callback message in the user field.
Return Value
Returns the event id for this event.
Remarks
Be sure to call editEventUnregister when the plugin is stopped or when you are finished receiving events.
