From d0c461f7c019c25dcd71edd7adff7c75cc6d07ef Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 17 Oct 2017 20:08:59 -0400 Subject: mq_tab_root(), mq_tab_previous(), mq_tab_next(), mq_tab_first_child(): New functions --- (limited to 'src') 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); -- cgit v0.9.1