summaryrefslogtreecommitdiff
path: root/src/group.h
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-05-16 23:25:06 +0000
committersabetts <sabetts>2003-05-16 23:25:06 +0000
commitcf843449115562fe44be792e37bd78639414da4e (patch)
tree0eba8dbd41b3ad9328b600ca35b4d41e34aaec60 /src/group.h
parentbcf85f95069519c29b2263ff5391a4da0442188e (diff)
downloadratpoison-cf843449115562fe44be792e37bd78639414da4e.zip
* src/window.c (add_to_window_list): add the window to the current
group. (find_window_name): search the current group for a matching window. (find_window_other): likewise. (format_window_name): take a rp_window_elem as an argument, not an rp_window. Print the group window's number, not the window's internal number. (get_window_list): loop through the current group. * src/split.c (find_window_for_frame): search the current group for a window to fit in the frame. * src/ratpoison.h: include globals.h and group.h * src/manage.c (unmanage): remove the window from any groups it was in. (map_window): map the window in any groups it is in. (withdraw_window): unmap the window in any groups it is in. * src/main.c: Move all globals to globals.h (main): initialize the group functions. * src/data.h: Move all defines and extern globals to globals.h (struct rp_window_elem): new struct (struct rp_group): likewise * src/actions.h (cmd_gnext): new prototype (cmd_gprev): likewise (cmd_gnew): likewise * src/actions.c (user_commands): new commands gnext, gprev, and gnew (cmd_prev): fix to work with new group code. (cmd_next): likewise (cmd_gnext): new function (cmd_gprev): likewise (cmd_gnew): likewise * src/Makefile.am (ratpoison_SOURCES): add files globals.h, globals.c, group.h and group.c
Diffstat (limited to 'src/group.h')
-rw-r--r--src/group.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/group.h b/src/group.h
new file mode 100644
index 0000000..346ffe8
--- /dev/null
+++ b/src/group.h
@@ -0,0 +1,31 @@
+#ifndef GROUP_H
+#define GROUP_H
+
+void init_groups ();
+void group_add_window (rp_group *g, rp_window *w);
+void group_free (rp_group *g);
+rp_group *group_new (int number);
+
+void group_del_window (rp_group *g, rp_window *win);
+void groups_del_window (rp_window *win);
+
+void group_map_window (rp_group *g, rp_window *win);
+void groups_map_window (rp_window *win);
+
+void group_unmap_window (rp_group *g, rp_window *win);
+void groups_unmap_window (rp_window *win);
+
+rp_window *group_prev_window (rp_group *g, rp_window *win);
+rp_window *group_next_window (rp_group *g, rp_window *win);
+
+rp_window *group_last_window (rp_group *g);
+
+rp_group *group_prev_group ();
+rp_group *group_next_group ();
+
+rp_group *group_add_new_group ();
+
+rp_window_elem *group_find_window (struct list_head *list, rp_window *win);
+rp_window *group_find_window_by_number (rp_group *g, int num);
+
+#endif