1*f877fb74SAxel Dörfler /* 2*f877fb74SAxel Dörfler * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved. 3*f877fb74SAxel Dörfler * Distributed under the terms of the MIT License. 4*f877fb74SAxel Dörfler */ 5*f877fb74SAxel Dörfler #ifndef SETTINGS_H 6*f877fb74SAxel Dörfler #define SETTINGS_H 7*f877fb74SAxel Dörfler 8*f877fb74SAxel Dörfler 9*f877fb74SAxel Dörfler #include <Point.h> 10*f877fb74SAxel Dörfler #include <Volume.h> 11*f877fb74SAxel Dörfler 12*f877fb74SAxel Dörfler 13*f877fb74SAxel Dörfler class Settings { 14*f877fb74SAxel Dörfler public : 15*f877fb74SAxel Dörfler Settings(); 16*f877fb74SAxel Dörfler virtual ~Settings(); 17*f877fb74SAxel Dörfler 18*f877fb74SAxel Dörfler BPoint WindowPosition() const { return fWindowPosition; } 19*f877fb74SAxel Dörfler void SetWindowPosition(BPoint position); 20*f877fb74SAxel Dörfler 21*f877fb74SAxel Dörfler bool SwapEnabled() const { return fSwapEnabled; } 22*f877fb74SAxel Dörfler off_t SwapSize() const { return fSwapSize; } 23*f877fb74SAxel Dörfler BVolume& SwapVolume() { return fSwapVolume; } 24*f877fb74SAxel Dörfler void SetSwapEnabled(bool enabled); 25*f877fb74SAxel Dörfler void SetSwapSize(off_t size); 26*f877fb74SAxel Dörfler void SetSwapVolume(BVolume& volume); 27*f877fb74SAxel Dörfler 28*f877fb74SAxel Dörfler void SetSwapDefaults(); 29*f877fb74SAxel Dörfler void RevertSwapChanges(); 30*f877fb74SAxel Dörfler bool SwapChanged(); 31*f877fb74SAxel Dörfler 32*f877fb74SAxel Dörfler private: 33*f877fb74SAxel Dörfler void ReadWindowSettings(); 34*f877fb74SAxel Dörfler void WriteWindowSettings(); 35*f877fb74SAxel Dörfler 36*f877fb74SAxel Dörfler void ReadSwapSettings(); 37*f877fb74SAxel Dörfler void WriteSwapSettings(); 38*f877fb74SAxel Dörfler 39*f877fb74SAxel Dörfler BPoint fWindowPosition; 40*f877fb74SAxel Dörfler 41*f877fb74SAxel Dörfler bool fSwapEnabled; 42*f877fb74SAxel Dörfler off_t fSwapSize; 43*f877fb74SAxel Dörfler BVolume fSwapVolume; 44*f877fb74SAxel Dörfler 45*f877fb74SAxel Dörfler bool fInitialSwapEnabled; 46*f877fb74SAxel Dörfler off_t fInitialSwapSize; 47*f877fb74SAxel Dörfler dev_t fInitialSwapVolume; 48*f877fb74SAxel Dörfler 49*f877fb74SAxel Dörfler bool fPositionUpdated, fSwapUpdated; 50*f877fb74SAxel Dörfler }; 51*f877fb74SAxel Dörfler 52*f877fb74SAxel Dörfler #endif /* SETTINGS_H */ 53