]> Pileus Git - ~andy/gtk/blob - gtk/gtkbitmaskprivateimpl.h
bitmask: Split bitmask code into two
[~andy/gtk] / gtk / gtkbitmaskprivateimpl.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 #include "gtkallocatedbitmaskprivate.h"
22
23 static inline GtkBitmask *
24 _gtk_bitmask_new (void)
25 {
26   return _gtk_allocated_bitmask_new ();
27 }
28
29 static inline GtkBitmask *
30 _gtk_bitmask_copy (const GtkBitmask *mask)
31 {
32   return _gtk_allocated_bitmask_copy (mask);
33 }
34
35 static inline void
36 _gtk_bitmask_free (GtkBitmask *mask)
37 {
38   return _gtk_allocated_bitmask_free (mask);
39 }
40
41 static inline char *
42 _gtk_bitmask_to_string (const GtkBitmask *mask)
43 {
44   return _gtk_allocated_bitmask_to_string (mask);
45 }
46
47 static inline void
48 _gtk_bitmask_print (const GtkBitmask *mask,
49                     GString          *string)
50 {
51   return _gtk_allocated_bitmask_print (mask, string);
52 }
53
54 static inline GtkBitmask *
55 _gtk_bitmask_intersect (GtkBitmask       *mask,
56                         const GtkBitmask *other)
57 {
58   return _gtk_allocated_bitmask_intersect (mask, other);
59 }
60
61 static inline GtkBitmask *
62 _gtk_bitmask_union (GtkBitmask       *mask,
63                     const GtkBitmask *other)
64 {
65   return _gtk_allocated_bitmask_union (mask, other);
66 }
67
68 static inline GtkBitmask *
69 _gtk_bitmask_subtract (GtkBitmask       *mask,
70                        const GtkBitmask *other)
71 {
72   return _gtk_allocated_bitmask_subtract (mask, other);
73 }
74
75 static inline gboolean
76 _gtk_bitmask_get (const GtkBitmask *mask,
77                   guint             index_)
78 {
79   return _gtk_allocated_bitmask_get (mask, index_);
80 }
81
82 static inline GtkBitmask *
83 _gtk_bitmask_set (GtkBitmask *mask,
84                   guint       index_,
85                   gboolean    value)
86 {
87   return _gtk_allocated_bitmask_set (mask, index_, value);
88 }
89
90 static inline GtkBitmask *
91 _gtk_bitmask_invert_range (GtkBitmask *mask,
92                            guint       start,
93                            guint       end)
94 {
95   return _gtk_allocated_bitmask_invert_range (mask, start, end);
96 }
97
98 static inline gboolean
99 _gtk_bitmask_is_empty (const GtkBitmask *mask)
100 {
101   return _gtk_allocated_bitmask_is_empty (mask);
102 }
103
104 static inline gboolean
105 _gtk_bitmask_equals (const GtkBitmask *mask,
106                      const GtkBitmask *other)
107 {
108   return _gtk_allocated_bitmask_equals (mask, other);
109 }
110
111 static inline gboolean
112 _gtk_bitmask_intersects (const GtkBitmask *mask,
113                          const GtkBitmask *other)
114 {
115   return _gtk_allocated_bitmask_intersects (mask, other);
116 }