summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/tab.c24
-rw-r--r--src/tab.h12
2 files changed, 36 insertions, 0 deletions
diff --git a/src/tab.c b/src/tab.c
index 364e3a5..800d649 100644
--- a/src/tab.c
+++ b/src/tab.c
@@ -292,6 +292,30 @@ mq_tab_foreach(MqTab *node, void (*cb)(MqTab *node, va_list ap), ...)
va_end(ap);
}
+MqTab *
+mq_tab_root(MqTab *node)
+{
+ return node ? node->root : NULL;
+}
+
+MqTab *
+mq_tab_previous(MqTab *node)
+{
+ return node ? node->prev : NULL;
+}
+
+MqTab *
+mq_tab_next(MqTab *node)
+{
+ return node ? node->next : NULL;
+}
+
+MqTab *
+mq_tab_first_child(MqTab *node)
+{
+ return node ? node->first_child : NULL;
+}
+
void
mq_tab_scroll_tab_labels(MqTab *node)
{
diff --git a/src/tab.h b/src/tab.h
index 53ce9ce..b49d72d 100644
--- a/src/tab.h
+++ b/src/tab.h
@@ -86,6 +86,18 @@ mq_tab_seek(MqTab *node, guint position);
void
mq_tab_foreach(MqTab *node, void (*cb)(MqTab *node, va_list ap), ...);
+MqTab *
+mq_tab_root(MqTab *node);
+
+MqTab *
+mq_tab_previous(MqTab *node);
+
+MqTab *
+mq_tab_next(MqTab *node);
+
+MqTab *
+mq_tab_first_child(MqTab *node);
+
void
mq_tab_scroll_tab_labels(MqTab *node);