]> icculus.org git repositories - dana/openbox.git/blob - openbox/action_value.h
Rename ObActions* to ObAction* and remove more 3.4-compat action stuff that was missed.
[dana/openbox.git] / openbox / action_value.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    action_value.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 <glib.h>
20
21 struct _GravityCoord;
22 struct _ObActionList;
23
24 typedef struct _ObActionValue ObActionValue;
25
26 /*! Creates a new value by making a copy of the given string. */
27 ObActionValue* action_value_new_string(const gchar *s);
28 /*! Creates a new value from a string, and steals ownership of the string. It
29   will be freed when then value is destroyed. */
30 ObActionValue* action_value_new_string_steal(gchar *s);
31 /*! Creates a new value with a given actions list. */
32 ObActionValue* action_value_new_action_list(struct _ObActionList *al);
33
34 void action_value_ref(ObActionValue *v);
35 void action_value_unref(ObActionValue *v);
36
37 gboolean action_value_is_string(ObActionValue *v);
38 gboolean action_value_is_action_list(ObActionValue *v);
39
40 const gchar* action_value_string(ObActionValue *v);
41 gboolean action_value_bool(ObActionValue *v);
42 gint action_value_int(ObActionValue *v);
43 void action_value_fraction(ObActionValue *v, gint *numer, gint *denom);
44 void action_value_gravity_coord(ObActionValue *v, struct _GravityCoord *c);
45 struct _ObActionList* action_value_action_list(ObActionValue *v);