Top | ![]() |
![]() |
![]() |
![]() |
MessagingMenuMessage * | messaging_menu_message_new () |
const gchar * | messaging_menu_message_get_id () |
GIcon * | messaging_menu_message_get_icon () |
const gchar * | messaging_menu_message_get_title () |
const gchar * | messaging_menu_message_get_subtitle () |
const gchar * | messaging_menu_message_get_body () |
gint64 | messaging_menu_message_get_time () |
gboolean | messaging_menu_message_get_draws_attention () |
void | messaging_menu_message_set_draws_attention () |
void | messaging_menu_message_add_action () |
MessagingMenuMessage * messaging_menu_message_new (const gchar *id
,GIcon *icon
,const gchar *title
,const gchar *subtitle
,const gchar *body
,gint64 time
);
Creates a new MessagingMenuMessage.
const gchar *
messaging_menu_message_get_id (MessagingMenuMessage *msg
);
GIcon *
messaging_menu_message_get_icon (MessagingMenuMessage *msg
);
const gchar *
messaging_menu_message_get_title (MessagingMenuMessage *msg
);
const gchar *
messaging_menu_message_get_subtitle (MessagingMenuMessage *msg
);
const gchar *
messaging_menu_message_get_body (MessagingMenuMessage *msg
);
gint64
messaging_menu_message_get_time (MessagingMenuMessage *msg
);
gboolean
messaging_menu_message_get_draws_attention
(MessagingMenuMessage *msg
);
void messaging_menu_message_set_draws_attention (MessagingMenuMessage *msg
,gboolean draws_attention
);
Sets whether msg
is drawing attention.
void messaging_menu_message_add_action (MessagingMenuMessage *msg
,const gchar *id
,const gchar *label
,const GVariantType *parameter_type
,GVariant *parameter_hint
);
Adds an action with id
and label
to message
. Actions are an
alternative way for users to activate a message. Note that messages
can still be activated without an action.
If parameter_type
is non-NULL
, the action is able to receive user
input in addition to simply activating the action. Currently, only
string parameters are supported.
A list of predefined parameters can be supplied as a GVariant array
of parameter_type
in parameter_hint
. If parameter_hint
is
floating, it will be consumed.
It is recommended to add at most two actions to a message.
“body”
property “body” char *
First lines of the body of the message.
Owner: MessagingMenuMessage
Flags: Read / Write / Construct Only
Default value: NULL
“draws-attention”
property “draws-attention” gboolean
Whether the message should draw attention.
Owner: MessagingMenuMessage
Flags: Read / Write
Default value: TRUE
“icon”
property “icon” GIcon *
Icon of the message.
Owner: MessagingMenuMessage
Flags: Read / Write / Construct Only
“id”
property “id” char *
Unique id of the message.
Owner: MessagingMenuMessage
Flags: Read / Write / Construct Only
Default value: NULL
“subtitle”
property “subtitle” char *
Subtitle of the message.
Owner: MessagingMenuMessage
Flags: Read / Write / Construct Only
Default value: NULL
“time”
property “time” gint64
Time the message was sent, in microseconds.
Owner: MessagingMenuMessage
Flags: Read / Write / Construct Only
Allowed values: >= 0
Default value: 0
“activate”
signalvoid user_function (MessagingMenuMessage *msg, char *action, GVariant *parameter, gpointer user_data)
Emitted when the user has activated the message. The message is
immediately removed from the application's menu, handlers of this
signal do not need to call messaging_menu_app_remove_message()
.
msg |
||
action |
the id of activated action, or |
[allow-none] |
parameter |
activation parameter, or |
[allow-none] |
user_data |
user data set when the signal handler was connected. |
Flags: Has Details