Gtk2-Notify

 view release on metacpan or  search on metacpan

xs/Notify.xs  view on Meta::CPAN

MODULE = Gtk2::Notify	PACKAGE = Gtk2::Notify	PREFIX = notify_

PROTOTYPES: DISABLE

=for object Gtk2::Notify - Perl interface to libnotify
=cut

=head1 SYNOPSIS

    use Gtk2::Notify -init, "app_name";

    my $notification = Gtk2::Notify->new(
            $summary,
            $message,
            $icon,
            $attach_widget
    );
    $notification->show;

=head1 INITIALISATION

    use Gtk2::Notify qw/-init app_name/;

=over

=item -init

Importing Gtk2::Notify with the -init option requires one additional argument:
the application name to use. This is equivalent to
C<Gtk2::Notify-E<gt>init($app_name)>.

=back

=cut

gboolean
notify_init (class, app_name)
		const char *app_name
	C_ARGS:
		app_name

void
notify_uninit (class)
	C_ARGS:
		/* void */

gboolean
notify_is_initted (class)
	C_ARGS:
		/* void */

const gchar *
notify_get_app_name (class)
	C_ARGS:
		/* void */

void
notify_get_server_caps (class)
	PREINIT:
		GList *list, *tmp;
	PPCODE:
		list = notify_get_server_caps ();
		for (tmp = list; tmp != NULL; tmp = tmp->next) {
			XPUSHs (sv_2mortal (newSVGChar (tmp->data)));
		}
		g_list_free (list);

NO_OUTPUT gboolean
notify_get_server_info (class, OUTLIST char *name, OUTLIST char *vendor, OUTLIST char *version, OUTLIST char *spec_version)
	C_ARGS:
		&name, &vendor, &version, &spec_version
	POSTCALL:
		if (!RETVAL) {
			XSRETURN_EMPTY;
		}

MODULE = Gtk2::Notify	PACKAGE = Gtk2::Notify	PREFIX = notify_notification_

NotifyNotification *
notify_notification_new (class, summary, body=NULL, icon=NULL, attach=NULL)
		const gchar *summary
		const gchar *body
		const gchar *icon
		GtkWidget_ornull *attach
	C_ARGS:
		summary, body, icon, attach

#if GTK_CHECK_VERSION (2, 9, 2)

NotifyNotification *
notify_notification_new_with_status_icon (class, summary, body=NULL, icon=NULL, status_icon=NULL)
		const gchar *summary
		const gchar *body
		const gchar *icon
		GtkStatusIcon *status_icon
	C_ARGS:
		summary, body, icon, status_icon

#endif

gboolean
notify_notification_update (notification, summary, message=NULL, icon=NULL)
		NotifyNotification *notification
		const gchar *summary
		const gchar *message
		const gchar *icon

void
notify_notification_attach_to_widget (notification, attach)
		NotifyNotification *notification
		GtkWidget *attach

#if GTK_CHECK_VERSION (2, 9, 2)

void
notify_notification_attach_to_status_icon (notification, status_icon)
		NotifyNotification *notification
		GtkStatusIcon *status_icon

#endif



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