BrowserRegister
From TrillWiki
The browserRegister function allows a plugin to control a particular protocol for Trillian. Any plugin which then uses the browserOpen call will then use this callback when calling a particular protocol.
Compatibility: 2.0 and higher
Contents |
Syntax
plugin_send(MYGUID, "browserRegister", struct browser_entry_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
BrowserRegister utilitizes the browser_entry_t structure.
struct browser_entry_t {
unsigned int struct_size;
char *protocol;
char *name;
char *description;
ttkCallback callback;
void *data;
};
- protocol
- The protocol that this browser supports. An example would be "http" if you were to make a web browser.
- name
- The name of the browser.
- description
- A short description of the browser.
- callback
- The callback to use when the protocol is called using browserOpen. For more information on the notifications to receive see the Browser Notifications section of the docs.
- data
- The data to send with the above callback.
Return Value
Negative value on error, 0 on success.
Remarks
Be sure to call browserUnregister when the plugin stops.
