File: gtw_pair.h

package info (click to toggle)
glktermw 1.0.4%2Bgit20200122-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 844 kB
  • sloc: ansic: 22,241; makefile: 27
file content (31 lines) | stat: -rw-r--r-- 1,252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/* gtw_pair.h: The pair window header
        for GlkTerm, curses.h implementation of the Glk API.
    Designed by Andrew Plotkin <erkyrath@eblong.com>
    http://www.eblong.com/zarf/glk/index.html
*/

typedef struct window_pair_struct {
    window_t *owner;

    window_t *child1, *child2; 
    int splitpos; /* The split center. To be picky, this is the position
        of the top of the border, or the top of the bottom window if the
        border is zero-width. (If vertical is true, rotate this comment
        90 degrees.) */
    int splitwidth; /* The width of the border. Zero or one. */
    
    /* split info... */
    glui32 dir; /* winmethod_Left, Right, Above, or Below */
    int vertical, backward, hasborder; /* flags */
    glui32 division; /* winmethod_Fixed or winmethod_Proportional */
    window_t *key; /* NULL or a leaf-descendant (not a Pair) */
    int keydamage; /* used as scratch space in window closing */
    glui32 size; /* size value */
    
} window_pair_t;

extern window_pair_t *win_pair_create(window_t *win, glui32 method, 
    window_t *key, glui32 size);
extern void win_pair_destroy(window_pair_t *dwin);
extern void win_pair_rearrange(window_t *win, grect_t *box);
extern void win_pair_redraw(window_t *win);