Initial revision
[ssr] / StraySrc / Libraries / Steel / h / fileicon
1 /****************************************************************************
2 * This source file was written by Acorn Computers Limited. It is part of *
3 * the RISCOS library for writing applications in C for RISC OS. It may be *
4 * used freely in the creation of programs for Archimedes. It should be *
5 * used with Acorn's C Compiler Release 3 or later. *
6 * *
7 ***************************************************************************/
8
9 /*----- Licensing note ----------------------------------------------------*
10 *
11 * This file is part of Straylight's Steel library.
12 *
13 * Steel 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 * Steel 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 Steel. If not, write to the Free Software Foundation,
25 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 */
27
28 /*
29 * Title: fileicon.h
30 * Purpose: general display of a file icon in a window.
31 *
32 */
33
34 # ifndef __fileicon_h
35 # define __fileicon_h
36
37 # ifndef __wimp_h
38 # include "wimp.h"
39 # endif
40
41 /*
42 * char *fileicon_spriteName(int filetype,char *name)
43 *
44 * Use
45 * Returns the name of the sprite required to display the file whose name is given.
46 *
47 * Parameters
48 * int filetype == the type of the file
49 * char *name == the name of the file (may be full pathname)
50 *
51 * Returns
52 * Pointer to read-only string.
53 */
54
55 char *fileicon_spriteName(int filetype,char *name);
56
57 /* ------------------------------ fileicon ---------------------------------
58 * Description: Display an icon representing a file, in a given window
59 *
60 * Parameters: wimp_w -- the given window's handle
61 * wimp_i -- an existing icon
62 * int filetype -- RISC OS file type (eg. 0x0ffe)
63 * char *name -- the name of the file (may be pathname)
64 * Returns: void.
65 * Other Info: If you want a file icon in a dialogue box then pass that
66 * dialogue box's window handle through first parameter,
67 * eg fileicon((wimp_w)dbox_syshandle(d),........)
68 * The second parameter is the icon number of the required
69 * icon, within the template set up using FormEd
70 * For an example see the fileInfo template for !Edit.
71 *
72 */
73
74 void fileicon(wimp_w, wimp_i, int filetype,char *name);
75
76 #endif
77
78 /* end fileicon.h */
79
80