4 * Manipulation of window templates
6 * © 1994-1998 Straylight
9 /*----- Licensing note ----------------------------------------------------*
11 * This file is part of Straylight's Glass.
13 * Glass is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2, or (at your option)
18 * Glass is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with Glass. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 /*----- Required header files ---------------------------------------------*/
37 /*----- External routines -------------------------------------------------*/
40 * void window_updateToolbar(void)
43 * Updates the display of toolbars as necessary in line with new
44 * Preferences settings. It is assumed that Preferences is intelligent
45 * enough to only call this if something actually needs to be done!
48 void window_updateToolbar(void);
51 * void window_boundingBox(glass_windPointer *w,int icon,wimp_box *box)
54 * Gets the bounding box of the icon given and returns it in the block
58 * glass_windPointer *w == the window containing the icon
59 * int icon == the icon to 'boxise'
60 * wimp_box *box == where to put the result
63 void window_boundingBox(glass_windPointer *w,int icon,wimp_box *box);
66 * void window_setBox(glass_windPointer *w,int icon,wimp_box *box)
69 * Sets the icon bounding box to the box given, taking into account
70 * Interface borders and so on.
73 * glass_windPointer *w == the window containing the icon
74 * int icon == the icon number
75 * wimp_box *box == the new box for the icon
78 void window_setBox(glass_windPointer *w,int icon,wimp_box *box);
81 * glass_windPointer *window_selectionOwner(void)
84 * Returns the window currently owning the selection.
87 glass_windPointer *window_selectionOwner(void);
90 * void window_deleteIcon(glass_windPointer *w,int icon)
93 * Deletes the icon specified, good an' proper.
96 * glass_windPointer *w == the scene of the crime
97 * int icon == the victim...
100 void window_deleteIcon(glass_windPointer *w,int icon);
103 * void window_redrawIcon(glass_windPointer *w,int icon)
106 * Sets the WIMP up to call for a redraw of the spcified icon (i.e. it
107 * uses Wimp_ForceRedraw).
110 * glass_windPointer *w == pointer to the window owning the icon
111 * int icon == the icon to redraw
114 void window_redrawIcon(glass_windPointer *w,int icon);
117 * void window_renumber(glass_windPointer *w,int icon,int new)
120 * Renumbers an icon, by removing it from the array, shuffling others out
121 * the way, and the putting it in its new position (i.e. its an insert
122 * renumber, not a swap renumber like the old version - which wasn't
123 * terribly useful...)
126 * glass_windPointer *w == the window containing the icon
127 * int icon == the icon to renumber
128 * int new == the new number to give it
131 BOOL window_renumber(glass_windPointer *w,int icon,int new);
134 * void window_hasBeenDeleted(glass_windPointer *w)
137 * Informs the window system that a window is about to be deleted.
140 * glass_windPointer *w == the window that bites the dust
143 void window_hasBeenDeleted(glass_windPointer *w);
146 * void window_grab(void (*proc)(wimp_mousestr *m,void *handle),void *handle)
149 * Turns on 'grab mode' and calls the specified routine when a mouse button
153 * void (*proc)(wimp_mousestr *m,void *handle) == the routine to call
154 * void *handle == the handle to call the routine with
157 void window_grab(void (*proc)(wimp_mousestr *m,void *handle),void *handle);
160 * BOOL window_grabbing(void)
163 * Returns whether grab mode is set or not
166 * TRUE if grab mode set
169 BOOL window_grabbing(void);
172 * void window_recreate(glass_windPointer *w)
175 * Recreates a window after editing. Nothing happens if the window is not
176 * open already. If an error occurs, the open window is removed and left
180 * glass_windPointer *w == the window to recreate
183 void window_recreate(glass_windPointer *w);
186 * void window_close(glass_windPointer *w)
189 * Closes the specified window.
192 * glass_windPointer *w == the window wot we 'ave to close
195 void window_close(glass_windPointer *w);
198 * void window_open(glass_windPointer *w,BOOL test)
201 * Opens the specified window. If the window is off-screen, it is moved
202 * back. This routine also registers all handlers required for editing the
203 * window etc. If the window is already open, it is brought to the front.
206 * glass_windPointer *w == pointer to basic window information.
207 * BOOL test == open in test mode or not
210 void window_open(glass_windPointer *w,BOOL test);
213 * void window_init(void)
216 * Reads the default template file and ceates the menu etc.
219 void window_init(void);