Gtk2-Unique

 view release on metacpan or  search on metacpan

xs/UniqueMessageData.xs  view on Meta::CPAN

segmentation fault in your application as the C library will try to unmarshall
the message with the wrong code.

You can retrieve the data set using C<Gkt2::MessageData::get()>,
C<Gkt2::MessageData::get_text()> or C<Gkt2::MessageData::get_uris()>.

=cut


=for apidoc

Retrieves the raw data of the message.

=cut
SV*
unique_message_data_get (UniqueMessageData *message_data)
	PREINIT:
		const guchar *string = NULL;
		gsize length = 0;
		
	CODE:
		string = unique_message_data_get(message_data, &length);
		if (string == NULL) {XSRETURN_UNDEF;}
		
		RETVAL = newSVpvn(string, length);
	
	OUTPUT:
		RETVAL


=for apidoc

Retrieves the text.

=cut
gchar*
unique_message_data_get_text (UniqueMessageData *message_data)


=for apidoc

Retrieves the filename.

=cut
gchar*
unique_message_data_get_filename (UniqueMessageData *message_data)


=for apidoc

Retrieves the URIs as an array.

=cut
void
unique_message_data_get_uris (UniqueMessageData *message_data)
	PREINIT:
		gchar **uris = NULL;
		gchar *uri = NULL;
		gint i = 0;
		
	PPCODE:
		uris = unique_message_data_get_uris(message_data);
		if (uris == NULL) {XSRETURN_EMPTY;}
		
		for (i = 0; TRUE; ++i) {
			uri = uris[i];
			if (uri == NULL) {break;}
			
			XPUSHs(sv_2mortal(newSVGChar(uri)));
		}
		g_strfreev(uris);


=for apidoc

Returns a pointer to the screen from where the message came. You can use
C<Gkt2::Window::set_screen()> to move windows or dialogs to the right screen.
This field is always set by the Unique library.

=cut
GdkScreen*
unique_message_data_get_screen (UniqueMessageData *message_data)


=for apidoc

Retrieves the startup notification id set inside message_data. This field is
always set by the Unique library.
=cut
const gchar*
unique_message_data_get_startup_id (UniqueMessageData *message_data)


=for apidoc

Retrieves the workspace number from where the message came. This field is
always set by the Unique library.

=cut
guint
unique_message_data_get_workspace (UniqueMessageData *message_data)



( run in 1.212 second using v1.01-cache-2.11-cpan-5511b514fd6 )