/* * iconData.h * * Central handling for icon data * * © 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 __iconData_h #define __iconData_h /*----- Required header files ---------------------------------------------*/ #ifndef __gStruct_h #include "gStruct.h" #endif /*----- Type definitions --------------------------------------------------*/ typedef char *(*iconData_proc)(char *ptr,void *handle); /*----- External routines -------------------------------------------------*/ /* * BOOL iconData_processIcon * ( * glass_windPointer *w, * int i; * iconData_proc proc, * BOOL updateSize, * void *handle * ) * * Use * Processes one icon in the given window. This routine will replace all * the indirection pointers with pointers to blocks from the indirection * heap. * * Parameters * glass_windPointer *w == the window data from which the icon is from * int i == the icon to update (-1 for the title) * BOOL updateSize == whether to update the window's size variable * iconData_proc proc == function to return a pointer to an indirected * string given what's in the data word. Pass 0 if its actually a * valid pointer * void *handle == pointer to pass to 'proc' * * Returns * FALSE if it ran out of memory, or TRUE for success */ BOOL iconData_processIcon ( glass_windPointer *w, int i, iconData_proc proc, BOOL updateSize, void *handle ); /* * BOOL iconData_handleFont(glass_windPointer *w,wimp_iconflags *f) * * Use * Processes a font handle, refinding etc. and adding to font reference * array. It assumes the icon is from an external source, and doesn't * attempt to free the font. * * Parameters * glass_windPointer *w == the window containing the icon/title to fiddle * wimp_iconflags *f == icon flags to fiddle with * * Returns * TRUE if all went well, or FALSE if the icon's font has been lost. In * this case the icon has been deantialiased(!) leaving potentially very * strange colours. */ BOOL iconData_handleFont(glass_windPointer *w,wimp_iconflags *f); #endif