[gtksourceview/gtksourcecompletion] Whitespace fixes and struct padding
- From: Paolo Borelli <pborelli src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtksourceview/gtksourcecompletion] Whitespace fixes and struct padding
- Date: Sun, 27 Sep 2009 10:53:42 +0000 (UTC)
commit 909d9be4dac3de7ed4bd89ef2bb80241637679e9
Author: Paolo Borelli <pborelli gnome org>
Date: Sun Sep 27 12:40:55 2009 +0200
Whitespace fixes and struct padding
gtksourceview/gtksourcecompletioncontext.c | 34 ++++++++++++++--------------
gtksourceview/gtksourcecompletioncontext.h | 19 ++++++++++-----
2 files changed, 29 insertions(+), 24 deletions(-)
---
diff --git a/gtksourceview/gtksourcecompletioncontext.c b/gtksourceview/gtksourcecompletioncontext.c
index 7139920..2145264 100644
--- a/gtksourceview/gtksourcecompletioncontext.c
+++ b/gtksourceview/gtksourcecompletioncontext.c
@@ -86,19 +86,18 @@ gtk_source_completion_context_set_property (GObject *object,
{
case PROP_COMPLETION:
self->priv->completion = g_value_dup_object (value);
- break;
+ break;
case PROP_ITER:
self->priv->iter = *((GtkTextIter *)g_value_get_pointer (value));
- break;
+ break;
case PROP_INTERACTIVE:
self->priv->interactive_mode = g_value_get_boolean (value);
- break;
+ break;
case PROP_DEFAULT:
self->priv->default_mode = g_value_get_boolean (value);
- break;
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
@@ -114,21 +113,20 @@ gtk_source_completion_context_get_property (GObject *object,
{
case PROP_COMPLETION:
g_value_set_object (value, self->priv->completion);
- break;
+ break;
case PROP_VIEW:
g_value_set_object (value, gtk_source_completion_get_view (self->priv->completion));
- break;
+ break;
case PROP_ITER:
g_value_set_pointer (value, &(self->priv->iter));
- break;
+ break;
case PROP_INTERACTIVE:
g_value_set_boolean (value, self->priv->interactive_mode);
- break;
+ break;
case PROP_DEFAULT:
g_value_set_boolean (value, self->priv->default_mode);
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
}
}
@@ -158,7 +156,7 @@ gtk_source_completion_context_class_init (GtkSourceCompletionContextClass *klass
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE,
0);
-
+
/**
* GtkSourceCompletionContext:completion:
*
@@ -209,7 +207,7 @@ gtk_source_completion_context_class_init (GtkSourceCompletionContextClass *klass
_("Whether the completion was invoked in interactive mode"),
FALSE,
G_PARAM_READWRITE));
-
+
/**
* GtkSourceCompletionContext:default:
*
@@ -222,7 +220,7 @@ gtk_source_completion_context_class_init (GtkSourceCompletionContextClass *klass
_("Whether completion was invoked in default mode"),
FALSE,
G_PARAM_READWRITE));
-
+
g_type_class_add_private (object_class, sizeof(GtkSourceCompletionContextPrivate));
}
@@ -253,7 +251,7 @@ gtk_source_completion_context_add_proposals (GtkSourceCompletionContext *contex
{
g_return_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context));
g_return_if_fail (GTK_IS_SOURCE_COMPLETION_PROVIDER (provider));
-
+
_gtk_source_completion_add_proposals (context->priv->completion,
context,
provider,
@@ -274,6 +272,7 @@ GtkSourceView *
gtk_source_completion_context_get_view (GtkSourceCompletionContext *context)
{
g_return_val_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context), NULL);
+
return gtk_source_completion_get_view (context->priv->completion);
}
@@ -291,6 +290,7 @@ gtk_source_completion_context_get_iter (GtkSourceCompletionContext *context,
GtkTextIter *iter)
{
g_return_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context));
+
*iter = context->priv->iter;
}
@@ -308,8 +308,8 @@ gboolean
gtk_source_completion_context_get_interactive (GtkSourceCompletionContext *context)
{
g_return_val_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context), FALSE);
+
return context->priv->interactive_mode;
-
}
/**
@@ -326,14 +326,14 @@ gboolean
gtk_source_completion_context_get_default (GtkSourceCompletionContext *context)
{
g_return_val_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context), FALSE);
+
return context->priv->default_mode;
-
}
void
_gtk_source_completion_context_cancel (GtkSourceCompletionContext *context)
{
g_return_if_fail (GTK_IS_SOURCE_COMPLETION_CONTEXT (context));
-
+
g_signal_emit (context, context_signals[CANCELLED], 0);
}
diff --git a/gtksourceview/gtksourcecompletioncontext.h b/gtksourceview/gtksourcecompletioncontext.h
index 5597210..1e67c03 100644
--- a/gtksourceview/gtksourcecompletioncontext.h
+++ b/gtksourceview/gtksourcecompletioncontext.h
@@ -28,11 +28,11 @@
G_BEGIN_DECLS
-#define GTK_TYPE_SOURCE_COMPLETION_CONTEXT (gtk_source_completion_context_get_type ())
-#define GTK_SOURCE_COMPLETION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContext))
-#define GTK_SOURCE_COMPLETION_CONTEXT_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContext const))
-#define GTK_SOURCE_COMPLETION_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContextClass))
-#define GTK_IS_SOURCE_COMPLETION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT))
+#define GTK_TYPE_SOURCE_COMPLETION_CONTEXT (gtk_source_completion_context_get_type ())
+#define GTK_SOURCE_COMPLETION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContext))
+#define GTK_SOURCE_COMPLETION_CONTEXT_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContext const))
+#define GTK_SOURCE_COMPLETION_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContextClass))
+#define GTK_IS_SOURCE_COMPLETION_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT))
#define GTK_IS_SOURCE_COMPLETION_CONTEXT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SOURCE_COMPLETION_CONTEXT))
#define GTK_SOURCE_COMPLETION_CONTEXT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SOURCE_COMPLETION_CONTEXT, GtkSourceCompletionContextClass))
@@ -47,14 +47,19 @@ struct _GtkSourceView;
struct _GtkSourceCompletionContext {
GInitiallyUnowned parent;
-
+
GtkSourceCompletionContextPrivate *priv;
};
struct _GtkSourceCompletionContextClass {
GInitiallyUnownedClass parent_class;
-
+
void (*cancelled) (GtkSourceCompletionContext *context);
+
+ /* Padding for future expansion */
+ void (*_gtk_source_reserved1) (void);
+ void (*_gtk_source_reserved2) (void);
+ void (*_gtk_source_reserved3) (void);
};
GType gtk_source_completion_context_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]