summaryrefslogtreecommitdiff
path: root/window.c
blob: 5774bd8dc7d226bb222a1c1a1e39fc01777cc628 (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
#include <X11/Xlib.h>
#include <string.h>

typedef struct xenon_window
{
	Window window;
	struct xenon_window* next;
}
xenon_window;

static xenon_window* window_list = NULL;

Window window_create()
{
	xenon_window* new_window = (xenon_window*) malloc ( sizeof(xenon_window) );
	new_window -> next = window_list;
	window_list = new_window;
	return new_window->window;
}

xenon_window* window_find(Window wid)
{
	xenon_window* w = window_list;
	while(w)
	{
		if (w->window == wid)
			return w;
		w = w->next;
	}
	return NULL;
}

void window_resize(Window w, int width, int height)
{
	xenon_window* xw = window_find(w);
	
}

void window_move(Window w, int posx, int posy)
{
	xenon_window* xw = window_find(w);

}