]> Dogcows Code - chaz/openbox/blob - obt/tests/watchtest.c
add some tests for obt pieces (binary search, .desktop parsking, linkbase, and inotif...
[chaz/openbox] / obt / tests / watchtest.c
1 #/*
2 #!/bin/sh
3 #*/
4 #if 0
5 gcc -O0 -o ./watchtest `pkg-config --cflags --libs obt-3.5` watchtest.c && \
6 ./watchtest
7 exit
8 #endif
9
10 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
11
12 watchtest.c for the Openbox window manager
13 Copyright (c) 2010 Dana Jansens
14
15 This program is free software; you can redistribute it and/or modify
16 it under the terms of the GNU General Public License as published by
17 the Free Software Foundation; either version 2 of the License, or
18 (at your option) any later version.
19
20 This program is distributed in the hope that it will be useful,
21 but WITHOUT ANY WARRANTY; without even the implied warranty of
22 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 GNU General Public License for more details.
24
25 See the COPYING file for a copy of the GNU General Public License.
26 */
27
28 #include "obt/watch.h"
29 #include <glib.h>
30
31 void func(ObtWatch *w, const gchar *base_path,
32 const gchar *subpath, ObtWatchNotifyType type,
33 gpointer data)
34 {
35 g_print("base path: %s subpath: %s type=%d\n", base_path, subpath, type);
36 }
37
38 gint main()
39 {
40 ObtWatch *watch;
41 GMainLoop *loop;
42
43 watch = obt_watch_new();
44 obt_watch_add(watch, "/tmp/a", FALSE, func, NULL);
45
46 loop = g_main_loop_new(NULL, FALSE);
47 g_main_loop_run(loop);
48
49 return 0;
50 }
This page took 0.033038 seconds and 4 git commands to generate.