1 /* 2 * Copyright (c) 2008 Stephan Aßmus <superstippi@gmx.de>. All rights reserved. 3 * Distributed under the terms of the MIT/X11 license. 4 * 5 * Copyright (c) 1999 Mike Steed. You are free to use and distribute this software 6 * as long as it is accompanied by it's documentation and this copyright notice. 7 * The software comes with no warranty, etc. 8 */ 9 #ifndef DISKUSAGE_H 10 #define DISKUSAGE_H 11 12 13 #include <Entry.h> 14 #include <InterfaceDefs.h> 15 16 17 const rgb_color RGB_WIN = { 0xDE, 0xDB, 0xDE, 0xFF }; 18 const rgb_color RGB_PIE_OL = { 0x80, 0x80, 0x80, 0xFF }; 19 const rgb_color RGB_PIE_BG = { 0xFF, 0xFF, 0xFF, 0xFF }; 20 const rgb_color RGB_PIE_MT = { 0xA0, 0xA0, 0xA0, 0xFF }; 21 const rgb_color RGB_PIE_1 = { 0x00, 0x00, 0xb6, 0xFF }; 22 const rgb_color RGB_PIE_2 = { 0x00, 0x00, 0x68, 0xFF }; 23 const rgb_color RGB_PIE_3 = { 0xcf, 0x00, 0x00, 0xFF }; 24 const rgb_color RGB_PIE_4 = { 0xaf, 0x63, 0xb1, 0xFF }; 25 26 const int kBasePieColorCount = 4; 27 const rgb_color kBasePieColor[kBasePieColorCount] 28 = { RGB_PIE_1, RGB_PIE_2, RGB_PIE_3, RGB_PIE_4 }; 29 30 const rgb_color kWindowColor = ui_color(B_PANEL_BACKGROUND_COLOR); 31 const rgb_color kOutlineColor = RGB_PIE_OL; 32 const rgb_color kPieBGColor = RGB_PIE_BG; 33 const rgb_color kEmptySpcColor = RGB_PIE_MT; 34 35 const char* const kAppSignature = "application/x-vnd.Haiku-DiskUsage"; 36 const char* const kHelpFileName = "userguide/en/applications/diskusage.html"; 37 38 const char* const kEmptyStr = ""; 39 const char* const kNameFilePtr = "file"; 40 41 const float kSmallHMargin = 5.0; 42 const float kSmallVMargin = 2.0; 43 const float kButtonMargin = 20.0; 44 const float kMinButtonWidth = 60.0; 45 46 const float kProgBarWidth = 150.0; 47 const float kProgBarHeight = 16.0; 48 const float kReportInterval = 2.5; 49 50 const float kDefaultPieSize = 400.0; 51 const float kPieCenterSize = 80.0; 52 const float kPieRingSize = 20.0; 53 const float kPieInnerMargin = 10.0; 54 const float kPieOuterMargin = 10.0; 55 const float kMinSegmentSpan = 2.0; 56 const int kLightenFactor = 0x12; 57 const float kDragThreshold = 5.0; 58 59 extern entry_ref helpFileRef; 60 extern bool helpFileWasFound; 61 62 #define kMenuSelectVol 'gMSV' 63 #define kBtnRescan 'gBRF' 64 #define kBtnHelp 'gHLP' 65 #define kScanRefresh 'gSRF' 66 #define kScanProgress 'gSPR' 67 #define kScanDone 'gSDN' 68 #define kOutdatedMsg 'gOUT' 69 70 #define deg2rad(x) (2.0 * M_PI * (x) / 360.0) 71 #define rad2deg(x) (360.0 * (x) / (2.0 * M_PI)) 72 73 void size_to_string(off_t byteCount, char* name, int maxLength); 74 75 76 #endif // DISKUSAGE_H 77 78