[gspell/wip/inline-checker] Make GspellInlineCheckerText private
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/inline-checker] Make GspellInlineCheckerText private
- Date: Wed, 6 Jan 2016 13:30:41 +0000 (UTC)
commit 6403b430718bc6f506c2099c5d485049d60ab197
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Jan 6 13:49:32 2016 +0100
Make GspellInlineCheckerText private
gspell/Makefile.am | 4 +-
gspell/gspell-inline-checker-text.c | 44 +++++++++++++++++-----------------
gspell/gspell-inline-checker-text.h | 18 +++++--------
gspell/gspell-text-view.c | 2 +-
gspell/gspell.h | 1 -
5 files changed, 32 insertions(+), 37 deletions(-)
---
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index 31f21c4..b717bca 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -19,7 +19,6 @@ gspell_public_headers = \
gspell.h \
gspell-checker.h \
gspell-checker-dialog.h \
- gspell-inline-checker-text.h \
gspell-language.h \
gspell-language-chooser.h \
gspell-language-chooser-button.h \
@@ -32,7 +31,6 @@ gspell_public_headers = \
gspell_public_c_files = \
gspell-checker.c \
gspell-checker-dialog.c \
- gspell-inline-checker-text.c \
gspell-language.c \
gspell-language-chooser.c \
gspell-language-chooser-button.c \
@@ -45,6 +43,7 @@ gspell_public_c_files = \
gspell_private_headers = \
gconstructor.h \
gspell-buffer-notifier.h \
+ gspell-inline-checker-text.h \
gspell-inline-checker-text-buffer.h \
gspell-utils.h \
gtktextregion.h
@@ -52,6 +51,7 @@ gspell_private_headers = \
gspell_private_c_files = \
gspell-buffer-notifier.c \
gspell-init.c \
+ gspell-inline-checker-text.c \
gspell-inline-checker-text-buffer.c \
gspell-utils.c \
gtktextregion.c
diff --git a/gspell/gspell-inline-checker-text.c b/gspell/gspell-inline-checker-text.c
index d0408f8..e461cf6 100644
--- a/gspell/gspell-inline-checker-text.c
+++ b/gspell/gspell-inline-checker-text.c
@@ -1,7 +1,7 @@
/*
* This file is part of gspell, a spell-checking library.
*
- * Copyright 2015 - Sébastien Wilmet
+ * Copyright 2015, 2016 - 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
@@ -36,7 +36,7 @@ enum
PROP_VIEW,
};
-G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerText, gspell_inline_checker_text, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (GspellInlineCheckerText, _gspell_inline_checker_text, G_TYPE_OBJECT)
static void
update_inline_checker (GspellInlineCheckerText *self)
@@ -44,7 +44,7 @@ update_inline_checker (GspellInlineCheckerText *self)
GspellInlineCheckerTextPrivate *priv;
GtkTextBuffer *buffer;
- priv = gspell_inline_checker_text_get_instance_private (self);
+ priv = _gspell_inline_checker_text_get_instance_private (self);
if (priv->view == NULL)
{
@@ -80,7 +80,7 @@ set_view (GspellInlineCheckerText *self,
g_return_if_fail (GTK_IS_TEXT_VIEW (view));
- priv = gspell_inline_checker_text_get_instance_private (self);
+ priv = _gspell_inline_checker_text_get_instance_private (self);
g_assert (priv->view == NULL);
g_assert (priv->inline_checker == NULL);
@@ -97,14 +97,14 @@ set_view (GspellInlineCheckerText *self,
}
static void
-gspell_inline_checker_text_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
+_gspell_inline_checker_text_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
{
GspellInlineCheckerTextPrivate *priv;
- priv = gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+ priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
switch (prop_id)
{
@@ -119,10 +119,10 @@ gspell_inline_checker_text_get_property (GObject *object,
}
static void
-gspell_inline_checker_text_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
+_gspell_inline_checker_text_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
{
GspellInlineCheckerText *self = GSPELL_INLINE_CHECKER_TEXT (object);
@@ -139,11 +139,11 @@ gspell_inline_checker_text_set_property (GObject *object,
}
static void
-gspell_inline_checker_text_dispose (GObject *object)
+_gspell_inline_checker_text_dispose (GObject *object)
{
GspellInlineCheckerTextPrivate *priv;
- priv = gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
+ priv = _gspell_inline_checker_text_get_instance_private (GSPELL_INLINE_CHECKER_TEXT (object));
if (priv->view != NULL && priv->inline_checker != NULL)
{
@@ -154,17 +154,17 @@ gspell_inline_checker_text_dispose (GObject *object)
g_clear_object (&priv->view);
g_clear_object (&priv->inline_checker);
- G_OBJECT_CLASS (gspell_inline_checker_text_parent_class)->dispose (object);
+ G_OBJECT_CLASS (_gspell_inline_checker_text_parent_class)->dispose (object);
}
static void
-gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
+_gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- object_class->get_property = gspell_inline_checker_text_get_property;
- object_class->set_property = gspell_inline_checker_text_set_property;
- object_class->dispose = gspell_inline_checker_text_dispose;
+ object_class->get_property = _gspell_inline_checker_text_get_property;
+ object_class->set_property = _gspell_inline_checker_text_set_property;
+ object_class->dispose = _gspell_inline_checker_text_dispose;
g_object_class_install_property (object_class,
PROP_VIEW,
@@ -178,12 +178,12 @@ gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
}
static void
-gspell_inline_checker_text_init (GspellInlineCheckerText *self)
+_gspell_inline_checker_text_init (GspellInlineCheckerText *self)
{
}
GspellInlineCheckerText *
-gspell_inline_checker_text_new (GtkTextView *view)
+_gspell_inline_checker_text_new (GtkTextView *view)
{
g_return_val_if_fail (GTK_IS_TEXT_VIEW (view), NULL);
diff --git a/gspell/gspell-inline-checker-text.h b/gspell/gspell-inline-checker-text.h
index 8a6e456..b069c76 100644
--- a/gspell/gspell-inline-checker-text.h
+++ b/gspell/gspell-inline-checker-text.h
@@ -1,7 +1,7 @@
/*
* This file is part of gspell, a spell-checking library.
*
- * Copyright 2015 - Sébastien Wilmet
+ * Copyright 2015, 2016 - 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
@@ -20,28 +20,24 @@
#ifndef __GSPELL_INLINE_CHECKER_TEXT_H__
#define __GSPELL_INLINE_CHECKER_TEXT_H__
-#if !defined (__GSPELL_H_INSIDE__) && !defined (GSPELL_COMPILATION)
-#error "Only <gspell/gspell.h> can be included directly."
-#endif
-
#include <gtk/gtk.h>
G_BEGIN_DECLS
-#define GSPELL_TYPE_INLINE_CHECKER_TEXT (gspell_inline_checker_text_get_type ())
-G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerText, gspell_inline_checker_text,
+#define GSPELL_TYPE_INLINE_CHECKER_TEXT (_gspell_inline_checker_text_get_type ())
+
+G_GNUC_INTERNAL
+G_DECLARE_DERIVABLE_TYPE (GspellInlineCheckerText, _gspell_inline_checker_text,
GSPELL, INLINE_CHECKER_TEXT,
GObject)
struct _GspellInlineCheckerTextClass
{
GObjectClass parent_class;
-
- /* Padding for future expansion */
- gpointer padding[8];
};
-GspellInlineCheckerText * gspell_inline_checker_text_new (GtkTextView *view);
+G_GNUC_INTERNAL
+GspellInlineCheckerText * _gspell_inline_checker_text_new (GtkTextView *view);
G_END_DECLS
diff --git a/gspell/gspell-text-view.c b/gspell/gspell-text-view.c
index 7540403..faa9bd2 100644
--- a/gspell/gspell-text-view.c
+++ b/gspell/gspell-text-view.c
@@ -66,7 +66,7 @@ gspell_text_view_set_inline_checking (GtkTextView *view,
g_object_set_data_full (G_OBJECT (view),
INLINE_CHECKER_KEY,
- gspell_inline_checker_text_new (view),
+ _gspell_inline_checker_text_new (view),
g_object_unref);
}
else
diff --git a/gspell/gspell.h b/gspell/gspell.h
index 08acd1e..e031803 100644
--- a/gspell/gspell.h
+++ b/gspell/gspell.h
@@ -24,7 +24,6 @@
#include <gspell/gspell-checker.h>
#include <gspell/gspell-checker-dialog.h>
-#include <gspell/gspell-inline-checker-text.h>
#include <gspell/gspell-language.h>
#include <gspell/gspell-language-chooser.h>
#include <gspell/gspell-language-chooser-button.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]