root/trunk/libnotify/tests/test-xy.c

Revision 2432 (checked in by chipx86, 3 years ago)

Add back notify_get_server_info() and notify_get_server_caps().

Line 
1 /*
2  * @file tests/test-xy.c Unit test: X, Y hints
3  *
4  * @Copyright (C) 2005 Christian Hammond <chipx86@chipx86.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA  02111-1307, USA.
20  */
21
22 #include <libnotify/notify.h>
23 #include <stdio.h>
24 #include <unistd.h>
25
26 int main() {
27     NotifyNotification *n;
28
29     notify_init("XY");
30
31     n = notify_notification_new ("X, Y Test",
32                                      "This notification should point to 150, 10",
33                                      NULL, NULL);
34
35     notify_notification_set_hint_int32 (n, "x", 150);
36     notify_notification_set_hint_int32 (n, "y", 10);
37
38     if (!notify_notification_show (n, NULL)) {
39         fprintf(stderr, "failed to send notification\n");
40         return 1;
41     }
42
43     return 0;
44 }
Note: See TracBrowser for help on using the browser.