blob: a9091be904ed955198fbc6c0c4e98f99ada05fb0 (
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
|
/*
* File: rwinrsc.r
* Icon graphics interface resources
*
* Resources are allocated through a layer of internal management
* routines in order to handle aliasing and resource sharing.
*/
#ifdef Graphics
/*
* global variables.
*/
wcp wcntxts = NULL;
wsp wstates = NULL;
wbp wbndngs = NULL;
int win_highwater = -1;
#ifdef XWindows
#include "rxrsc.ri"
#endif /* XWindows */
/*
* allocate a window binding structure
*/
wbp alc_wbinding()
{
wbp w;
GRFX_ALLOC(w, _wbinding);
GRFX_LINK(w, wbndngs);
return w;
}
/*
* free a window binding.
*/
void free_binding(w)
wbp w;
{
w->refcount--;
if(w->refcount == 0) {
if (w->window) free_window(w->window);
if (w->context) free_context(w->context);
GRFX_UNLINK(w, wbndngs);
}
}
#endif /* Graphics */
|