/* * window.h * * Manipulation of window templates * * © 1994-1998 Straylight */ /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Glass. * * Glass is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Glass is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Glass. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __window_h #define __window_h /*----- Required header files ---------------------------------------------*/ #ifndef __gStruct_h #include "gStruct.h" #endif /*----- External routines -------------------------------------------------*/ /* * void window_updateToolbar(void) * * Use * Updates the display of toolbars as necessary in line with new * Preferences settings. It is assumed that Preferences is intelligent * enough to only call this if something actually needs to be done! */ void window_updateToolbar(void); /* * void window_boundingBox(glass_windPointer *w,int icon,wimp_box *box) * * Use * Gets the bounding box of the icon given and returns it in the block * pointed to by box * * Parameters * glass_windPointer *w == the window containing the icon * int icon == the icon to 'boxise' * wimp_box *box == where to put the result */ void window_boundingBox(glass_windPointer *w,int icon,wimp_box *box); /* * void window_setBox(glass_windPointer *w,int icon,wimp_box *box) * * Use * Sets the icon bounding box to the box given, taking into account * Interface borders and so on. * * Parameters * glass_windPointer *w == the window containing the icon * int icon == the icon number * wimp_box *box == the new box for the icon */ void window_setBox(glass_windPointer *w,int icon,wimp_box *box); /* * glass_windPointer *window_selectionOwner(void) * * Use * Returns the window currently owning the selection. */ glass_windPointer *window_selectionOwner(void); /* * void window_deleteIcon(glass_windPointer *w,int icon) * * Use * Deletes the icon specified, good an' proper. * * Parameters * glass_windPointer *w == the scene of the crime * int icon == the victim... */ void window_deleteIcon(glass_windPointer *w,int icon); /* * void window_redrawIcon(glass_windPointer *w,int icon) * * Use * Sets the WIMP up to call for a redraw of the spcified icon (i.e. it * uses Wimp_ForceRedraw). * * Parameters * glass_windPointer *w == pointer to the window owning the icon * int icon == the icon to redraw */ void window_redrawIcon(glass_windPointer *w,int icon); /* * void window_renumber(glass_windPointer *w,int icon,int new) * * Use * Renumbers an icon, by removing it from the array, shuffling others out * the way, and the putting it in its new position (i.e. its an insert * renumber, not a swap renumber like the old version - which wasn't * terribly useful...) * * Parameters * glass_windPointer *w == the window containing the icon * int icon == the icon to renumber * int new == the new number to give it */ BOOL window_renumber(glass_windPointer *w,int icon,int new); /* * void window_hasBeenDeleted(glass_windPointer *w) * * Use * Informs the window system that a window is about to be deleted. * * Parameters * glass_windPointer *w == the window that bites the dust */ void window_hasBeenDeleted(glass_windPointer *w); /* * void window_grab(void (*proc)(wimp_mousestr *m,void *handle),void *handle) * * Use * Turns on 'grab mode' and calls the specified routine when a mouse button * is clicked. * * Parameters * void (*proc)(wimp_mousestr *m,void *handle) == the routine to call * void *handle == the handle to call the routine with */ void window_grab(void (*proc)(wimp_mousestr *m,void *handle),void *handle); /* * BOOL window_grabbing(void) * * Use * Returns whether grab mode is set or not * * Returns * TRUE if grab mode set */ BOOL window_grabbing(void); /* * void window_recreate(glass_windPointer *w) * * Use * Recreates a window after editing. Nothing happens if the window is not * open already. If an error occurs, the open window is removed and left * that way. * * Parameters * glass_windPointer *w == the window to recreate */ void window_recreate(glass_windPointer *w); /* * void window_close(glass_windPointer *w) * * Use * Closes the specified window. * * Parameters * glass_windPointer *w == the window wot we 'ave to close */ void window_close(glass_windPointer *w); /* * void window_open(glass_windPointer *w,BOOL test) * * Use * Opens the specified window. If the window is off-screen, it is moved * back. This routine also registers all handlers required for editing the * window etc. If the window is already open, it is brought to the front. * * Parameters * glass_windPointer *w == pointer to basic window information. * BOOL test == open in test mode or not */ void window_open(glass_windPointer *w,BOOL test); /* * void window_init(void) * * Use * Reads the default template file and ceates the menu etc. */ void window_init(void); #endif