[gnome-builder] editor: add get_sidebar accessor for editor perspective



commit 281262a717324590f0b975547205c9d53d08eb43
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jun 30 00:12:17 2017 -0700

    editor: add get_sidebar accessor for editor perspective

 libide/editor/ide-editor-perspective.c |   18 ++++++++++++++++++
 libide/editor/ide-editor-perspective.h |   18 ++++++++++--------
 2 files changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/libide/editor/ide-editor-perspective.c b/libide/editor/ide-editor-perspective.c
index b7506ad..621ca84 100644
--- a/libide/editor/ide-editor-perspective.c
+++ b/libide/editor/ide-editor-perspective.c
@@ -186,6 +186,24 @@ ide_editor_perspective_get_active_view (IdeEditorPerspective *self)
 }
 
 /**
+ * ide_editor_perspective_get_sidebar:
+ * @self: a #IdeEditorPerspective
+ *
+ * Gets the #IdeEditorSidebar for the editor perspective.
+ *
+ * Returns: (transfer none): A #IdeEditorSidebar
+ *
+ * Since: 3.26
+ */
+IdeEditorSidebar *
+ide_editor_perspective_get_sidebar (IdeEditorPerspective *self)
+{
+  g_return_val_if_fail (IDE_IS_EDITOR_PERSPECTIVE (self), NULL);
+
+  return self->sidebar;
+}
+
+/**
  * ide_editor_perspective_get_right_edge:
  *
  * Returns: (transfer none): A #GtkWidget
diff --git a/libide/editor/ide-editor-perspective.h b/libide/editor/ide-editor-perspective.h
index 47b102e..c0ea205 100644
--- a/libide/editor/ide-editor-perspective.h
+++ b/libide/editor/ide-editor-perspective.h
@@ -19,6 +19,7 @@
 #pragma once
 
 #include "diagnostics/ide-source-location.h"
+#include "editor/ide-editor-sidebar.h"
 #include "layout/ide-layout.h"
 #include "layout/ide-layout-grid.h"
 
@@ -28,16 +29,17 @@ G_BEGIN_DECLS
 
 G_DECLARE_FINAL_TYPE (IdeEditorPerspective, ide_editor_perspective, IDE, EDITOR_PERSPECTIVE, IdeLayout)
 
-IdeLayoutGrid *ide_editor_perspective_get_grid                      (IdeEditorPerspective *self);
-void           ide_editor_perspective_focus_location                (IdeEditorPerspective *self,
-                                                                     IdeSourceLocation    *location);
-void           ide_editor_perspective_focus_buffer_in_current_stack (IdeEditorPerspective *self,
-                                                                     IdeBuffer            *buffer);
-IdeLayoutView *ide_editor_perspective_get_active_view               (IdeEditorPerspective *self);
+void              ide_editor_perspective_focus_buffer_in_current_stack (IdeEditorPerspective *self,
+                                                                        IdeBuffer            *buffer);
+void              ide_editor_perspective_focus_location                (IdeEditorPerspective *self,
+                                                                        IdeSourceLocation    *location);
+IdeLayoutView    *ide_editor_perspective_get_active_view               (IdeEditorPerspective *self);
+IdeLayoutGrid    *ide_editor_perspective_get_grid                      (IdeEditorPerspective *self);
+IdeEditorSidebar *ide_editor_perspective_get_sidebar                   (IdeEditorPerspective *self);
 
 /* We want this to use "classifications" rather than "edges" */
-GtkWidget     *ide_editor_perspective_get_right_edge                (IdeEditorPerspective *self);
-GtkWidget     *ide_editor_perspective_get_bottom_edge               (IdeEditorPerspective *self);
+GtkWidget        *ide_editor_perspective_get_right_edge                (IdeEditorPerspective *self);
+GtkWidget        *ide_editor_perspective_get_bottom_edge               (IdeEditorPerspective *self);
 
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]