home
·
contact
·
privacy
projects
/
plomrogue
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8ff69b3
)
Copied to draw_win_borderlines() and draw_wins_borderlines() from draw_wins_bordercor...
author
Christian Heller
<c.heller@plomlompom.de>
Tue, 30 Jul 2013 02:20:47 +0000
(
04:20
+0200)
committer
Christian Heller
<c.heller@plomlompom.de>
Tue, 30 Jul 2013 02:20:47 +0000
(
04:20
+0200)
src/windows.c
patch
|
blob
|
history
diff --git
a/src/windows.c
b/src/windows.c
index 072ae0165a6621936bf7f2aa58de162ded04a37d..501f78795c5a0eadc4cdad466d36d12792eac2c7 100644
(file)
--- a/
src/windows.c
+++ b/
src/windows.c
@@
-35,9
+35,9
@@
static void draw_wins(struct Win * w);
/* draw_win_borderlines() draws the vertical and horizontal borders of window
/* draw_win_borderlines() draws the vertical and horizontal borders of window
- * "w" sans corners
, and draws the top border line as the windows' title ba
r
- *
(highlighted if the window is described active by "active" being set).
- * draw_wins_borderlines().
+ * "w" sans corners
into the virtual screen "pad", and draws the top borde
r
+ *
line as the windows' title bar (highlighted if the window is described
+ *
active by "active" being set).
draw_wins_borderlines().
*
* draw_wins_borderlines() calls draw_win_borderlines() recursively on all
* windows from "w" on. "w_active" is a pointer to the one window that
*
* draw_wins_borderlines() calls draw_win_borderlines() recursively on all
* windows from "w" on. "w_active" is a pointer to the one window that
@@
-46,8
+46,9
@@
static void draw_wins(struct Win * w);
* Finally, draw_wins_bordercorners draws into "pad" the borders of window "w"
* and all its successors.
*/
* Finally, draw_wins_bordercorners draws into "pad" the borders of window "w"
* and all its successors.
*/
-static void draw_win_borderlines(struct Win * w, char active);
-static void draw_wins_borderlines(struct Win * w, struct Win * w_active);
+static void draw_win_borderlines(struct Win * w, char active, WINDOW * pad);
+static void draw_wins_borderlines(struct Win * w, struct Win * w_active,
+ WINDOW * pad);
static void draw_wins_bordercorners(struct Win * w, WINDOW * pad);
static void draw_wins_bordercorners(struct Win * w, WINDOW * pad);
@@
-180,21
+181,19
@@
static void draw_wins (struct Win * w)
-static void draw_win_borderlines(struct Win * w, char active)
+static void draw_win_borderlines(struct Win * w, char active
, WINDOW * pad
)
{
/* Draw vertical and horizontal border lines. */
uint16_t y, x;
for (y = w->start.y; y <= w->start.y + w->frame.size.y; y++)
{
{
/* Draw vertical and horizontal border lines. */
uint16_t y, x;
for (y = w->start.y; y <= w->start.y + w->frame.size.y; y++)
{
- mvwaddch(wgetparent(w->frame.curses_win), y, w->start.x - 1, '|');
- mvwaddch(wgetparent(w->frame.curses_win),
- y, w->start.x + w->frame.size.x, '|');
+ mvwaddch(pad, y, w->start.x - 1, '|');
+ mvwaddch(pad, y, w->start.x + w->frame.size.x, '|');
}
for (x = w->start.x; x <= w->start.x + w->frame.size.x; x++)
{
}
for (x = w->start.x; x <= w->start.x + w->frame.size.x; x++)
{
- mvwaddch(wgetparent(w->frame.curses_win), w->start.y - 1, x, '-');
- mvwaddch(wgetparent(w->frame.curses_win),
- w->start.y + w->frame.size.y, x, '-');
+ mvwaddch(pad, w->start.y - 1, x, '-');
+ mvwaddch(pad, w->start.y + w->frame.size.y, x, '-');
}
/* Draw as much as possible of the title into center of top border line. */
}
/* Draw as much as possible of the title into center of top border line. */
@@
-216,24
+215,24
@@
static void draw_win_borderlines(struct Win * w, char active)
memcpy(title + 1, w->title, length_visible);
title[0] = title[length_visible + 1] = decoration;
title[length_visible + 2] = '\0';
memcpy(title + 1, w->title, length_visible);
title[0] = title[length_visible + 1] = decoration;
title[length_visible + 2] = '\0';
- mvwaddstr(wgetparent(w->frame.curses_win),
- w->start.y - 1, w->start.x + title_offset, title);
+ mvwaddstr(pad, w->start.y - 1, w->start.x + title_offset, title);
}
}
}
}
-static void draw_wins_borderlines(struct Win * w, struct Win * w_active)
+static void draw_wins_borderlines(struct Win * w, struct Win * w_active,
+ WINDOW * pad)
{
char active = 0;
if (w == w_active)
{
active = 1;
}
{
char active = 0;
if (w == w_active)
{
active = 1;
}
- draw_win_borderlines(w, active);
+ draw_win_borderlines(w, active
, pad
);
if (0 != w->next)
{
if (0 != w->next)
{
- draw_wins_borderlines (w->next, w_active);
+ draw_wins_borderlines (w->next, w_active
, pad
);
}
}
}
}
@@
-495,7
+494,8
@@
extern void draw_all_wins(struct WinMeta * wmeta)
/* Draw windows' contents first, then their borders. */
draw_wins(wmeta->chain_start);
/* Draw windows' contents first, then their borders. */
draw_wins(wmeta->chain_start);
- draw_wins_borderlines(wmeta->chain_start, wmeta->active);
+ draw_wins_borderlines(wmeta->chain_start, wmeta->active,
+ wmeta->pad.curses_win);
draw_wins_bordercorners(wmeta->chain_start, wmeta->pad.curses_win);
/* Draw virtual screen scroll hints. */
draw_wins_bordercorners(wmeta->chain_start, wmeta->pad.curses_win);
/* Draw virtual screen scroll hints. */