[−][src]Crate hexchat
A safe API for creating HexChat plugins.
To get started, create a struct representing your plugin, and implement Plugin
for it. Then,
call plugin!
on the struct.
All plugins should be built as cdylibs, or if for some reason you have no other choice, dylibs.
Do not attempt to define a main()
symbol; Plugin::new
is your plugin's 'entry point'. For that
matter, do not attempt to define the HexChat C docs' described extern fn
s - this is taken care
of for you by the plugin!
macro.
If window manipulation is desired, the window
feature should be enabled.
Static variables holding heap resources are discouraged and will cause memory leaks. This crate
provides a safe_static!
macro for this purpose. Please note that any thread that you create
that accesses a safe static must be killed in your plugin's Drop
implementation, and it's
undefined not to. You should kill them anyway even if you don't use this, because they'll be a
memory leak too otherwise.
Macros
plugin | This macro will set up your plugin's actual callability from HexChat. |
safe_static | A macro for creating |
Structs
ChannelFlags | Various boolean flags about a |
ChannelInfo | A full set of information about an IRC channel. |
ChannelRef | A channel reference, for identification purposes only. Use |
Command | A handle to a registered command. |
Context | The main object for working with HexChat. Passed to you via callbacks. |
DccTransferInfo | A full set of information about a DCC transfer. |
FakePlugin | A handle to a fake plugin entry in the plugin list. |
IgnoreEntry | An entry in HexChat's ignore list. |
IgnoreType | All the message types that can be present in an |
NotifyEntry | An entry in HexChat's notify list. |
PrintEvent | Represents a 'print event' in HexChat, i.e. an invocation of one of a hundred and fifty different format strings corresponding to any possible action. |
PrintEventListener | A handle to a registered print event listener. |
Priority | The priority of an event listener or command. |
RawServerEventListener | A handle to a registered raw server event listener. |
SafeLazy | A lazily-evaluated resource that is safe to use in a HexChat plugin. |
SafeUninit | An initially uninitialized resource that is safe to use in a HexChat plugin. |
TimerTask | A handle to a registered timer task. |
UserInfo | Information about another user. |
WindowEvent | An event corresponding to a window action. |
WindowEventListener | A handle to a registered window event listener. |
Enums
ChannelType | An enumeration of different channel types. |
DccTransferStatus | The various statuses that can describe a |
DccTransferType | An enumeration of all possible DCC transfer types. |
EatMode | Represents who to hide an event or command from. |
GlobalPreferenceValue | Possible values from |
Traits
Plugin | This trait must be implemented on a type before the type is passed to |