configure: clearify comments in generated config.mk
[vlock.git] / modules / vlock_plugin.h
blob17433e8de0a1301e7dc9346ee3756dc2aaaebbcc
1 /* vlock_plugin.h -- header file for plugins for vlock,
2 * the VT locking program for linux
4 * This program is copyright (C) 2007 Frank Benkstein, and is free
5 * software which is freely distributable under the terms of the
6 * GNU General Public License version 2, included as the file COPYING in this
7 * distribution. It is NOT public domain software, and any
8 * redistribution not permitted by the GNU General Public License is
9 * expressly forbidden without prior written permission from
10 * the author.
13 #include <stdbool.h>
15 /* A plugin might define these arrays to indicate
16 * that its must always be called before or after
17 * the ones listed in the respective arrays. If
18 * set, the arrays must be terminated by NULL.
20 extern const char *before[];
21 extern const char *after[];
23 /* A plugin might define this array to indicate
24 * that the listed plugins should also be loaded
25 * when this plugin is invoked.
27 extern const char *requires[];
29 /* A plugin might define this array to indicate
30 * that it will fail if the named plugins are not
31 * also loaded.
33 extern const char *needs[];
35 /* A plugin might define this array to indicate
36 * that it should be (silently) unloaded if the
37 * named plugins are not also loaded.
39 extern const char *depends[];
41 /* A plugin might define thes array to indicate
42 * that it is not possible to have it loaded at
43 * the same time as any of the other plugins
44 * listed. */
45 extern const char *conflicts[];
47 /* This hook is invoked at the start of vlock. It is provided with a reference
48 * to a pointer to NULL that may be changed to point to an arbitrary context
49 * object.
51 * On success it should return true and false on error. If this function
52 * fails, vlock will not continue.
54 bool vlock_start(void **);
56 /* This hook is invoked when vlock is about to exit. Its argument is a
57 * reference to the same pointer previously given to vlock_start.
59 * On success it should return true and false on error. If this function
60 * fails, vlock will not continue.
62 bool vlock_end(void **);
64 /* This hook is invoked whenever a timeout is reached or Escape is pressed
65 * after locking the screen. Rules for the argument are the same as for
66 * vlcok_start, except that the pointer may already point to valid data if set
67 * in a previous run.
69 * On success it should return true and false on error. If this function
70 * fails, vlock will not continue.
72 bool vlock_save(void **);
74 /* This hook is invoked to abort the previous one. The pointer argument is the
75 * same as for vlock_save.
77 * On success it should return true and false on error. If this function
78 * fails, vlock will not continue.
80 bool vlock_save_abort(void **);