Class
PurpleCommandManager
unstable since: 3.0
Description [src]
final class Purple.CommandManager : GObject.Object
implements Gio.ListModel {
/* No available fields */
}
A manager of PurpleCommand
objects.
libpurple, user interfaces, and plugins can manage the commands that are
available with purple_command_manager_add()
and
purple_command_manager_remove()
.
User interfaces can use purple_command_manager_find_and_execute()
to quickly
find and execute a command. They can also use
purple_command_manager_find_all()
to get a list of all commands which can be
presented to a user.
Both purple_command_manager_find()
and purple_command_manager_find_all()
take
an optional PurpleConversation
parameter. If it is not NULL
, its
PurpleConversation:tags
property will be searched with
purple_tags_contains()
using the PurpleCommand:tags
as the needle to
determine which commands are available for the PurpleConversation
.
When plugins are being unloaded, they should call
purple_command_manager_remove_all_with_source()
to remove their commands.
Available since: 3.0
Functions
purple_command_manager_get_default
Gets the default instance that libpurple is using.
unstable since: 3.0
purple_command_manager_get_default_as_model
Gets the default instance of the manager but cast to GListModel
.
unstable since: 3.0
Instance methods
purple_command_manager_find
Finds the command with a name of name
with the highest priority.
unstable since: 3.0
purple_command_manager_find_and_execute
Attempts to find a PurpleCommand
in manager
and execute it.
unstable since: 3.0
purple_command_manager_get_commands_for_conversation
Gets a list of PurpleCommand
‘s that are available for conversation
.
unstable since: 3.0
purple_command_manager_remove
Attempts to remove the first command with name
and source
from manager
.
purple_command_manager_remove_all_with_source
Removes all commands from manager
that have a source of source
.
unstable since: 3.0
Methods inherited from GListModel (5)
g_list_model_get_item
Get the item at position
.
g_list_model_get_item_type
Gets the type of the items in list
.
g_list_model_get_n_items
Gets the number of items in list
.
g_list_model_get_object
Get the item at position
.
g_list_model_items_changed
Emits the GListModel::items-changed
signal on list
.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.
Signals inherited from GListModel (1)
GListModel::items-changed
This signal is emitted whenever items were added to or removed
from list
. At position
, removed
items were removed and added
items were added in their place.