Preliminary documentation of provider interfaces
* Preliminary documentation of CallsCall and CallsMessageSource * Documentation and cleaning up of CallsCallData * Add data files and meson rules to create gtk-doc documentation * Move some macros from util.h to calls-message-source.h
This commit is contained in:
@@ -24,6 +24,15 @@
|
||||
|
||||
#include "calls-message-source.h"
|
||||
|
||||
/**
|
||||
* SECTION:calls-message-source
|
||||
* @short_description: A source of messages for the user.
|
||||
* @Title: CallsMessageSource
|
||||
*
|
||||
* All three of the main interfaces, #CallsProvider, #CallsOrigin and
|
||||
* #CallsCall require #CallsMessageSource. They use this interface's
|
||||
* message signal to emit messages intended for display to the user.
|
||||
*/
|
||||
|
||||
G_DEFINE_INTERFACE (CallsMessageSource, calls_message_source, G_TYPE_OBJECT);
|
||||
|
||||
@@ -37,29 +46,23 @@ static guint signals [SIGNAL_LAST_SIGNAL];
|
||||
static void
|
||||
calls_message_source_default_init (CallsMessageSourceInterface *iface)
|
||||
{
|
||||
GType arg_types[2] = { G_TYPE_STRING, GTK_TYPE_MESSAGE_TYPE };
|
||||
|
||||
/**
|
||||
* CallsMessageSource::message:
|
||||
* @self: The #CallsMessageSource instance.
|
||||
* @text: The message text.
|
||||
* @type: The type of the message; error, warning, etc.
|
||||
*
|
||||
* This signal is emitted when an implementing-object needs to emit
|
||||
* a message to the user. The message should be suitable for
|
||||
* presentation to the user as-is.
|
||||
*/
|
||||
signals[SIGNAL_MESSAGE] =
|
||||
g_signal_newv ("message",
|
||||
G_TYPE_FROM_INTERFACE (iface),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
NULL, NULL, NULL, NULL,
|
||||
G_TYPE_NONE,
|
||||
2, calls_message_signal_arg_types());
|
||||
}
|
||||
|
||||
|
||||
GType *
|
||||
calls_message_signal_arg_types()
|
||||
{
|
||||
static gsize initialization_value = 0;
|
||||
static GType arg_types[2];
|
||||
|
||||
if (g_once_init_enter (&initialization_value))
|
||||
{
|
||||
arg_types[0] = G_TYPE_STRING;
|
||||
arg_types[1] = GTK_TYPE_MESSAGE_TYPE;
|
||||
|
||||
g_once_init_leave (&initialization_value, 1);
|
||||
}
|
||||
|
||||
return arg_types;
|
||||
2, arg_types);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user