summaryrefslogtreecommitdiff
path: root/src/data.h
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-02-22 11:16:55 +0000
committersabetts <sabetts>2003-02-22 11:16:55 +0000
commit00a37f7479fc780669afd3ad82d938a1096952d0 (patch)
treed3c88eb1ae06ed1c7c94c69057f0fcbf6fce48a1 /src/data.h
parent4cacfe9c7bf4fea269a7f99879bc3f1e6ea9d45b (diff)
downloadratpoison-00a37f7479fc780669afd3ad82d938a1096952d0.zip
* src/actions.c (cmd_number): use list delete entry macro
(cmd_number): likewise (cmd_escape): use list looping macro (cmd_escape): likewise (cmd_defpadding): likewise (cmd_defborder): likewise * src/data.h: include linkedlist.h (struct rp_window_frame): use struct list_head instead of next, prev pointers. (struct rp_window): likewise (struct screen_info): rename rp_window_frame_sentinel to rp_window_frames and change it's type to list_head. * src/events.c (mapping_notify): use list looping macro (mapping_notify): likewise * src/list.c: rename rp_unmapped_window_sentinel to rp_unmapped_window and rp_mapped_window_sentinel to rp_mapped_window. Use LIST_HEAD to create them. externs updated. (add_to_window_list): use list add entry macro. (find_window_in_list): list head is of type list_head. Prototype and callers updated. (find_window_in_list): use list looping macro (init_window_list): remove function (find_window_number): use list looping macro (find_window_name): likewise (find_window_prev): use list previous entry macro (find_window_next): use list next entry macro (find_window_other): use list looping macro (append_to_list): remove function (insert_into_list): use list looping macro (insert_into_list): use list add entry macro (remove_from_list): remove function (get_window_list): use list looping macro * src/main.c (main): do not call init_window_list() * src/manage.c (unmanage): use list delete macro (map_window): likewise (withdraw_window): use list moving macro to move entry to another list. (hide_others): use list looping macro * src/split.c (num_frames): use list looping macro (frames_screen): likewise (maximize_all_windows_in_frame): likewise (delete_frame_from_list): remove function (create_initial_frame): remove list init code. Add current frame to screen's frame list. (init_frame_list): use list init macro (find_last_frame): use list looping macro (find_windows_frame): likewise (find_frame_next): use list next entry macro (find_frame_prev): use list previous entry macro (find_window_for_frame): use list looping macro (split_frame): use list add entry macro (remove_all_splits): use list looping macro (resize_frame_vertically): likewise (resize_frame_horizontally): likewise (total_frame_area): likewise (frame_overlaps): likewise (remove_frame): likewise (find_frame_up): likewise (find_frame_down): likewise (find_frame_left): likewise (find_frame_right): likewise
Diffstat (limited to 'src/data.h')
-rw-r--r--src/data.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/data.h b/src/data.h
index c4b236b..d3b2e9e 100644
--- a/src/data.h
+++ b/src/data.h
@@ -22,6 +22,8 @@
#ifndef _RATPOISON_DATA_H
#define _RATPOISON_DATA_H
+#include "linkedlist.h"
+
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
@@ -44,7 +46,7 @@ struct rp_window_frame
/* For determining the last frame. */
int last_access;
- rp_window_frame *prev, *next;
+ struct list_head node;
};
struct rp_window
@@ -87,7 +89,7 @@ struct rp_window
mapped into. */
rp_window_frame *frame;
- rp_window *next, *prev;
+ struct list_head node;
};
struct screen_info
@@ -105,7 +107,7 @@ struct screen_info
/* A list of frames that may or may not contain windows. There should
always be one in the list. */
- rp_window_frame *rp_window_frame_sentinel;
+ struct list_head rp_window_frames;
/* Pointer to the currently focused frame. One for each screen so
when you switch screens the focus doesn't get frobbed. */
@@ -194,11 +196,11 @@ extern struct rp_key prefix_key;
/* A list of mapped windows. These windows show up in the window
list and have a number assigned to them. */
-extern rp_window *rp_mapped_window_sentinel;
+extern struct list_head rp_mapped_window;
/* A list of unmapped windows. These windows do not have a number
assigned to them and are not visible/active. */
-extern rp_window *rp_unmapped_window_sentinel;
+extern struct list_head rp_unmapped_window;
extern int rp_current_screen;
extern screen_info *screens;