54 |
* the device chain returned by this function. For example, if an |
* the device chain returned by this function. For example, if an |
55 |
* X11 device was compiled in the library, it will be part of |
* X11 device was compiled in the library, it will be part of |
56 |
* the returned device chain only if a connection to the display |
* the returned device chain only if a connection to the display |
57 |
* could be establisged |
* could be established |
58 |
* |
* |
59 |
* If no driver could be initialised, this function returns NULL. |
* If no driver could be initialised, this function returns NULL. |
60 |
* |
* |
66 |
grDeviceChain* chain = GR_INIT_DEVICE_CHAIN; |
grDeviceChain* chain = GR_INIT_DEVICE_CHAIN; |
67 |
grDeviceChain* cur = gr_device_chain; |
grDeviceChain* cur = gr_device_chain; |
68 |
|
|
69 |
|
|
70 |
while (chain) |
while (chain) |
71 |
{ |
{ |
72 |
/* initialize the device */ |
/* initialize the device */ |
95 |
} |
} |
96 |
|
|
97 |
|
|
98 |
|
extern |
99 |
|
void grDoneDevices( void ) |
100 |
|
{ |
101 |
|
int i; |
102 |
|
grDeviceChain* chain = gr_device_chain; |
103 |
|
|
104 |
|
|
105 |
|
for ( i = 0; i < gr_num_devices; i++ ) |
106 |
|
{ |
107 |
|
chain->device->done(); |
108 |
|
|
109 |
|
chain->next = 0; |
110 |
|
chain->device = 0; |
111 |
|
chain->name = 0; |
112 |
|
|
113 |
|
chain++; |
114 |
|
} |
115 |
|
|
116 |
|
gr_num_devices = 0; |
117 |
|
} |