[][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 fns - this is taken care of for you by the plugin! macro.

If window manipulation is desired, the window feature should be enabled.

Macros

plugin

This macro will set up your plugin's actual callability from HexChat.

Structs

ChannelFlags

Various boolean flags about a ChannelInfo.

ChannelInfo

A full set of information about an IRC channel.

ChannelRef

A channel reference, for identification purposes only. Use into_info to request channel information.

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. In case you missed it from the Context::add_fake_plugin documentation, please do not add your crate-registered plugin to this list.

IgnoreEntry

An entry in HexChat's ignore list.

IgnoreType

All the message types that can be present in an IgnoreEntry.

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. For example, PrintEvent::JOIN corresponds to channel join messages. Note that these are only the physically displayed messages; this should only be used for message formatting. If you want to listen to, respond to, and appropriately eat the actual server-to-client correspondence, you should instead be using raw server event listeners.

PrintEventListener

A handle to a registered print event listener.

Priority

The priority of an event listener or command. This represents what order listeners or command handlers will be called, and earlier listeners or command handlers can prevent later listeners or command handlers from seeing the event or command via EatMode::Plugin or EatMode::All. Priority instances can be constructed from any i8, but you are encouraged to use the built-in constants, and especially Priority::NORMAL at that.

RawServerEventListener

A handle to a registered raw server event listener.

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 DccTransferInfo.

DccTransferType

An enumeration of all possible DCC transfer types.

EatMode

Represents who to hide an event or command from.

GlobalPreferenceValue

Possible values from Context::get_global_pref.

Traits

Plugin

This trait must be implemented on a type before the type is passed to plugin!.