summaryrefslogtreecommitdiff
path: root/src/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/context.h')
-rw-r--r--src/context.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/context.h b/src/context.h
index 1604bd3..5eebc43 100644
--- a/src/context.h
+++ b/src/context.h
@@ -1,14 +1,27 @@
#ifndef _CONTEXT_H
#define _CONTEXT_H
+#include "direction.h"
+#include "list.h"
+
typedef struct _vwm_t vwm_t;
+typedef struct _vwm_desktop_t vwm_desktop_t;
-typedef enum _vwm_context_t {
- VWM_CONTEXT_DESKTOP = 0, /* focus the desktop context */
- VWM_CONTEXT_SHELF, /* focus the shelf context */
- VWM_CONTEXT_OTHER /* focus the other context relative to the current one */
+/* contexts and desktops are *very* similar, they should likely share code,
+ * simply duplicating for now.
+ */
+typedef struct _vwm_context_t {
+ list_head_t contexts; /* global list of contexts in spatial created-in order */
+ list_head_t contexts_mru; /* global list of contexts in MRU order */
+ vwm_desktop_t *focused_desktop; /* the focused desktop on this context */
+ unsigned color; /* color used for focused border on this context */
} vwm_context_t;
-int vwm_context_focus(vwm_t *vwm, vwm_context_t desired_context);
+vwm_context_t * vwm_context_mru(vwm_t *vwm, vwm_context_t *context);
+vwm_context_t * vwm_context_create(vwm_t *vwm, int color, vwm_desktop_t *desktop);
+void vwm_context_destroy(vwm_t *vwm, vwm_context_t *context);
+vwm_context_t * vwm_context_next_mru(vwm_t *vwm, vwm_context_t *context, vwm_direction_t direction);
+vwm_context_t * vwm_context_next(vwm_t *vwm, vwm_context_t *context, vwm_direction_t direction);
+vwm_context_t * vwm_context_by_color(vwm_t *vwm, unsigned color);
#endif
© All Rights Reserved