summaryrefslogtreecommitdiff
path: root/window.h
blob: 98a96ceda18fdd2e88a32bd6bd50a4ce4732fc02 (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
#include <stdio.h>
#include <pixman.h>

#ifndef FALSE
#define FALSE 0
#endif

#ifndef TRUE
#define TRUE 1
#endif

typedef struct ws_t ws_t;
typedef struct drawable_t drawable_t;
typedef struct window_t window_t;
typedef struct surfade_t surface_t;

/* Window system */
ws_t *	ws_open (void);
int	ws_get_width (ws_t *ws);
int	ws_get_height (ws_t *ws);

/* Window */
window_t *ws_create_window          (ws_t           *ws,
				     int             x,
				     int             y,
				     int             width,
				     int             height);
void      ws_window_ref		    (window_t	    *window);
void	  ws_window_unref	    (window_t	    *window);
void      ws_window_show            (window_t       *window);
void      ws_window_hide            (window_t       *window);
void      ws_window_move            (window_t       *window,
				     int             x,
				     int             y);
void      ws_window_resize          (window_t       *window,
				     int             w,
				     int             h);
void      ws_window_copy_area       (window_t       *window,
				     int             src_x,
				     int             src_y,
				     int             dst_x,
				     int             dst_y,
				     int             width,
				     int             height);
void      ws_window_copy_from_image (window_t       *window,
				     pixman_image_t *image,
				     int             image_x,
				     int             image_y,
				     int             win_x,
				     int             win_y,
				     int             width,
				     int             height);
void	  ws_window_copy_to_image   (window_t       *window,
				     pixman_image_t *image,
				     int	     image_x,
				     int	     image_y,
				     int	     win_x,
				     int	     win_y,
				     int	     width,
				     int	     height);

void	  ws_window_finish	    (window_t      **windows,
				     int	     n_windows);