Creates a new #UniqueMessageData structure. This structure holds the message data passed between running instances with unique_app_send_message().
Copies message_data
.
Frees all the resources allocated by message_data
.
Retrieves the raw contents of message_data
set using
unique_messaget_data_set().
returned string is owned by the #UniqueMessageData and should never be modified or freed
Retrieves the filename set with unique_message_data_set_filename().
filename. Use g_free() to free the resources used by the returned value.
Retrieves the startup notification id set inside message_data
. This
field is always set by the Unique library.
owned by the #UniqueMessageData structure and should not be modified or freed
Retrieves the text set using unique_message_data_set_text().
Retrieves a %NULL-terminated string vector containing the URIs set with unique_message_data_set_uris().
%NULL-terminated list of URIs. Use g_strfreev() to free it.
Retrieves the workspace number from where the message came. This field is always set by the Unique library.
Sets data
as the payload of message_data
. Any other data is removed
from the message data. If data
is %NULL, a length
of -1 will unset
the payload, while a length
of 0 will set the payload to an empty
string.
You can use unique_message_data_get() to retrieve the data.
binary blob to set, or %NULL
length of data
Sets filename
as the contents of message_data
.
a filename
Sets str
as the plain text payload of message_data,
converting it
to UTF-8 if needed. If length
is -1, the length of the string will
be used. Use unique_message_data_get_text() to retrieve the text.
plain text to be set as payload
length of the text, or -1
Converts uris
to a valid URI list and sets it as payload of
message_data
. You can use unique_message_data_get_uris() to
retrieve the list from a #UniqueMessageData.
a list of URIs in a %NULL-terminated string vector
Creates a new #UniqueMessageData structure. This structure holds the message data passed between running instances with unique_app_send_message().
#UniqueMessageData contains the data passed between instances of a #UniqueApp. The #UniqueMessageData structure received inside the signal handlers for UniqueApp::message-received is guaranteed to contain the #GdkScreen, the workspace and the startup notification id of the instance sending the message.