Debian Codegraph @

tools/quake2/extra/qe4/mru.h

raw symbols SCIP
1 /*
2 ===========================================================================
3 Copyright (C) 1997-2006 Id Software, Inc.
4
5 This file is part of Quake 2 Tools source code.
6
7 Quake 2 Tools source code is free software; you can redistribute it
8 and/or modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the License,
10 or (at your option) any later version.
11
12 Quake 2 Tools source code is distributed in the hope that it will be
13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with Quake 2 Tools source code; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 ===========================================================================
21 */
22
23 //*************************************************************
24 // File name: mru.h
25 //
26 // Description:
27 //
28 // Header for MRU support
29 //
30 // Development Team:
31 //
32 // Gilles Vollant ([email protected])
33 //
34 //*************************************************************
35
36 #ifndef __MRU_H__
37 #define __MRU_H__
38
39 #include "globaldefs.h"
40
41 #define NBMRUMENUSHOW 6 // Default number of MRU showed in the menu File
42 #define NBMRUMENU 9 // Default number of MRU stored
43 #define IDMRU 8000 // Default First ID of MRU
44 #ifdef OFS_MAXPATHNAME
45 #define MAXSIZEMRUITEM OFS_MAXPATHNAME
46 #else
47 #define MAXSIZEMRUITEM 128 // Default max size of an entry
48 #endif
49
50 typedef struct
51 {
52 WORD wNbItemFill;
53 WORD wNbLruShow;
54 WORD wNbLruMenu;
55 WORD wMaxSizeLruItem;
56 WORD wIdMru;
57 LPSTR lpMRU;
58 } MRUMENU;
59
60 typedef MRUMENU FAR * LPMRUMENU;
61
62 #ifdef __cplusplus
63 LPMRUMENU CreateMruMenu (WORD wNbLruShowInit=NBMRUMENUSHOW,
64 WORD wNbLruMenuInit=NBMRUMENU,
65 WORD wMaxSizeLruItemInit=MAXSIZEMRUITEM,
66 WORD wIdMruInit=IDMRU);
67 #else
68 LPMRUMENU CreateMruMenu (WORD wNbLruShowInit,
69 WORD wNbLruMenuInit,
70 WORD wMaxSizeLruItemInit,
71 WORD wIdMruInit);
72 #endif
73
74 LPMRUMENU CreateMruMenuDefault();
75 void DeleteMruMenu (LPMRUMENU lpMruMenu);
76
77 void SetNbLruShow (LPMRUMENU lpMruMenu,WORD wNbLruShowInit);
78 BOOL SetMenuItem (LPMRUMENU lpMruMenu,WORD wItem,
79 LPSTR lpItem);
80 BOOL GetMenuItem (LPMRUMENU lpMruMenu,WORD wItem,
81 BOOL fIDMBased,LPSTR lpItem,UINT uiSize);
82 BOOL DelMenuItem (LPMRUMENU lpMruMenu,WORD wItem,BOOL fIDMBased);
83 void AddNewItem (LPMRUMENU lpMruMenu,LPSTR lpItem);
84 void PlaceMenuMRUItem(LPMRUMENU lpMruMenu,HMENU hMenu,UINT uiItem);
85
86 BOOL SaveMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
87 BOOL LoadMruInIni (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
88 #if GDEF_OS_WINDOWS
89 BOOL SaveMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey);
90 BOOL LoadMruInReg (LPMRUMENU lpMruMenu,LPSTR lpszKey);
91
92 typedef enum
93 {
94 WIN32S,
95 WINNT,
96 WIN95ORGREATHER
97 } WIN32KIND;
98 WIN32KIND GetWin32Kind();
99 #endif
100
101
102 //////////////////////////////////////////////////////////////
103 #endif