]> Pileus Git - ~andy/gtk/blob - gtk/gtkbitmaskprivate.h
adb65cff595144f0bbbde940e4b5ceac7e8895bd
[~andy/gtk] / gtk / gtkbitmaskprivate.h
1 /*
2  * Copyright © 2011 Red Hat Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  *
18  * Authors: Benjamin Otte <otte@gnome.org>
19  */
20
21 #ifndef __GTK_BITMASK_PRIVATE_H__
22 #define __GTK_BITMASK_PRIVATE_H__
23
24 #include <glib.h>
25
26 G_BEGIN_DECLS
27
28 #ifdef GTK_INSIDE_BITMASK_C
29 typedef GArray GtkBitmask;
30 #else
31 typedef struct _GtkBitmask           GtkBitmask;
32 #endif
33
34
35 GtkBitmask *   _gtk_bitmask_new                  (void);
36 GtkBitmask *   _gtk_bitmask_copy                 (const GtkBitmask  *mask);
37 void           _gtk_bitmask_free                 (GtkBitmask        *mask);
38
39 char *         _gtk_bitmask_to_string            (const GtkBitmask  *mask);
40 void           _gtk_bitmask_print                (const GtkBitmask  *mask,
41                                                   GString           *string);
42
43 void           _gtk_bitmask_intersect            (GtkBitmask        *mask,
44                                                   const GtkBitmask  *other);
45 void           _gtk_bitmask_union                (GtkBitmask        *mask,
46                                                   const GtkBitmask  *other);
47 void           _gtk_bitmask_subtract             (GtkBitmask        *mask,
48                                                   const GtkBitmask  *other);
49
50 gboolean       _gtk_bitmask_get                  (const GtkBitmask  *mask,
51                                                   guint              index_);
52 void           _gtk_bitmask_set                  (GtkBitmask        *mask,
53                                                   guint              index_,
54                                                   gboolean           value);
55
56 void           _gtk_bitmask_invert_range         (GtkBitmask        *mask,
57                                                   guint              start,
58                                                   guint              end);
59
60 gboolean       _gtk_bitmask_is_empty             (const GtkBitmask  *mask);
61 gboolean       _gtk_bitmask_equals               (const GtkBitmask  *mask,
62                                                   const GtkBitmask  *other);
63 gboolean       _gtk_bitmask_intersects           (const GtkBitmask  *mask,
64                                                   const GtkBitmask  *other);
65
66 G_END_DECLS
67
68 #endif /* __GTK_BITMASK_PRIVATE_H__ */