![]() |
![]() |
![]() |
Messaging Menu Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
MessagingMenuMessage * messaging_menu_message_new (const gchar *id
,GIcon *icon
,const gchar *title
,const gchar *subtitle
,const gchar *body
,gint64 time
); 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
); void messaging_menu_message_add_action (MessagingMenuMessage *msg
,const gchar *id
,const gchar *label
,const GVariantType *parameter_type
,GVariant *parameter_hint
); MessagingMenuMessage;
"body" gchar* : Read / Write / Construct Only "draws-attention" gboolean : Read / Write "icon" GIcon* : Read / Write / Construct Only "id" gchar* : Read / Write / Construct Only "subtitle" gchar* : Read / Write / Construct Only "time" gint64 : Read / Write / Construct Only "title" gchar* : Read / Write / Construct Only
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.
|
unique id of the message |
|
a GIcon representing the message. [transfer full][allow-none] |
|
the title of the message |
|
the subtitle of the message. [allow-none] |
|
the message body. [allow-none] |
|
the time the message was received |
Returns : |
a new MessagingMenuMessage. [transfer full] |
const gchar * messaging_menu_message_get_id (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the unique id of msg
|
GIcon * messaging_menu_message_get_icon (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the icon of msg . [transfer none]
|
const gchar * messaging_menu_message_get_title (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the title of msg
|
const gchar * messaging_menu_message_get_subtitle (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the subtitle of msg
|
const gchar * messaging_menu_message_get_body (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the body of msg
|
gint64 messaging_menu_message_get_time (MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
the time at which msg was received |
gboolean messaging_menu_message_get_draws_attention
(MessagingMenuMessage *msg
);
|
a MessagingMenuMessage |
Returns : |
whether msg is drawing attention |
void messaging_menu_message_set_draws_attention (MessagingMenuMessage *msg
,gboolean draws_attention
);
Sets whether msg
is drawing attention.
|
a MessagingMenuMessage |
|
whether msg should draw 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.
|
a MessagingMenuMessage |
|
unique id of the action |
|
label of the action. [allow-none] |
|
a GVariantType. [allow-none] |
|
a GVariant suggesting a valid range for parameters. [allow-none] |
"body"
property "body" gchar* : Read / Write / Construct Only
First lines of the body of the message.
Default value: NULL
"draws-attention"
property "draws-attention" gboolean : Read / Write
Whether the message should draw attention.
Default value: TRUE
"id"
property "id" gchar* : Read / Write / Construct Only
Unique id of the message.
Default value: NULL
"subtitle"
property "subtitle" gchar* : Read / Write / Construct Only
Subtitle of the message.
Default value: NULL
"time"
property "time" gint64 : Read / Write / Construct Only
Time the message was sent, in microseconds.
Allowed values: >= 0
Default value: 0
"activate"
signalvoid user_function (MessagingMenuMessage *msg,
gchar *action,
GVariant *parameter,
gpointer user_data) : Has Details
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()
.
|
the MessagingMenuMessage |
|
the id of activated action, or NULL . [allow-none]
|
|
activation parameter, or NULL . [allow-none]
|
|
user data set when the signal handler was connected. |