From dd9957769196f138262a7bad1a525ff174cc1df4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 2 Oct 2012 19:27:25 +0200 Subject: [PATCH] gtk: Put private functions in headers and include those This is part of a bunch of fixes for gcc complaining about -Wmissing-declarations. It puts functions into headers and includes those headers both where the functions are defined and where they function are used. --- gtk/fnmatch.c | 3 +++ gtk/gtkcustompaperunixdialog.h | 1 + gtk/gtkfilechooserdefault.h | 2 ++ gtk/gtknumerableicon.c | 1 + gtk/gtkpapersize.c | 6 ++++-- gtk/gtkprivatetypebuiltins.c.template | 1 + gtk/gtkroundedbox.c | 1 + gtk/gtkroundedboxprivate.h | 5 +++++ 8 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gtk/fnmatch.c b/gtk/fnmatch.c index f76a1c62d3..0031331cb1 100644 --- a/gtk/fnmatch.c +++ b/gtk/fnmatch.c @@ -28,6 +28,9 @@ */ #include "config.h" + +#include "gtkprivate.h" + #include #include diff --git a/gtk/gtkcustompaperunixdialog.h b/gtk/gtkcustompaperunixdialog.h index 2ffee1554a..9fcaff8414 100644 --- a/gtk/gtkcustompaperunixdialog.h +++ b/gtk/gtkcustompaperunixdialog.h @@ -58,6 +58,7 @@ GtkWidget * _gtk_custom_paper_unix_dialog_new (GtkWindow GtkUnit _gtk_print_get_default_user_units (void); void _gtk_print_load_custom_papers (GtkListStore *store); void _gtk_print_save_custom_papers (GtkListStore *store); +GList * _gtk_load_custom_papers (void); G_END_DECLS diff --git a/gtk/gtkfilechooserdefault.h b/gtk/gtkfilechooserdefault.h index 8b2f3f3ae1..3c90de2100 100644 --- a/gtk/gtkfilechooserdefault.h +++ b/gtk/gtkfilechooserdefault.h @@ -33,6 +33,8 @@ typedef struct _GtkFileChooserDefault GtkFileChooserDefault; GType _gtk_file_chooser_default_get_type (void) G_GNUC_CONST; GtkWidget *_gtk_file_chooser_default_new (void); +gchar * _gtk_file_chooser_label_for_file (GFile *file); + G_END_DECLS #endif /* __GTK_FILE_CHOOSER_DEFAULT_H__ */ diff --git a/gtk/gtknumerableicon.c b/gtk/gtknumerableicon.c index 3a1a6fad1c..a1131f576e 100644 --- a/gtk/gtknumerableicon.c +++ b/gtk/gtknumerableicon.c @@ -41,6 +41,7 @@ #include #include "gtknumerableicon.h" +#include "gtknumerableiconprivate.h" #include "gtkicontheme.h" #include "gtkintl.h" diff --git a/gtk/gtkpapersize.c b/gtk/gtkpapersize.c index c4e7e0cd85..1ab622e194 100644 --- a/gtk/gtkpapersize.c +++ b/gtk/gtkpapersize.c @@ -30,6 +30,10 @@ #include "gtkprintoperation.h" /* for GtkPrintError */ #include "gtkintl.h" +#ifdef G_OS_UNIX /* _gtk_load_custom_papers() only on Unix so far */ +#include "gtkcustompaperunixdialog.h" +#endif + #include "paper_names_offsets.c" @@ -454,8 +458,6 @@ gtk_paper_size_is_equal (GtkPaperSize *size1, gtk_paper_size_get_name (size2)) == 0; } -GList * _gtk_load_custom_papers (void); - /** * gtk_paper_size_get_paper_sizes: * @include_custom: whether to include custom paper sizes diff --git a/gtk/gtkprivatetypebuiltins.c.template b/gtk/gtkprivatetypebuiltins.c.template index 8f1034e195..b8db5a4385 100644 --- a/gtk/gtkprivatetypebuiltins.c.template +++ b/gtk/gtkprivatetypebuiltins.c.template @@ -1,6 +1,7 @@ /*** BEGIN file-header ***/ #include "gtk.h" #include "gtkprivate.h" +#include "gtkprivatetypebuiltins.h" /*** END file-header ***/ diff --git a/gtk/gtkroundedbox.c b/gtk/gtkroundedbox.c index 2b11982489..4aeffcde05 100644 --- a/gtk/gtkroundedbox.c +++ b/gtk/gtkroundedbox.c @@ -152,6 +152,7 @@ gtk_css_border_radius_grow (GtkRoundedBoxCorner *corner, corner->vertical = 0; } } + void _gtk_rounded_box_grow (GtkRoundedBox *box, double top, diff --git a/gtk/gtkroundedboxprivate.h b/gtk/gtkroundedboxprivate.h index 61b16e8217..a345a5c571 100644 --- a/gtk/gtkroundedboxprivate.h +++ b/gtk/gtkroundedboxprivate.h @@ -54,6 +54,11 @@ void _gtk_rounded_box_apply_border_radius_for_context (GtkRoundedBox GtkStyleContext *context, GtkJunctionSides junction); +void _gtk_rounded_box_grow (GtkRoundedBox *box, + double top, + double right, + double bottom, + double left); void _gtk_rounded_box_shrink (GtkRoundedBox *box, double top, double right,