Quake-III-Arena

Quake III Arena GPL Source Release
Log | Files | Refs

MRU.H (3429B)


      1 /*
      2 ===========================================================================
      3 Copyright (C) 1999-2005 Id Software, Inc.
      4 
      5 This file is part of Quake III Arena source code.
      6 
      7 Quake III Arena 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 III Arena 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 Foobar; if not, write to the Free Software
     19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
     20 ===========================================================================
     21 */
     22 //*************************************************************
     23 //  File name: mru.h
     24 //
     25 //  Description:
     26 //
     27 //      Header for MRU support
     28 //
     29 //  Development Team:
     30 //
     31 //      Gilles Vollant (100144.2636@compuserve.com) 
     32 //
     33 //*************************************************************
     34 
     35 #ifndef __MRU_H__
     36 #define __MRU_H__
     37 
     38 #define NBMRUMENUSHOW   6       // Default number of MRU showed in the menu File
     39 #define NBMRUMENU       9       // Default number of MRU stored
     40 #define IDMRU           8000    // Default First ID of MRU
     41 #ifdef  OFS_MAXPATHNAME
     42 #define MAXSIZEMRUITEM  OFS_MAXPATHNAME
     43 #else
     44 #define MAXSIZEMRUITEM  128     // Default max size of an entry
     45 #endif
     46 
     47 typedef struct
     48 {
     49 WORD wNbItemFill;
     50 WORD wNbLruShow;
     51 WORD wNbLruMenu;
     52 WORD wMaxSizeLruItem;
     53 WORD wIdMru;
     54 LPSTR lpMRU;
     55 } MRUMENU;
     56 
     57 typedef MRUMENU FAR * LPMRUMENU;
     58 
     59 #ifdef __cplusplus
     60 LPMRUMENU       CreateMruMenu  (WORD wNbLruShowInit=NBMRUMENUSHOW,
     61                                 WORD wNbLruMenuInit=NBMRUMENU,
     62                                 WORD wMaxSizeLruItemInit=MAXSIZEMRUITEM,
     63                                 WORD wIdMruInit=IDMRU);
     64 #else
     65 LPMRUMENU       CreateMruMenu  (WORD wNbLruShowInit,
     66                                 WORD wNbLruMenuInit,
     67                                 WORD wMaxSizeLruItemInit,
     68                                 WORD wIdMruInit);
     69 #endif
     70 
     71 LPMRUMENU       CreateMruMenuDefault();
     72 void            DeleteMruMenu  (LPMRUMENU lpMruMenu);  
     73 
     74 void            SetNbLruShow   (LPMRUMENU lpMruMenu,WORD wNbLruShowInit);
     75 BOOL            SetMenuItem    (LPMRUMENU lpMruMenu,WORD wItem,
     76                                 LPSTR lpItem);
     77 BOOL            GetMenuItem    (LPMRUMENU lpMruMenu,WORD wItem,
     78                                 BOOL fIDMBased,LPSTR lpItem,UINT uiSize);
     79 BOOL            DelMenuItem    (LPMRUMENU lpMruMenu,WORD wItem,BOOL fIDMBased);
     80 void            AddNewItem     (LPMRUMENU lpMruMenu,LPSTR lpItem);
     81 void            PlaceMenuMRUItem(LPMRUMENU lpMruMenu,HMENU hMenu,UINT uiItem);
     82 
     83 BOOL            SaveMruInIni   (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
     84 BOOL            LoadMruInIni   (LPMRUMENU lpMruMenu,LPSTR lpszSection,LPSTR lpszFile);
     85 #ifdef WIN32
     86 BOOL            SaveMruInReg   (LPMRUMENU lpMruMenu,LPSTR lpszKey);
     87 BOOL            LoadMruInReg   (LPMRUMENU lpMruMenu,LPSTR lpszKey);
     88 
     89 typedef enum 
     90 {
     91 WIN32S,
     92 WINNT,
     93 WIN95ORGREATHER
     94 } WIN32KIND;
     95 WIN32KIND GetWin32Kind();
     96 #endif
     97 
     98 
     99 //////////////////////////////////////////////////////////////
    100 #endif