Misc: Add margin_t & Store frame extents with it & Misc

- Add margin_t, a structure that represents margins around a rectangle.

 - Store frame extents of a window with margin_t, replacing the 4
   fields ({left,right,top,bottom}_width) in struct _win.

 - Add two helper macros, cmemzero() and cmemzero_one(), that zero out a
   block of memory.
This commit is contained in:
Richard Grenville
2015-09-06 20:53:07 +08:00
parent 86266e00e2
commit 7d4d87d683
4 changed files with 54 additions and 28 deletions

View File

@ -503,7 +503,8 @@ update_reg_ignore_expire(session_t *ps, const win *w) {
static inline bool __attribute__((const))
win_has_frame(const win *w) {
return w->a.border_width
|| w->top_width || w->left_width || w->right_width || w->bottom_width;
|| w->frame_extents.top || w->frame_extents.left
|| w->frame_extents.right || w->frame_extents.bottom;
}
static inline void