From e1f4bd6495055b85e16e0a1d905d76b4da42e906 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 8 Nov 2011 20:22:57 +0100 Subject: [PATCH] gtk: Empty gtkimmodule.h Move the remaining struct definition into gtkimcontextinfo.h and include that header in gtk.h. gtkimmodule.h is now an empty header. We should probably deprecate it somehow. This is also necessary so headers used in gtk .c files don't include gtk.h which in turn includes all the deprecated headers which we want to avoid so we can include them with deprecation warnings turned off. --- gtk/Makefile.am | 1 + gtk/gtk.h | 1 + gtk/gtkimcontextinfo.h | 46 ++++++++++++++++++++++++++++++++++++++++ gtk/gtkimmodule.c | 1 - gtk/gtkimmodule.h | 15 ------------- gtk/gtkimmoduleprivate.h | 3 ++- gtk/gtkimmulticontext.c | 1 - 7 files changed, 50 insertions(+), 18 deletions(-) create mode 100644 gtk/gtkimcontextinfo.h diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 57f7fa184e..4d9aa7c903 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -249,6 +249,7 @@ gtk_public_h_sources = \ gtkimage.h \ gtkimagemenuitem.h \ gtkimcontext.h \ + gtkimcontextinfo.h \ gtkimcontextsimple.h \ gtkimmodule.h \ gtkimmulticontext.h \ diff --git a/gtk/gtk.h b/gtk/gtk.h index 121df5e3ce..fdba38201f 100644 --- a/gtk/gtk.h +++ b/gtk/gtk.h @@ -114,6 +114,7 @@ #include #include #include +#include #include #include #include diff --git a/gtk/gtkimcontextinfo.h b/gtk/gtkimcontextinfo.h new file mode 100644 index 0000000000..7c5f66c783 --- /dev/null +++ b/gtk/gtkimcontextinfo.h @@ -0,0 +1,46 @@ +/* GTK - The GIMP Toolkit + * Copyright (C) 2000 Red Hat Software + * + * 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 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) +#error "Only can be included directly." +#endif + +#ifndef __GTK_IM_CONTEXT_INFO_H__ +#define __GTK_IM_CONTEXT_INFO_H__ + + +#include + +G_BEGIN_DECLS + +typedef struct _GtkIMContextInfo GtkIMContextInfo; + +struct _GtkIMContextInfo +{ + const gchar *context_id; + const gchar *context_name; + const gchar *domain; + const gchar *domain_dirname; + const gchar *default_locales; +}; + + +G_END_DECLS + +#endif /* __GTK_IM_CONTEXT_INFO_H__ */ diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index 4b38d6872d..fc90c227da 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -32,7 +32,6 @@ #include #include -#include "gtkimmodule.h" #include "gtkimmoduleprivate.h" #include "gtkimcontextsimple.h" #include "gtksettings.h" diff --git a/gtk/gtkimmodule.h b/gtk/gtkimmodule.h index 750e603506..e2f195a609 100644 --- a/gtk/gtkimmodule.h +++ b/gtk/gtkimmodule.h @@ -22,19 +22,6 @@ #include -G_BEGIN_DECLS - -typedef struct _GtkIMContextInfo GtkIMContextInfo; - -struct _GtkIMContextInfo -{ - const gchar *context_id; - const gchar *context_name; - const gchar *domain; - const gchar *domain_dirname; - const gchar *default_locales; -}; - /* The following entry points are exported by each input method module */ @@ -46,6 +33,4 @@ void im_module_exit (void); GtkIMContext *im_module_create (const gchar *context_id); */ -G_END_DECLS - #endif /* __GTK_IM_MODULE_H__ */ diff --git a/gtk/gtkimmoduleprivate.h b/gtk/gtkimmoduleprivate.h index d559c285e7..7d673737f1 100644 --- a/gtk/gtkimmoduleprivate.h +++ b/gtk/gtkimmoduleprivate.h @@ -21,7 +21,8 @@ #define __GTK_IM_MODULE_PRIVATE_H__ #include -#include +#include +#include G_BEGIN_DECLS diff --git a/gtk/gtkimmulticontext.c b/gtk/gtkimmulticontext.c index c88294e53f..66f309eb4c 100644 --- a/gtk/gtkimmulticontext.c +++ b/gtk/gtkimmulticontext.c @@ -23,7 +23,6 @@ #include #include "gtkimmulticontext.h" -#include "gtkimmodule.h" #include "gtkimmoduleprivate.h" #include "gtklabel.h" #include "gtkmain.h"