source: trunk/src/memphis-rule-set.h @ 151

Last change on this file since 151 was 151, checked in by simon, 5 years ago

Make cfgRules private

File size: 2.7 KB
Line 
1/*
2 * Memphis - Cairo Rederer for OSM in C
3 * Copyright (C) 2009  Simon Wenner <simon@wenner.ch>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20#ifndef _MEMPHIS_RULE_SET
21#define _MEMPHIS_RULE_SET
22
23#include <glib-object.h>
24#include "memphis-rule.h"
25
26G_BEGIN_DECLS
27
28#define MEMPHIS_TYPE_RULE_SET memphis_rule_set_get_type()
29
30#define MEMPHIS_RULE_SET(obj) \
31  (G_TYPE_CHECK_INSTANCE_CAST ((obj), MEMPHIS_TYPE_RULE_SET, MemphisRuleSet))
32
33#define MEMPHIS_RULE_SET_CLASS(klass) \
34  (G_TYPE_CHECK_CLASS_CAST ((klass), MEMPHIS_TYPE_RULE_SET, MemphisRuleSetClass))
35
36#define MEMPHIS_IS_RULE_SET(obj) \
37  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MEMPHIS_TYPE_RULE_SET))
38
39#define MEMPHIS_IS_RULE_SET_CLASS(klass) \
40  (G_TYPE_CHECK_CLASS_TYPE ((klass), MEMPHIS_TYPE_RULE_SET))
41
42#define MEMPHIS_RULE_SET_GET_CLASS(obj) \
43  (G_TYPE_INSTANCE_GET_CLASS ((obj), MEMPHIS_TYPE_RULE_SET, MemphisRuleSetClass))
44
45typedef struct {
46  GObject parent;
47} MemphisRuleSet;
48
49typedef struct {
50  GObjectClass parent_class;
51} MemphisRuleSetClass;
52
53GType memphis_rule_set_get_type (void);
54
55MemphisRuleSet* memphis_rule_set_new ();
56void memphis_rule_set_free (MemphisRuleSet *rules);
57
58void memphis_rule_set_load_from_file (MemphisRuleSet *rules,
59    const gchar *filename);
60void memphis_rule_set_load_from_data (MemphisRuleSet *rules,
61    const gchar *data,
62    guint size);
63
64void memphis_rule_set_set_debug_level (MemphisRuleSet *rules,
65    gint8 debug_level);
66
67gint8 memphis_rule_set_get_debug_level (MemphisRuleSet *rules);
68
69void memphis_rule_set_set_bg_color (MemphisRuleSet *rules,
70    guint16 r, guint16 g, guint16 b);
71void memphis_rule_set_get_bg_color (MemphisRuleSet *self,
72    guint16 *r, guint16 *g, guint16 *b);
73
74GList* memphis_rule_set_get_rule_ids (MemphisRuleSet *rules);
75
76void memphis_rule_set_set_rule (MemphisRuleSet *rules, MemphisRule *rule);
77MemphisRule* memphis_rule_set_get_rule (MemphisRuleSet *rules, const gchar *id);
78
79gboolean memphis_rule_set_remove_rule (MemphisRuleSet *rules, const gchar *id);
80
81G_END_DECLS
82
83#endif /* _MEMPHIS_RULE_SET */
84
Note: See TracBrowser for help on using the repository browser.