]> icculus.org git repositories - dana/openbox.git/blob - openbox/action_filter.h
Stick an ObClientSetReduce/ExpandFunc directly in the filter definition.
[dana/openbox.git] / openbox / action_filter.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    action_filter.h for the Openbox window manager
4    Copyright (c) 2011        Dana Jansens
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program 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
14    GNU General Public License for more details.
15
16    See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #include "client_set.h"
20
21 #include <glib.h>
22
23 struct _ObActionValue;
24 struct _ObClient;
25
26 typedef struct _ObActionFilter ObActionFilter;
27 typedef struct _ObActionFilterFuncs ObActionFilterFuncs;
28 typedef enum _ObActionFilterDefault ObActionFilterDefault;
29
30 typedef gpointer (*ObActionFilterSetupFunc)(gboolean invert,
31                                             struct _ObActionValue *v);
32 typedef void (*ObActionFilterDestroyFunc)(gpointer data);
33
34 void action_filter_startup(gboolean reconfig);
35 void action_filter_shutdown(gboolean reconfig);
36
37 gboolean action_filter_register(const gchar *name,
38                                 ObActionFilterSetupFunc setup,
39                                 ObActionFilterDestroyFunc destroy,
40                                 ObClientSetReduceFunc reduce,
41                                 ObClientSetExpandFunc expand);
42
43 ObActionFilter* action_filter_new(const gchar *key, struct _ObActionValue *v);
44 void action_filter_ref(ObActionFilter *f);
45 void action_filter_unref(ObActionFilter *f);
46
47 void action_filter_expand(ObActionFilter *f, ObClientSet *set);
48 void action_filter_reduce(ObActionFilter *f, ObClientSet *set);