summaryrefslogtreecommitdiff
path: root/src/screen.h
blob: fdc07484d07ada1134d88873c8e34a271abc0c76 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/* Copyright (C) 2000, 2001, 2002, 2003, 2004 Shawn Betts <sabetts@vcn.bc.ca>
 *
 * This file is part of ratpoison.
 *
 * ratpoison is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 *
 * ratpoison is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this software; see the file COPYING.  If not, write to
 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307 USA
 */

#ifndef SCREEN_H
#define SCREEN_H

int screen_bottom (rp_screen *s);
int screen_top (rp_screen *s);
int screen_right (rp_screen *s);
int screen_left (rp_screen *s);
int screen_height (rp_screen *s);
int screen_width (rp_screen *s);

struct list_head *screen_copy_frameset (rp_screen *s);
void screen_restore_frameset (rp_screen *s, struct list_head *head);
void screen_free_nums (rp_screen *s);
void frameset_free (struct list_head *head);
rp_frame *screen_get_frame (rp_screen *s, int frame_num);
rp_frame *screen_find_frame_by_frame (rp_screen *s, rp_frame *f);

rp_screen *find_screen (Window w);
rp_screen *find_screen_by_attr (XWindowAttributes w);

void init_screens (void);
void activate_screen (rp_screen *s);
void deactivate_screen (rp_screen *s);

int is_rp_window (Window w);
int is_a_root_window (unsigned int w);

char *screen_dump (rp_screen *screen);

void screen_update (rp_screen *s, int left, int top, int width, int height);

int screen_count (void);

rp_screen *screen_next(void);
rp_screen *screen_prev(void);

rp_screen *screen_number (int number);

void screen_sort(void);

rp_screen *screen_add(int rr_output);
void screen_del(rp_screen *s);
void screen_free (rp_screen *s);
void screen_free_final(void);

#endif