Message toolbarAction

From TrillWiki

Jump to: navigation, search

The message_toolbarAction notification is sent when a non-default toolbar button is clicked within a message window. The plugin has to register for this notification using the messageToolbarRegister function.

Compatibility: 2.0 and higher

Contents

Syntax

callback(int window_id, char *icontrol, "message_toolbarAction", message_toolbar_action_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

Message toolbarAction utilitizes the message_toolbar_action_t structure.

struct message_toolbar_action_t
{
    unsigned int                struct_size;

    int                         connection_id;
    int                         window_id;

    char                        *medium;
    char                        *name;
    char                        *location;

    char                        *action;

    /* 3.0
     */
    HWND                        hwnd;
};



connection_id
The connection id.
window_id
The window id.
medium
The current medium.
name
The address associated with the window.
location
If it is a multi-person chat, this will be set to the chat name.
action
The button clicked. This will be like: "toolbar-action", but will change depending on what was registered for.


Return Value

Must return 0.

Remarks

Default toolbar buttons will be returned using the medium_toolbarAction notification to the medium callback.


Personal tools