[gspell] Use -export-dynamic LDFLAG
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell] Use -export-dynamic LDFLAG
- Date: Wed, 5 Apr 2017 14:03:40 +0000 (UTC)
commit 5ccf04e735c9248c9f13f5ee4dd46ea684c85cf8
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Apr 5 15:25:20 2017 +0200
Use -export-dynamic LDFLAG
A first step to have better MS Windows support (be able to compile
gspell in Visual Studio).
https://bugzilla.gnome.org/show_bug.cgi?id=761921
docs/reference/Makefile.am | 3 +-
gspell/Makefile.am | 5 ++-
gspell/gspell-checker-dialog.h | 5 +++
gspell/gspell-checker.h | 13 +++++++++
gspell/gspell-entry-buffer.h | 7 +++++
gspell/gspell-entry.h | 8 ++++++
gspell/gspell-enum-types.h.template | 3 ++
gspell/gspell-language-chooser-button.h | 4 +++
gspell/gspell-language-chooser-dialog.h | 4 +++
gspell/gspell-language-chooser.h | 7 +++++
gspell/gspell-language.h | 10 +++++++
gspell/gspell-navigator-text-view.h | 5 +++
gspell/gspell-navigator.h | 6 ++++
gspell/gspell-text-buffer.h | 7 +++++
gspell/gspell-text-view.h | 10 +++++++
gspell/gspell-version.h | 43 +++++++++++++++++++++++++++++++
gspell/gspell.h | 1 +
17 files changed, 138 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index e420954..d9c2fd2 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -40,7 +40,8 @@ IGNORE_HFILES = \
gspell-inline-checker-text-buffer.h \
gspell-osx.h \
gspell-text-iter.h \
- gspell-utils.h
+ gspell-utils.h \
+ gspell-version.h
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS = --xml-mode --output-format=xml
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index 076a9fd..009bad7 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -26,7 +26,8 @@ gspell_public_headers = \
gspell-navigator.h \
gspell-navigator-text-view.h \
gspell-text-buffer.h \
- gspell-text-view.h
+ gspell-text-view.h \
+ gspell-version.h
gspell_public_c_files = \
gspell-checker.c \
@@ -117,7 +118,7 @@ libgspell_@GSPELL_API_VERSION@_la_CFLAGS = \
libgspell_@GSPELL_API_VERSION@_la_LDFLAGS = \
-version-info $(GSPELL_LT_VERSION) \
-no-undefined \
- -export-symbols-regex "^gspell_.*" \
+ -export-dynamic \
$(WARN_LDFLAGS)
libgspell_includedir = $(includedir)/gspell-@GSPELL_API_VERSION@/gspell
diff --git a/gspell/gspell-checker-dialog.h b/gspell/gspell-checker-dialog.h
index 45d66ad..7912573 100644
--- a/gspell/gspell-checker-dialog.h
+++ b/gspell/gspell-checker-dialog.h
@@ -27,10 +27,13 @@
#include <gtk/gtk.h>
#include <gspell/gspell-navigator.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_CHECKER_DIALOG (gspell_checker_dialog_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellCheckerDialog, gspell_checker_dialog,
GSPELL, CHECKER_DIALOG,
GtkDialog)
@@ -43,9 +46,11 @@ struct _GspellCheckerDialogClass
gpointer padding[8];
};
+GSPELL_AVAILABLE_IN_ALL
GtkWidget * gspell_checker_dialog_new (GtkWindow *parent,
GspellNavigator *navigator);
+GSPELL_AVAILABLE_IN_ALL
GspellNavigator * gspell_checker_dialog_get_spell_navigator (GspellCheckerDialog *dialog);
G_END_DECLS
diff --git a/gspell/gspell-checker.h b/gspell/gspell-checker.h
index 9fee9fa..fc94a56 100644
--- a/gspell/gspell-checker.h
+++ b/gspell/gspell-checker.h
@@ -27,10 +27,13 @@
#include <glib-object.h>
#include <gspell/gspell-language.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_CHECKER (gspell_checker_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellChecker, gspell_checker,
GSPELL, CHECKER,
GObject)
@@ -75,35 +78,45 @@ struct _GspellCheckerClass
gpointer padding[12];
};
+GSPELL_AVAILABLE_IN_ALL
GQuark gspell_checker_error_quark (void);
+GSPELL_AVAILABLE_IN_ALL
GspellChecker * gspell_checker_new (const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
void gspell_checker_set_language (GspellChecker *checker,
const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
const GspellLanguage *
gspell_checker_get_language (GspellChecker *checker);
+GSPELL_AVAILABLE_IN_ALL
gboolean gspell_checker_check_word (GspellChecker *checker,
const gchar *word,
gssize word_length,
GError **error);
+GSPELL_AVAILABLE_IN_ALL
GSList * gspell_checker_get_suggestions (GspellChecker *checker,
const gchar *word,
gssize word_length);
+GSPELL_AVAILABLE_IN_ALL
void gspell_checker_add_word_to_personal (GspellChecker *checker,
const gchar *word,
gssize word_length);
+GSPELL_AVAILABLE_IN_ALL
void gspell_checker_add_word_to_session (GspellChecker *checker,
const gchar *word,
gssize word_length);
+GSPELL_AVAILABLE_IN_ALL
void gspell_checker_clear_session (GspellChecker *checker);
+GSPELL_AVAILABLE_IN_ALL
void gspell_checker_set_correction (GspellChecker *checker,
const gchar *word,
gssize word_length,
diff --git a/gspell/gspell-entry-buffer.h b/gspell/gspell-entry-buffer.h
index adb1736..73d85fd 100644
--- a/gspell/gspell-entry-buffer.h
+++ b/gspell/gspell-entry-buffer.h
@@ -25,21 +25,28 @@
#endif
#include <gspell/gspell-checker.h>
+#include <gspell/gspell-version.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_ENTRY_BUFFER (gspell_entry_buffer_get_type ())
+
+GSPELL_AVAILABLE_IN_1_4
G_DECLARE_FINAL_TYPE (GspellEntryBuffer, gspell_entry_buffer,
GSPELL, ENTRY_BUFFER,
GObject)
+GSPELL_AVAILABLE_IN_1_4
GspellEntryBuffer * gspell_entry_buffer_get_from_gtk_entry_buffer (GtkEntryBuffer *gtk_buffer);
+GSPELL_AVAILABLE_IN_1_4
GtkEntryBuffer * gspell_entry_buffer_get_buffer (GspellEntryBuffer *gspell_buffer);
+GSPELL_AVAILABLE_IN_1_4
GspellChecker * gspell_entry_buffer_get_spell_checker (GspellEntryBuffer
*gspell_buffer);
+GSPELL_AVAILABLE_IN_1_4
void gspell_entry_buffer_set_spell_checker (GspellEntryBuffer *gspell_buffer,
GspellChecker *spell_checker);
diff --git a/gspell/gspell-entry.h b/gspell/gspell-entry.h
index d7f1671..bd225ef 100644
--- a/gspell/gspell-entry.h
+++ b/gspell/gspell-entry.h
@@ -25,22 +25,30 @@
#endif
#include <gtk/gtk.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_ENTRY (gspell_entry_get_type ())
+
+GSPELL_AVAILABLE_IN_1_4
G_DECLARE_FINAL_TYPE (GspellEntry, gspell_entry,
GSPELL, ENTRY,
GObject)
+GSPELL_AVAILABLE_IN_1_4
GspellEntry * gspell_entry_get_from_gtk_entry (GtkEntry *gtk_entry);
+GSPELL_AVAILABLE_IN_1_4
void gspell_entry_basic_setup (GspellEntry *gspell_entry);
+GSPELL_AVAILABLE_IN_1_4
GtkEntry * gspell_entry_get_entry (GspellEntry *gspell_entry);
+GSPELL_AVAILABLE_IN_1_4
gboolean gspell_entry_get_inline_spell_checking (GspellEntry *gspell_entry);
+GSPELL_AVAILABLE_IN_1_4
void gspell_entry_set_inline_spell_checking (GspellEntry *gspell_entry,
gboolean enable);
diff --git a/gspell/gspell-enum-types.h.template b/gspell/gspell-enum-types.h.template
index 7e83963..c76c4ae 100644
--- a/gspell/gspell-enum-types.h.template
+++ b/gspell/gspell-enum-types.h.template
@@ -7,6 +7,7 @@
#endif
#include <glib-object.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
@@ -19,6 +20,8 @@ G_BEGIN_DECLS
/*** BEGIN enumeration-production ***/
#define GSPELL_TYPE_@ENUMSHORT@ (@enum_name@_get_type())
+
+GSPELL_EXTERN
GType @enum_name@_get_type (void);
/*** END enumeration-production ***/
diff --git a/gspell/gspell-language-chooser-button.h b/gspell/gspell-language-chooser-button.h
index 1d97753..5dd9204 100644
--- a/gspell/gspell-language-chooser-button.h
+++ b/gspell/gspell-language-chooser-button.h
@@ -26,10 +26,13 @@
#include <gtk/gtk.h>
#include <gspell/gspell-language.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_LANGUAGE_CHOOSER_BUTTON (gspell_language_chooser_button_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellLanguageChooserButton, gspell_language_chooser_button,
GSPELL, LANGUAGE_CHOOSER_BUTTON,
GtkButton)
@@ -42,6 +45,7 @@ struct _GspellLanguageChooserButtonClass
gpointer padding[8];
};
+GSPELL_AVAILABLE_IN_ALL
GtkWidget * gspell_language_chooser_button_new (const GspellLanguage *current_language);
G_END_DECLS
diff --git a/gspell/gspell-language-chooser-dialog.h b/gspell/gspell-language-chooser-dialog.h
index 24c5dda..39278b6 100644
--- a/gspell/gspell-language-chooser-dialog.h
+++ b/gspell/gspell-language-chooser-dialog.h
@@ -27,10 +27,13 @@
#include <gtk/gtk.h>
#include <gspell/gspell-language.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_LANGUAGE_CHOOSER_DIALOG (gspell_language_chooser_dialog_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellLanguageChooserDialog, gspell_language_chooser_dialog,
GSPELL, LANGUAGE_CHOOSER_DIALOG,
GtkDialog)
@@ -43,6 +46,7 @@ struct _GspellLanguageChooserDialogClass
gpointer padding[8];
};
+GSPELL_AVAILABLE_IN_ALL
GtkWidget * gspell_language_chooser_dialog_new (GtkWindow *parent,
const GspellLanguage *current_language,
GtkDialogFlags flags);
diff --git a/gspell/gspell-language-chooser.h b/gspell/gspell-language-chooser.h
index 53a33e8..ed24fd5 100644
--- a/gspell/gspell-language-chooser.h
+++ b/gspell/gspell-language-chooser.h
@@ -26,10 +26,13 @@
#include <glib-object.h>
#include <gspell/gspell-language.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_LANGUAGE_CHOOSER (gspell_language_chooser_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (GspellLanguageChooser, gspell_language_chooser,
GSPELL, LANGUAGE_CHOOSER,
GObject)
@@ -48,13 +51,17 @@ struct _GspellLanguageChooserInterface
const GspellLanguage *language);
};
+GSPELL_AVAILABLE_IN_ALL
const GspellLanguage * gspell_language_chooser_get_language (GspellLanguageChooser *chooser);
+GSPELL_AVAILABLE_IN_ALL
void gspell_language_chooser_set_language (GspellLanguageChooser *chooser,
const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
const gchar * gspell_language_chooser_get_language_code (GspellLanguageChooser *chooser);
+GSPELL_AVAILABLE_IN_ALL
void gspell_language_chooser_set_language_code (GspellLanguageChooser *chooser,
const gchar
*language_code);
diff --git a/gspell/gspell-language.h b/gspell/gspell-language.h
index 83c8f69..1d83d19 100644
--- a/gspell/gspell-language.h
+++ b/gspell/gspell-language.h
@@ -32,6 +32,7 @@
#endif
#include <glib-object.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
@@ -39,25 +40,34 @@ typedef struct _GspellLanguage GspellLanguage;
#define GSPELL_TYPE_LANGUAGE (gspell_language_get_type ())
+GSPELL_AVAILABLE_IN_ALL
GType gspell_language_get_type (void) G_GNUC_CONST;
+GSPELL_AVAILABLE_IN_ALL
const GList * gspell_language_get_available (void);
+GSPELL_AVAILABLE_IN_ALL
const GspellLanguage *
gspell_language_get_default (void);
+GSPELL_AVAILABLE_IN_ALL
const GspellLanguage *
gspell_language_lookup (const gchar *language_code);
+GSPELL_AVAILABLE_IN_ALL
const gchar * gspell_language_get_code (const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
const gchar * gspell_language_get_name (const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
gint gspell_language_compare (const GspellLanguage *language_a,
const GspellLanguage *language_b);
+GSPELL_AVAILABLE_IN_ALL
GspellLanguage *gspell_language_copy (const GspellLanguage *language);
+GSPELL_AVAILABLE_IN_ALL
void gspell_language_free (GspellLanguage *language);
G_END_DECLS
diff --git a/gspell/gspell-navigator-text-view.h b/gspell/gspell-navigator-text-view.h
index c903983..53cfd78 100644
--- a/gspell/gspell-navigator-text-view.h
+++ b/gspell/gspell-navigator-text-view.h
@@ -27,10 +27,13 @@
#include <gtk/gtk.h>
#include <gspell/gspell-navigator.h>
#include <gspell/gspell-checker.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_NAVIGATOR_TEXT_VIEW (gspell_navigator_text_view_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellNavigatorTextView, gspell_navigator_text_view,
GSPELL, NAVIGATOR_TEXT_VIEW,
GInitiallyUnowned)
@@ -43,8 +46,10 @@ struct _GspellNavigatorTextViewClass
gpointer padding[8];
};
+GSPELL_AVAILABLE_IN_ALL
GspellNavigator * gspell_navigator_text_view_new (GtkTextView *view);
+GSPELL_AVAILABLE_IN_ALL
GtkTextView * gspell_navigator_text_view_get_view (GspellNavigatorTextView *navigator);
G_END_DECLS
diff --git a/gspell/gspell-navigator.h b/gspell/gspell-navigator.h
index 9a69877..211abf6 100644
--- a/gspell/gspell-navigator.h
+++ b/gspell/gspell-navigator.h
@@ -26,10 +26,13 @@
#include <glib-object.h>
#include <gspell/gspell-checker.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_NAVIGATOR (gspell_navigator_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_INTERFACE (GspellNavigator, gspell_navigator,
GSPELL, NAVIGATOR,
GInitiallyUnowned)
@@ -52,15 +55,18 @@ struct _GspellNavigatorInterface
const gchar *change_to);
};
+GSPELL_AVAILABLE_IN_ALL
gboolean gspell_navigator_goto_next (GspellNavigator *navigator,
gchar **word,
GspellChecker **spell_checker,
GError **error);
+GSPELL_AVAILABLE_IN_ALL
void gspell_navigator_change (GspellNavigator *navigator,
const gchar *word,
const gchar *change_to);
+GSPELL_AVAILABLE_IN_ALL
void gspell_navigator_change_all (GspellNavigator *navigator,
const gchar *word,
const gchar *change_to);
diff --git a/gspell/gspell-text-buffer.h b/gspell/gspell-text-buffer.h
index bdc8103..2b5e7ac 100644
--- a/gspell/gspell-text-buffer.h
+++ b/gspell/gspell-text-buffer.h
@@ -25,21 +25,28 @@
#endif
#include <gspell/gspell-checker.h>
+#include <gspell/gspell-version.h>
#include <gtk/gtk.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_TEXT_BUFFER (gspell_text_buffer_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_FINAL_TYPE (GspellTextBuffer, gspell_text_buffer,
GSPELL, TEXT_BUFFER,
GObject)
+GSPELL_AVAILABLE_IN_ALL
GspellTextBuffer * gspell_text_buffer_get_from_gtk_text_buffer (GtkTextBuffer *gtk_buffer);
+GSPELL_AVAILABLE_IN_ALL
GtkTextBuffer * gspell_text_buffer_get_buffer (GspellTextBuffer
*gspell_buffer);
+GSPELL_AVAILABLE_IN_ALL
GspellChecker * gspell_text_buffer_get_spell_checker (GspellTextBuffer
*gspell_buffer);
+GSPELL_AVAILABLE_IN_ALL
void gspell_text_buffer_set_spell_checker (GspellTextBuffer *gspell_buffer,
GspellChecker *spell_checker);
diff --git a/gspell/gspell-text-view.h b/gspell/gspell-text-view.h
index 320aec0..371f47c 100644
--- a/gspell/gspell-text-view.h
+++ b/gspell/gspell-text-view.h
@@ -25,10 +25,13 @@
#endif
#include <gtk/gtk.h>
+#include <gspell/gspell-version.h>
G_BEGIN_DECLS
#define GSPELL_TYPE_TEXT_VIEW (gspell_text_view_get_type ())
+
+GSPELL_AVAILABLE_IN_ALL
G_DECLARE_DERIVABLE_TYPE (GspellTextView, gspell_text_view,
GSPELL, TEXT_VIEW,
GObject)
@@ -41,19 +44,26 @@ struct _GspellTextViewClass
gpointer padding[8];
};
+GSPELL_AVAILABLE_IN_ALL
GspellTextView * gspell_text_view_get_from_gtk_text_view (GtkTextView *gtk_view);
+GSPELL_AVAILABLE_IN_1_2
void gspell_text_view_basic_setup (GspellTextView *gspell_view);
+GSPELL_AVAILABLE_IN_ALL
GtkTextView * gspell_text_view_get_view (GspellTextView *gspell_view);
+GSPELL_AVAILABLE_IN_ALL
gboolean gspell_text_view_get_inline_spell_checking (GspellTextView *gspell_view);
+GSPELL_AVAILABLE_IN_ALL
void gspell_text_view_set_inline_spell_checking (GspellTextView *gspell_view,
gboolean enable);
+GSPELL_AVAILABLE_IN_1_2
gboolean gspell_text_view_get_enable_language_menu (GspellTextView *gspell_view);
+GSPELL_AVAILABLE_IN_1_2
void gspell_text_view_set_enable_language_menu (GspellTextView *gspell_view,
gboolean
enable_language_menu);
diff --git a/gspell/gspell-version.h b/gspell/gspell-version.h
new file mode 100644
index 0000000..3c9064c
--- /dev/null
+++ b/gspell/gspell-version.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of gspell, a spell-checking library.
+ *
+ * Copyright 2017 - Sébastien Wilmet
+ *
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef GSPELL_VERSION_H
+#define GSPELL_VERSION_H
+
+#if !defined (GSPELL_H_INSIDE) && !defined (GSPELL_COMPILATION)
+#error "Only <gspell/gspell.h> can be included directly."
+#endif
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#ifndef GSPELL_EXTERN
+#define GSPELL_EXTERN extern
+#endif
+
+#define GSPELL_AVAILABLE_IN_ALL GSPELL_EXTERN
+#define GSPELL_AVAILABLE_IN_1_2 GSPELL_EXTERN
+#define GSPELL_AVAILABLE_IN_1_4 GSPELL_EXTERN
+
+G_END_DECLS
+
+#endif /* GSPELL_VERSION_H */
+
+/* ex:set ts=8 noet: */
diff --git a/gspell/gspell.h b/gspell/gspell.h
index ee74859..e3dc719 100644
--- a/gspell/gspell.h
+++ b/gspell/gspell.h
@@ -36,6 +36,7 @@
#include <gspell/gspell-text-view.h>
#include <gspell/gspell-enum-types.h>
+#include <gspell/gspell-version.h>
#undef GSPELL_H_INSIDE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]