chiark / gitweb /
Create readable text `.bas' for each tokenized BASIC `,ffb' file.
[ssr] / StraySrc / Glass / !Glass / h / iconData
1 /*
2  * iconData.h
3  *
4  * Central handling for icon data
5  *
6  * © 1994-1998 Straylight
7  */
8
9 /*----- Licensing note ----------------------------------------------------*
10  *
11  * This file is part of Straylight's Glass.
12  *
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)
16  * any later version.
17  *
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.
22  *
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.
26  */
27
28 #ifndef __iconData_h
29 #define __iconData_h
30
31 /*----- Required header files ---------------------------------------------*/
32
33 #ifndef __gStruct_h
34   #include "gStruct.h"
35 #endif
36
37 /*----- Type definitions --------------------------------------------------*/
38
39 typedef char *(*iconData_proc)(char *ptr,void *handle);
40
41 /*----- External routines -------------------------------------------------*/
42
43 /*
44  * BOOL iconData_processIcon
45  * (
46  *   glass_windPointer *w,
47  *   int i;
48  *   iconData_proc proc,
49  *   BOOL updateSize,
50  *   void *handle
51  * )
52  *
53  * Use
54  *  Processes one icon in the given window.  This routine will replace all
55  *  the indirection pointers with pointers to blocks from the indirection
56  *  heap.
57  *
58  * Parameters
59  *   glass_windPointer *w == the window data from which the icon is from
60  *   int i == the icon to update (-1 for the title)
61  *   BOOL updateSize == whether to update the window's size variable
62  *   iconData_proc proc == function to return a pointer to an indirected
63  *     string given what's in the data word.  Pass 0 if its actually a
64  *     valid pointer
65  *   void *handle == pointer to pass to 'proc'
66  *
67  * Returns
68  *  FALSE if it ran out of memory, or TRUE for success
69  */
70
71 BOOL iconData_processIcon
72 (
73   glass_windPointer *w,
74   int i,
75   iconData_proc proc,
76   BOOL updateSize,
77   void *handle
78 );
79
80
81 /*
82  * BOOL iconData_handleFont(glass_windPointer *w,wimp_iconflags *f)
83  *
84  * Use
85  *  Processes a font handle, refinding etc. and adding to font reference
86  *  array.  It assumes the icon is from an external source, and doesn't
87  *  attempt to free the font.
88  *
89  * Parameters
90  *  glass_windPointer *w == the window containing the icon/title to fiddle
91  *  wimp_iconflags *f == icon flags to fiddle with
92  *
93  * Returns
94  *  TRUE if all went well, or FALSE if the icon's font has been lost.  In
95  *  this case the icon has been deantialiased(!) leaving potentially very
96  *  strange colours.
97  */
98
99 BOOL iconData_handleFont(glass_windPointer *w,wimp_iconflags *f);
100
101 #endif