From: Dana Jansens Date: Fri, 29 Jul 2011 20:01:11 +0000 (-0400) Subject: Use ObClientSet objects in the filter system, so filters work on these sets. X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=8ca43c373d7429d1d61a0bf312d33850f0a1d446;p=dana%2Fopenbox.git Use ObClientSet objects in the filter system, so filters work on these sets. --- diff --git a/openbox/action_filter.c b/openbox/action_filter.c index 7451e257..bdd0f6a3 100644 --- a/openbox/action_filter.c +++ b/openbox/action_filter.c @@ -141,16 +141,14 @@ void action_filter_unref(ObActionFilter *f) } } -void action_filter_expand(ObActionFilter *f, GHashTable *client_set) +void action_filter_expand(ObActionFilter *f, struct _ObClientSet *set) { g_return_if_fail(f != NULL); - g_return_if_fail(client_set != NULL); - return f->def->expand(client_set); + return f->def->expand(set); } -void action_filter_reduce(ObActionFilter *f, GHashTable *client_set) +void action_filter_reduce(ObActionFilter *f, struct _ObClientSet *set) { g_return_if_fail(f != NULL); - g_return_if_fail(client_set != NULL); - return f->def->reduce(client_set); + return f->def->reduce(set); } diff --git a/openbox/action_filter.h b/openbox/action_filter.h index ff2e99a4..31184b03 100644 --- a/openbox/action_filter.h +++ b/openbox/action_filter.h @@ -20,6 +20,7 @@ struct _ObActionValue; struct _ObClient; +struct _ObClientSet; typedef struct _ObActionFilter ObActionFilter; typedef struct _ObActionFilterFuncs ObActionFilterFuncs; @@ -30,11 +31,11 @@ typedef void (*ObActionFilterDestroyFunc)(gpointer data); /*! Runs the filter and modifies the client set as appropriate. This function is given a set of clients and may simply remove clients that do not match its criteria. */ -typedef void (*ObActionFilterReduceFunc)(GHashTable *client_set); +typedef void (*ObActionFilterReduceFunc)(struct _ObClientSet *set); /*! Runs the filter and creates a new client set as appropriate. This function is given a set of clients and must add all unlisted clients possible that match its criteria. */ -typedef void (*ObActionFilterExpandFunc)(GHashTable *client_set); +typedef void (*ObActionFilterExpandFunc)(struct _ObClientSet *set); void action_filter_startup(gboolean reconfig); void action_filter_shutdown(gboolean reconfig); @@ -49,5 +50,5 @@ ObActionFilter* action_filter_new(const gchar *key, struct _ObActionValue *v); void action_filter_ref(ObActionFilter *f); void action_filter_unref(ObActionFilter *f); -void action_filter_expand(ObActionFilter *f, GHashTable *client_set); -void action_filter_reduce(ObActionFilter *f, GHashTable *client_set); +void action_filter_expand(ObActionFilter *f, struct _ObClientSet *set); +void action_filter_reduce(ObActionFilter *f, struct _ObClientSet *set);