summaryrefslogtreecommitdiff
path: root/src/data.h
diff options
context:
space:
mode:
authorsabetts <sabetts>2003-03-31 07:06:22 +0000
committersabetts <sabetts>2003-03-31 07:06:22 +0000
commiteac6dda17283fe9f312d0c8576f4370f82fc5c0a (patch)
treeb21d6e62bee0b6e4374e240537dfb975fd8a6680 /src/data.h
parent84ee56d66b889363903eddd81a8b2a07f180656f (diff)
downloadratpoison-eac6dda17283fe9f312d0c8576f4370f82fc5c0a.zip
* src/split.c (current_window): call screen_get_frame.
(split_frame): call screen_get_frame to get appropriate structure. (split_frame): call find_window_number to get appropriate structure. (remove_all_splits): call screen_get_frame to get appropriate structure. (resize_frame): make sure all frames that will be resized are big enough for the resize. (resize_frame): return int (resize_shrink_to_window): call find_window_number to get the appropriate structure. (resize_frame_right): return int (resize_frame_left): likewise (resize_frame_top): likewise (resize_frame_bottom): likewise (resize_frame_horizontally): backup the frameset and restore it if the resize fails. Do not allow a frame to be resized too small or too big. (resize_frame_vertically): likewise (remove_frame): call find_window_number to get the appropriate structure. (set_active_frame): likewise (blank_frame): likewise (show_frame_message): call screen_get_frame to get the appropriate structure. * src/screen.c (screen_width): new function (and prototype) (screen_height): likewise (screen_left): likewise (screen_right): likewise (screen_top): likewise (screen_bottom): likewise (screen_copy_frameset): likewise (screen_restore_frameset): likewise (frameset_free): likewise (screen_get_frame): likewise * src/split.c (maximize_frame): call screen_width and screen_height to get the size for the frame. * src/ratpoison.h: include screen.h * src/manage.c (move_window): * src/frame.h (frame_copy): new prototype (frame_dump): likewise * src/frame.c (frame_copy): new function (frame_dump): likewise * src/events.c (unmap_notify): compare frame numbers, not pointers. (client_msg): call screen_get_frame when blanking the frame. * src/data.h (EMPTY): new define (struct rp_window_frame): replace the win field with win_number. Dependant code updated. (struct rp_window): replace frame with frame_number. Dependant code updated. (struct screen_info): replace rp_current_frame with current_frame and change type to int. Dependant code updated. * src/Makefile.am (ratpoison_SOURCES): added screen.h and screen.c
Diffstat (limited to 'src/data.h')
-rw-r--r--src/data.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/data.h b/src/data.h
index e87d63e..c7bba0f 100644
--- a/src/data.h
+++ b/src/data.h
@@ -32,6 +32,11 @@
#define FONT_HEIGHT(f) ((f)->max_bounds.ascent + (f)->max_bounds.descent)
#define WIN_EVENTS (StructureNotifyMask | PropertyChangeMask | ColormapChangeMask | FocusChangeMask)
+/* EMPTY is used when a frame doesn't contain a window, or a window
+ doesn't have a frame. Any time a field refers to the number of a
+ window/frame/screen/etc, Use EMPTY to denote a lack there of. */
+#define EMPTY -1
+
typedef struct rp_window rp_window;
typedef struct screen_info screen_info;
@@ -42,7 +47,9 @@ struct rp_window_frame
{
int number;
int x, y, width, height;
- rp_window *win;
+
+ /* The number of the window that is focused in this frame. */
+ int win_number;
/* For determining the last frame. */
int last_access;
@@ -88,7 +95,7 @@ struct rp_window
/* A window can be visible inside a frame but not the frame's
current window. This keeps track of what frame the window was
mapped into. */
- rp_window_frame *frame;
+ int frame_number;
struct list_head node;
};
@@ -113,9 +120,9 @@ struct screen_info
/* Keep track of which numbers have been given to frames. */
struct numset *frames_numset;
- /* Pointer to the currently focused frame. One for each screen so
+ /* The number of the currently focused frame. One for each screen so
when you switch screens the focus doesn't get frobbed. */
- rp_window_frame *rp_current_frame;
+ int current_frame;
};
struct rp_action