diff options
author | Benjamin Otte <otte@redhat.com> | 2012-02-09 01:44:59 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-03-01 15:10:36 +0100 |
commit | 27eb83a4101adb608949cebebe59c307627d1e9e (patch) | |
tree | b0a80be9a2225cef97ee039ca289660a7e8dd6fa /gtk/gtkbitmaskprivateimpl.h | |
parent | 904cf36a5d75827265dbe7e65ab9f8871730be52 (diff) | |
download | gtk+-27eb83a4101adb608949cebebe59c307627d1e9e.tar.gz |
bitmask: Split bitmask code into two
This does nothing but turn all GtkBitmask functions into static inline
functions that call the gtk_allocated_bitmask_*() equivalent.
The implementation of the static functions has also been put into a
private header, to not scare people who want to see how things are
implemented.
Diffstat (limited to 'gtk/gtkbitmaskprivateimpl.h')
-rw-r--r-- | gtk/gtkbitmaskprivateimpl.h | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/gtk/gtkbitmaskprivateimpl.h b/gtk/gtkbitmaskprivateimpl.h new file mode 100644 index 0000000000..365d438e3d --- /dev/null +++ b/gtk/gtkbitmaskprivateimpl.h @@ -0,0 +1,116 @@ +/* + * Copyright © 2011 Red Hat Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * Authors: Benjamin Otte <otte@gnome.org> + */ + +#include "gtkallocatedbitmaskprivate.h" + +static inline GtkBitmask * +_gtk_bitmask_new (void) +{ + return _gtk_allocated_bitmask_new (); +} + +static inline GtkBitmask * +_gtk_bitmask_copy (const GtkBitmask *mask) +{ + return _gtk_allocated_bitmask_copy (mask); +} + +static inline void +_gtk_bitmask_free (GtkBitmask *mask) +{ + return _gtk_allocated_bitmask_free (mask); +} + +static inline char * +_gtk_bitmask_to_string (const GtkBitmask *mask) +{ + return _gtk_allocated_bitmask_to_string (mask); +} + +static inline void +_gtk_bitmask_print (const GtkBitmask *mask, + GString *string) +{ + return _gtk_allocated_bitmask_print (mask, string); +} + +static inline GtkBitmask * +_gtk_bitmask_intersect (GtkBitmask *mask, + const GtkBitmask *other) +{ + return _gtk_allocated_bitmask_intersect (mask, other); +} + +static inline GtkBitmask * +_gtk_bitmask_union (GtkBitmask *mask, + const GtkBitmask *other) +{ + return _gtk_allocated_bitmask_union (mask, other); +} + +static inline GtkBitmask * +_gtk_bitmask_subtract (GtkBitmask *mask, + const GtkBitmask *other) +{ + return _gtk_allocated_bitmask_subtract (mask, other); +} + +static inline gboolean +_gtk_bitmask_get (const GtkBitmask *mask, + guint index_) +{ + return _gtk_allocated_bitmask_get (mask, index_); +} + +static inline GtkBitmask * +_gtk_bitmask_set (GtkBitmask *mask, + guint index_, + gboolean value) +{ + return _gtk_allocated_bitmask_set (mask, index_, value); +} + +static inline GtkBitmask * +_gtk_bitmask_invert_range (GtkBitmask *mask, + guint start, + guint end) +{ + return _gtk_allocated_bitmask_invert_range (mask, start, end); +} + +static inline gboolean +_gtk_bitmask_is_empty (const GtkBitmask *mask) +{ + return _gtk_allocated_bitmask_is_empty (mask); +} + +static inline gboolean +_gtk_bitmask_equals (const GtkBitmask *mask, + const GtkBitmask *other) +{ + return _gtk_allocated_bitmask_equals (mask, other); +} + +static inline gboolean +_gtk_bitmask_intersects (const GtkBitmask *mask, + const GtkBitmask *other) +{ + return _gtk_allocated_bitmask_intersects (mask, other); +} |