From 0d67a19173f69fa5ad121fa1f63734a3fa65dc02 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Sat, 23 Apr 2016 20:54:17 -0300 Subject: hiding-box: expose publicly, update macros This commit update the GtkHidingBox widget to 3.22 and exposes it publicly. --- gtk/Makefile.am | 2 +- gtk/gtkhidingbox.c | 2 +- gtk/gtkhidingbox.h | 78 +++++++++++++++++++++++++++++++++++++++++++++++ gtk/gtkhidingboxprivate.h | 77 ---------------------------------------------- 4 files changed, 80 insertions(+), 79 deletions(-) create mode 100644 gtk/gtkhidingbox.h delete mode 100644 gtk/gtkhidingboxprivate.h diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 009354b0df..6783afe8b7 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -215,6 +215,7 @@ gtk_public_h_sources = \ gtkglarea.h \ gtkgrid.h \ gtkheaderbar.h \ + gtkhidingbox.h \ gtkicontheme.h \ gtkiconview.h \ gtkimage.h \ @@ -486,7 +487,6 @@ gtk_private_h_sources = \ gtkgestureswipeprivate.h \ gtkgesturezoomprivate.h \ gtkheaderbarprivate.h \ - gtkhidingboxprivate.h \ gtkhslaprivate.h \ gtkiconcache.h \ gtkiconhelperprivate.h \ diff --git a/gtk/gtkhidingbox.c b/gtk/gtkhidingbox.c index 03113ed033..6c87b01894 100644 --- a/gtk/gtkhidingbox.c +++ b/gtk/gtkhidingbox.c @@ -24,7 +24,7 @@ #include "config.h" -#include "gtkhidingboxprivate.h" +#include "gtkhidingbox.h" #include "gtkwidgetprivate.h" #include "gtkintl.h" #include "gtksizerequest.h" diff --git a/gtk/gtkhidingbox.h b/gtk/gtkhidingbox.h new file mode 100644 index 0000000000..0bccfe80c5 --- /dev/null +++ b/gtk/gtkhidingbox.h @@ -0,0 +1,78 @@ +/* + * Copyright (C) 2015 Rafał Lużyński + * + * Licensed under the GNU General Public License Version 2 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + */ + +#ifndef __GTK_HIDING_BOX_PRIVATE_H__ +#define __GTK_HIDING_BOX_PRIVATE_H__ + +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + +#include + +G_BEGIN_DECLS + +#define GTK_TYPE_HIDING_BOX (gtk_hiding_box_get_type()) +#define GTK_HIDING_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HIDING_BOX, GtkHidingBox)) +#define GTK_HIDING_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HIDING_BOX, GtkHidingBoxClass)) +#define GTK_IS_HIDING_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HIDING_BOX)) +#define GTK_IS_HIDING_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HIDING_BOX) +#define GTK_HIDING_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HIDING_BOX, GtkHidingBoxClass)) + +typedef struct _GtkHidingBox GtkHidingBox; +typedef struct _GtkHidingBoxClass GtkHidingBoxClass; +typedef struct _GtkHidingBoxPrivate GtkHidingBoxPrivate; + +struct _GtkHidingBoxClass +{ + GtkContainerClass parent; + + /* Padding for future expansion */ + gpointer reserved[10]; +}; + +struct _GtkHidingBox +{ + GtkContainer parent_instance; +}; + +GDK_AVAILABLE_IN_3_22 +GType gtk_hiding_box_get_type (void) G_GNUC_CONST; + +GDK_AVAILABLE_IN_3_22 +GtkWidget *gtk_hiding_box_new (void); + +GDK_AVAILABLE_IN_3_22 +void gtk_hiding_box_set_spacing (GtkHidingBox *box, + gint spacing); +GDK_AVAILABLE_IN_3_22 +gint gtk_hiding_box_get_spacing (GtkHidingBox *box); + +GDK_AVAILABLE_IN_3_22 +void gtk_hiding_box_set_inverted (GtkHidingBox *box, + gboolean inverted); +GDK_AVAILABLE_IN_3_22 +gboolean gtk_hiding_box_get_inverted (GtkHidingBox *box); + +GDK_AVAILABLE_IN_3_22 +GList *gtk_hiding_box_get_overflow_children (GtkHidingBox *box); +G_END_DECLS + +#endif /* GTK_HIDING_BOX_PRIVATE_H_ */ diff --git a/gtk/gtkhidingboxprivate.h b/gtk/gtkhidingboxprivate.h deleted file mode 100644 index b44dc55701..0000000000 --- a/gtk/gtkhidingboxprivate.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2015 Rafał Lużyński - * - * Licensed under the GNU General Public License Version 2 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#ifndef __GTK_HIDING_BOX_PRIVATE_H__ -#define __GTK_HIDING_BOX_PRIVATE_H__ - -#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) -#error "Only can be included directly." -#endif - -#include - -G_BEGIN_DECLS - -#define GTK_TYPE_HIDING_BOX (gtk_hiding_box_get_type()) -#define GTK_HIDING_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_HIDING_BOX, GtkHidingBox)) -#define GTK_HIDING_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_HIDING_BOX, GtkHidingBoxClass)) -#define GTK_IS_HIDING_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_HIDING_BOX)) -#define GTK_IS_HIDING_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_HIDING_BOX) -#define GTK_HIDING_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_HIDING_BOX, GtkHidingBoxClass)) - -typedef struct _GtkHidingBox GtkHidingBox; -typedef struct _GtkHidingBoxClass GtkHidingBoxClass; -typedef struct _GtkHidingBoxPrivate GtkHidingBoxPrivate; - -struct _GtkHidingBoxClass -{ - GtkContainerClass parent; - - /* Padding for future expansion */ - gpointer reserved[10]; -}; - -struct _GtkHidingBox -{ - GtkContainer parent_instance; -}; - -GDK_AVAILABLE_IN_3_20 -GType gtk_hiding_box_get_type (void) G_GNUC_CONST; - -GDK_AVAILABLE_IN_3_20 -GtkWidget *gtk_hiding_box_new (void); -GDK_AVAILABLE_IN_3_20 -void gtk_hiding_box_set_spacing (GtkHidingBox *box, - gint spacing); -GDK_AVAILABLE_IN_3_20 -gint gtk_hiding_box_get_spacing (GtkHidingBox *box); - -GDK_AVAILABLE_IN_3_20 -void gtk_hiding_box_set_inverted (GtkHidingBox *box, - gboolean inverted); -GDK_AVAILABLE_IN_3_20 -gboolean gtk_hiding_box_get_inverted (GtkHidingBox *box); - -GDK_AVAILABLE_IN_3_20 -GList *gtk_hiding_box_get_overflow_children (GtkHidingBox *box); -G_END_DECLS - -#endif /* GTK_HIDING_BOX_PRIVATE_H_ */ -- cgit v1.2.1