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, see <http://www.gnu.org/licenses/>. |
16 | * |
17 | * Authors: Benjamin Otte <otte@gnome.org> |
18 | */ |
19 | |
20 | #ifndef __GTK_BITMASK_PRIVATE_H__ |
21 | #define __GTK_BITMASK_PRIVATE_H__ |
22 | |
23 | #include <glib.h> |
24 | #include "gtkallocatedbitmaskprivate.h" |
25 | |
26 | G_BEGIN_DECLS |
27 | |
28 | static inline GtkBitmask * _gtk_bitmask_new (void); |
29 | static inline GtkBitmask * _gtk_bitmask_copy (const GtkBitmask *mask); |
30 | static inline void _gtk_bitmask_free (GtkBitmask *mask); |
31 | |
32 | static inline char * _gtk_bitmask_to_string (const GtkBitmask *mask); |
33 | static inline void _gtk_bitmask_print (const GtkBitmask *mask, |
34 | GString *string); |
35 | |
36 | static inline GtkBitmask * _gtk_bitmask_intersect (GtkBitmask *mask, |
37 | const GtkBitmask *other) G_GNUC_WARN_UNUSED_RESULT; |
38 | static inline GtkBitmask * _gtk_bitmask_union (GtkBitmask *mask, |
39 | const GtkBitmask *other) G_GNUC_WARN_UNUSED_RESULT; |
40 | static inline GtkBitmask * _gtk_bitmask_subtract (GtkBitmask *mask, |
41 | const GtkBitmask *other) G_GNUC_WARN_UNUSED_RESULT; |
42 | |
43 | static inline gboolean _gtk_bitmask_get (const GtkBitmask *mask, |
44 | guint index_); |
45 | static inline GtkBitmask * _gtk_bitmask_set (GtkBitmask *mask, |
46 | guint index_, |
47 | gboolean value) G_GNUC_WARN_UNUSED_RESULT; |
48 | |
49 | static inline GtkBitmask * _gtk_bitmask_invert_range (GtkBitmask *mask, |
50 | guint start, |
51 | guint end) G_GNUC_WARN_UNUSED_RESULT; |
52 | |
53 | static inline gboolean _gtk_bitmask_is_empty (const GtkBitmask *mask); |
54 | static inline gboolean _gtk_bitmask_equals (const GtkBitmask *mask, |
55 | const GtkBitmask *other); |
56 | static inline gboolean _gtk_bitmask_intersects (const GtkBitmask *mask, |
57 | const GtkBitmask *other); |
58 | |
59 | |
60 | /* This is the actual implementation of the functions declared above. |
61 | * We put it in a separate file so people don’t get scared from looking at this |
62 | * file when reading source code. |
63 | */ |
64 | #include "gtkbitmaskprivateimpl.h" |
65 | |
66 | |
67 | G_END_DECLS |
68 | |
69 | #endif /* __GTK_BITMASK_PRIVATE_H__ */ |
70 | |