All pastes #2067983 Raw Edit

libnotify-test

public c v1 · immutable
#2067983 ·published 2011-05-24 04:50 UTC
rendered paste body
#include <stdlib.h>#include <libnotify/notify.h>#include <libnotify/notification.h>void action1_cb(NotifyNotification *notify, char *action, gpointer user_data){	printf("Accin1\n");	notify_uninit();	//exit(0);}void action_free(gpointer data){}int main(int argc, char* argv[]){	//struct NotifyNotification *notify;	NotifyNotification *notify;	GError *error = NULL;	gtk_init(&argc, &argv);	if ( !notify_init("Masca") )		return -1;	notify = notify_notification_new("Summary", "Body", "");	//error = g_error_new();	notify_notification_set_category(notify, "im.received");	notify_notification_add_action(notify, "Action1", "Label1",			action1_cb, NULL, action_free);	notify_notification_show(notify, &error);	gtk_main();	//g_error_free(error);}