[gnome-builder/wip/libide] libide: add helper to get mode type
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: add helper to get mode type
- Date: Thu, 12 Mar 2015 08:42:33 +0000 (UTC)
commit a2c3b197213ea16fc8d9268f5ab47c1d11d357b0
Author: Christian Hergert <christian hergert me>
Date: Thu Mar 12 01:34:59 2015 -0700
libide: add helper to get mode type
libide/ide-source-view-mode.c | 8 ++++++++
libide/ide-source-view-mode.h | 14 ++++++++------
2 files changed, 16 insertions(+), 6 deletions(-)
---
diff --git a/libide/ide-source-view-mode.c b/libide/ide-source-view-mode.c
index 0be2f49..13a9810 100644
--- a/libide/ide-source-view-mode.c
+++ b/libide/ide-source-view-mode.c
@@ -446,3 +446,11 @@ _ide_source_view_mode_new (GtkWidget *view,
return g_object_ref_sink (mode);
}
+
+IdeSourceViewModeType
+ide_source_view_mode_get_mode_type (IdeSourceViewMode *self)
+{
+ IdeSourceViewModePrivate *priv = ide_source_view_mode_get_instance_private (self);
+ g_return_val_if_fail (IDE_IS_SOURCE_VIEW_MODE (self), 0);
+ return priv->type;
+}
diff --git a/libide/ide-source-view-mode.h b/libide/ide-source-view-mode.h
index 3a29685..64b2b34 100644
--- a/libide/ide-source-view-mode.h
+++ b/libide/ide-source-view-mode.h
@@ -22,6 +22,7 @@
#include <gtk/gtk.h>
#include "ide-types.h"
+#include "ide-source-view.h"
G_BEGIN_DECLS
@@ -46,12 +47,13 @@ struct _IdeSourceViewModeClass
GtkWidgetClass parent_class;
};
-gboolean ide_source_view_mode_get_block_cursor (IdeSourceViewMode *self);
-gboolean ide_source_view_mode_get_suppress_unbound (IdeSourceViewMode *self);
-gboolean ide_source_view_mode_get_coalesce_undo (IdeSourceViewMode *self);
-const gchar *ide_source_view_mode_get_name (IdeSourceViewMode *self);
-const gchar *ide_source_view_mode_get_default_mode (IdeSourceViewMode *self);
-gboolean ide_source_view_mode_get_keep_mark_on_char (IdeSourceViewMode *self);
+gboolean ide_source_view_mode_get_block_cursor (IdeSourceViewMode *self);
+gboolean ide_source_view_mode_get_suppress_unbound (IdeSourceViewMode *self);
+gboolean ide_source_view_mode_get_coalesce_undo (IdeSourceViewMode *self);
+const gchar *ide_source_view_mode_get_name (IdeSourceViewMode *self);
+const gchar *ide_source_view_mode_get_default_mode (IdeSourceViewMode *self);
+gboolean ide_source_view_mode_get_keep_mark_on_char (IdeSourceViewMode *self);
+IdeSourceViewModeType ide_source_view_mode_get_mode_type (IdeSourceViewMode *self);
G_END_DECLS
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]