A tiling window manager
1/*
2 * Copyright (c) 2019 joshua stein <jcs@jcs.org>
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU General Public License as published by the Free
6 * Software Foundation; either version 2 of the License, or (at your option)
7 * any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 *
14 * You should have received a copy of the GNU General Public License along with
15 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
16 * Place, Suite 330, Boston, MA 02111-1307 USA.
17 */
18
19#ifndef VSCREEN_H
20#define VSCREEN_H
21
22void init_vscreen(rp_vscreen *v, rp_screen *s);
23void vscreen_del(rp_vscreen *v);
24void vscreen_free(rp_vscreen *v);
25int vscreens_resize(int n);
26
27rp_vscreen *screen_find_vscreen_by_number(rp_screen *s, int n);
28rp_vscreen *screen_find_vscreen_by_name(rp_screen *s, char *name, int exact_match);
29
30struct list_head *vscreen_copy_frameset(rp_vscreen *v);
31void vscreen_restore_frameset(rp_vscreen *v, struct list_head *head);
32void vscreen_free_nums(rp_vscreen *v);
33void frameset_free(struct list_head *head);
34rp_frame *vscreen_get_frame(rp_vscreen *v, int frame_num);
35rp_frame *vscreen_find_frame_by_frame(rp_vscreen *v, rp_frame *f);
36
37void set_current_vscreen(rp_vscreen *v);
38void vscreen_move_window(rp_vscreen *v, rp_window *w);
39
40
41void vscreen_add_window(rp_vscreen *v, rp_window *w);
42void vscreen_resort_window(rp_vscreen *v, rp_window_elem *w);
43void vscreen_insert_window(struct list_head *h, rp_window_elem *w);
44
45void vscreen_del_window(rp_vscreen *v, rp_window *win);
46
47void vscreen_map_window(rp_vscreen *v, rp_window *win);
48
49void vscreen_unmap_window(rp_vscreen *v, rp_window *win);
50
51struct numset *vscreen_get_numset(rp_vscreen *v);
52void get_vscreen_list(rp_screen *s, char *delim, struct sbuf *buffer,
53 int *mark_start, int *mark_end);
54
55rp_window *vscreen_prev_window(rp_vscreen *v, rp_window *win);
56rp_window *vscreen_next_window(rp_vscreen *v, rp_window *win);
57
58rp_window *vscreen_last_window(rp_vscreen *v);
59
60rp_vscreen *vscreen_prev_vscreen(rp_vscreen *v);
61rp_vscreen *vscreen_next_vscreen(rp_vscreen *v);
62rp_vscreen *screen_last_vscreen(rp_screen *screen);
63
64void vscreen_rename(rp_vscreen *v, char *name);
65
66rp_window_elem *vscreen_find_window(struct list_head *list, rp_window *win);
67rp_window_elem *vscreen_find_window_by_number(rp_vscreen *g, int num);
68
69void vscreen_move_window(rp_vscreen *to, rp_window *win);
70void vscreens_merge(rp_vscreen *from, rp_vscreen *to);
71
72void set_current_vscreen(rp_vscreen *v);
73
74rp_window *vscreen_last_window_by_class(rp_vscreen *v, char *class);
75rp_window *vscreen_last_window_by_class_complement(rp_vscreen *v, char *class);
76
77void vscreen_announce_current(rp_vscreen *v);
78
79#define rp_current_vscreen (rp_current_screen->current_vscreen)
80
81#endif