[gnome-builder/wip/gtk4-port: 512/736] libide/gui: add indenterminate position helper
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 512/736] libide/gui: add indenterminate position helper
- Date: Tue, 26 Apr 2022 01:46:29 +0000 (UTC)
commit f5ce0edc3279515adbd30b339cca2af16558e4d7
Author: Christian Hergert <chergert redhat com>
Date: Thu Apr 7 15:02:11 2022 -0700
libide/gui: add indenterminate position helper
src/libide/gui/ide-panel-position.c | 8 +++++++
src/libide/gui/ide-panel-position.h | 42 +++++++++++++++++++------------------
2 files changed, 30 insertions(+), 20 deletions(-)
---
diff --git a/src/libide/gui/ide-panel-position.c b/src/libide/gui/ide-panel-position.c
index cdf53f167..9a38ab902 100644
--- a/src/libide/gui/ide-panel-position.c
+++ b/src/libide/gui/ide-panel-position.c
@@ -143,3 +143,11 @@ ide_panel_position_set_depth (IdePanelPosition *self,
self->depth = depth;
self->depth_set = TRUE;
}
+
+gboolean
+ide_panel_position_is_indeterminate (IdePanelPosition *self)
+{
+ g_return_val_if_fail (self != NULL, TRUE);
+
+ return !self->column_set || !self->row_set || !self->edge_set;
+}
diff --git a/src/libide/gui/ide-panel-position.h b/src/libide/gui/ide-panel-position.h
index 9b5012ab7..127459a9a 100644
--- a/src/libide/gui/ide-panel-position.h
+++ b/src/libide/gui/ide-panel-position.h
@@ -35,37 +35,39 @@ G_BEGIN_DECLS
typedef struct _IdePanelPosition IdePanelPosition;
IDE_AVAILABLE_IN_ALL
-GType ide_panel_position_get_type (void) G_GNUC_CONST;
+GType ide_panel_position_get_type (void) G_GNUC_CONST;
IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_panel_position_new (void);
+IdePanelPosition *ide_panel_position_new (void);
IDE_AVAILABLE_IN_ALL
-IdePanelPosition *ide_panel_position_ref (IdePanelPosition *self);
+IdePanelPosition *ide_panel_position_ref (IdePanelPosition *self);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_unref (IdePanelPosition *self);
+void ide_panel_position_unref (IdePanelPosition *self);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_edge (IdePanelPosition *self,
- PanelDockPosition *edge);
+gboolean ide_panel_position_get_edge (IdePanelPosition *self,
+ PanelDockPosition *edge);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_edge (IdePanelPosition *self,
- PanelDockPosition edge);
+void ide_panel_position_set_edge (IdePanelPosition *self,
+ PanelDockPosition edge);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_row (IdePanelPosition *self,
- guint *row);
+gboolean ide_panel_position_get_row (IdePanelPosition *self,
+ guint *row);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_row (IdePanelPosition *self,
- guint row);
+void ide_panel_position_set_row (IdePanelPosition *self,
+ guint row);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_column (IdePanelPosition *self,
- guint *column);
+gboolean ide_panel_position_get_column (IdePanelPosition *self,
+ guint *column);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_column (IdePanelPosition *self,
- guint column);
+void ide_panel_position_set_column (IdePanelPosition *self,
+ guint column);
IDE_AVAILABLE_IN_ALL
-gboolean ide_panel_position_get_depth (IdePanelPosition *self,
- guint *depth);
+gboolean ide_panel_position_get_depth (IdePanelPosition *self,
+ guint *depth);
IDE_AVAILABLE_IN_ALL
-void ide_panel_position_set_depth (IdePanelPosition *self,
- guint depth);
+void ide_panel_position_set_depth (IdePanelPosition *self,
+ guint depth);
+IDE_AVAILABLE_IN_ALL
+gboolean ide_panel_position_is_indeterminate (IdePanelPosition *self);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (IdePanelPosition, ide_panel_position_unref)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]