summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <pj@pehjota.net>2017-10-17 20:08:59 (EDT)
committer Patrick McDermott <pj@pehjota.net>2017-10-17 20:08:59 (EDT)
commitd0c461f7c019c25dcd71edd7adff7c75cc6d07ef (patch)
tree4ae6648ef7f4202963b341d1caadac848b973e2c
parent1d1e550fb446da03d9f8389e41e159679170b0fe (diff)
downloadmarquee-d0c461f7c019c25dcd71edd7adff7c75cc6d07ef.zip
marquee-d0c461f7c019c25dcd71edd7adff7c75cc6d07ef.tar.gz
marquee-d0c461f7c019c25dcd71edd7adff7c75cc6d07ef.tar.bz2
mq_tab_root(), mq_tab_previous(), mq_tab_next(), mq_tab_first_child(): New functions
-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);