/* * gPrefs.h * * Loading, saving, alteration and setting of preferences * * © 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 __gPrefs_h #define __gPrefs_h /*----- Required headers --------------------------------------------------*/ #ifndef __glass_h #include "glass.h" #endif /*----- Structure definitions ---------------------------------------------*/ typedef enum { gPrefs_SECONDS=3, gPrefs_MINUTES=2, gPrefs_HOURS=1 } gPrefs_autoUnits; typedef enum { gPrefs_LARGE=1, gPrefs_SMALL } gPrefs_iconSize; typedef enum { gPrefs_NAME=1, gPrefs_SIZE, gPrefs_ICONS, gPrefs_NOSORT } gPrefs_sortType; typedef struct { int x; int y; } gPrefs_coords; typedef struct { gPrefs_autoUnits aUnit; /* Autosave time unit */ int aTime; /* Timed autosave */ int aAlts; /* Alteration-driven autosave */ BOOL aPrompt; /* Prompt on autosave */ BOOL iDispBorders; /* Display Interface borders */ BOOL iSlabIcons; /* Slab icons on click */ BOOL iIncBorder; /* Include interface borders in drags */ BOOL iSlabMenu; /* Slab buttons on menu click */ BOOL wDispBorders; /* Display WimpExtension borders */ BOOL wKeyPress; /* Slab icons on click */ BOOL wIncBorder; /* Include WimpExtension borders in drags */ BOOL sDispBorders; /* Display Skulpted borders */ BOOL sSlabIcons; /* Slab icons on click */ BOOL sIncBorder; /* Include Skulpted borders in drags */ BOOL sSlabMenu; /* Slab buttons on menu click */ BOOL sLoadSpr; /* Load Sprites file */ BOOL sLoadPSpr; /* Load !Sprites file */ BOOL sLoadDef; /* Load default Glass file */ gPrefs_iconSize fIcons; /* Template file viewer icon size */ gPrefs_sortType fSort; /* Template file viewer sort system */ BOOL gDisp; /* Grid display */ BOOL gLock; /* Grid lock */ int gWidth; /* Grid width */ int gHeight; /* Grid height */ BOOL gLines; /* Draw grid lines (rather than points) */ int gGridCol; /* Grid colour */ int gGdeCol; /* Guide colour */ int gGdeSelCol; /* Selected guide colour */ BOOL sBorder; /* Draw selection border */ BOOL sDotted; /* Selection border dotted line */ int sBColour; /* Border colour */ BOOL sEdgeHandles; /* Include edge drag handles */ int sHandSize; /* Handle size */ int sHColour; /* Handle colour */ int sSColour; /* Special handle colour */ BOOL cQuit; /* Confirm quit with unsaved files */ BOOL cClose; /* Confirm close unsaved file */ BOOL cDelWind; /* Confirm delete window */ BOOL cDelIcon; /* Confirm delete icon */ BOOL cTest; /* Confirm closing edits on test mode */ BOOL cSave; /* Confirm overwriting files */ BOOL tDisplay; /* Display the toolbar */ BOOL tFloating; /* Free-floating toolbar */ gPrefs_coords tPosn; /* Toolbar position on screen */ BOOL tLeft; /* Is the tool bar on the left of window */ BOOL iDisplay; /* Display the infobar */ BOOL iFloating; /* Free-floating infobar */ gPrefs_coords iPosn; /* Infobar position on screen */ BOOL iUnder; /* Is the info bar under the window */ BOOL mDrawHatch; /* Draw a hatch pattern in windows */ BOOL mBlink; /* Blink the cursor */ BOOL mVisInWork; /* Keep visiable area in work area */ BOOL mCreateTop; /* Create icons on top */ BOOL mDeleteRenum; /* Keep icon numbers on delete */ BOOL mCtrlEdit; /* Require control key on edit */ } gPrefs_prefs; /*----- External routines -------------------------------------------------*/ /* * void gPrefs_init(void) * * Use * Reads preferences file and initialises things accordingly */ void gPrefs_init(void); /* * gPrefs_prefs *gPrefs_current(void) * * Use * Returns the current preferences settings. * * Returns * A pointer to the structure as defined above. */ gPrefs_prefs *gPrefs_current(void); /* * int gPrefs_autoTiming(void) * * Use * Returns the current autosave time in centiseconds, or 0 for no timed * autosave. */ int gPrefs_autoTiming(void); /* * void gPrefs_edit(void) * * Use * Opens the preferences dialogue box to allow editing of preferences. */ void gPrefs_edit(void); #endif