theme.h (2981B)
1 // Copyright (c) 2003 - 2009 Anselm R Garbe <anselm@garbe.us> 2 // See LICENSE for license details. 3 4 #ifndef __THEME_H 5 #define __THEME_H 6 7 extern "C" { 8 #include <X11/Xlib.h> 9 } 10 11 #include <map> 12 #include <string> 13 14 #include "wmi.h" 15 16 typedef map<string, string, less<string> > MSettings; 17 18 /** 19 * Represents a theme of WMI. 20 */ 21 class Theme 22 { 23 24 public: 25 26 Theme(); 27 ~Theme(); 28 29 void initTheme(MSettings *settings, Colormap cmap); 30 31 unsigned long BAR_BACKGROUND; 32 unsigned long BAR_TEXT; 33 unsigned long BAR_SHINE; 34 unsigned long BAR_SHADOW; 35 36 unsigned long METER_BACKGROUND; 37 unsigned long METER_FIGURE_HIGH; 38 unsigned long METER_FIGURE_NORMAL; 39 unsigned long METER_FIGURE_LOW; 40 unsigned long METER_BORDER_SHINE; 41 unsigned long METER_BORDER_SHADOW; 42 43 unsigned long FOCUSREQ_BACKGROUND; 44 unsigned long FOCUSREQ_TEXT; 45 unsigned long FOCUSREQ_SHINE; 46 unsigned long FOCUSREQ_SHADOW; 47 48 unsigned long TILED_SHINE_FOCUSSED; 49 unsigned long TILED_SHADOW_FOCUSSED; 50 unsigned long TILED_SHINE_NORMAL; 51 unsigned long TILED_SHADOW_NORMAL; 52 53 unsigned long BUTTON_BACKGROUND_NORMAL; 54 unsigned long BUTTON_BACKGROUND_PRESSED; 55 unsigned long BUTTON_SHINE_BORDER_NORMAL; 56 unsigned long BUTTON_SHINE_BORDER_PRESSED; 57 unsigned long BUTTON_SHADOW_BORDER_NORMAL; 58 unsigned long BUTTON_SHADOW_BORDER_PRESSED; 59 unsigned long BUTTON_SHINE_FIGURE_NORMAL; 60 unsigned long BUTTON_SHINE_FIGURE_PRESSED; 61 unsigned long BUTTON_SHADOW_FIGURE_NORMAL; 62 unsigned long BUTTON_SHADOW_FIGURE_PRESSED; 63 64 unsigned long FRAME_BACKGROUND_NORMAL; 65 unsigned long FRAME_BACKGROUND_FOCUSSED; 66 unsigned long FRAME_SHINE_NORMAL; 67 unsigned long FRAME_SHINE_FOCUSSED; 68 unsigned long FRAME_SHADOW_NORMAL; 69 unsigned long FRAME_SHADOW_FOCUSSED; 70 unsigned long FRAME_PSEUDO; 71 72 unsigned long LABEL_BACKGROUND_NORMAL; 73 unsigned long LABEL_BACKGROUND_FOCUSSED; 74 unsigned long LABEL_TEXT_NORMAL; 75 unsigned long LABEL_TEXT_FOCUSSED; 76 unsigned long LABEL_SHINE_NORMAL; 77 unsigned long LABEL_SHINE_FOCUSSED; 78 unsigned long LABEL_SHADOW_NORMAL; 79 unsigned long LABEL_SHADOW_FOCUSSED; 80 81 unsigned long TAB_BACKGROUND_ACTIVE_NORMAL; 82 unsigned long TAB_BACKGROUND_INACTIVE_NORMAL; 83 unsigned long TAB_BACKGROUND_ACTIVE_FOCUSSED; 84 unsigned long TAB_BACKGROUND_INACTIVE_FOCUSSED; 85 unsigned long TAB_TEXT_ACTIVE_NORMAL; 86 unsigned long TAB_TEXT_INACTIVE_NORMAL; 87 unsigned long TAB_TEXT_ACTIVE_FOCUSSED; 88 unsigned long TAB_TEXT_INACTIVE_FOCUSSED; 89 unsigned long TAB_SHINE_ACTIVE_NORMAL; 90 unsigned long TAB_SHINE_INACTIVE_NORMAL; 91 unsigned long TAB_SHINE_ACTIVE_FOCUSSED; 92 unsigned long TAB_SHINE_INACTIVE_FOCUSSED; 93 unsigned long TAB_SHADOW_ACTIVE_NORMAL; 94 unsigned long TAB_SHADOW_INACTIVE_NORMAL; 95 unsigned long TAB_SHADOW_ACTIVE_FOCUSSED; 96 unsigned long TAB_SHADOW_INACTIVE_FOCUSSED; 97 98 private: 99 unsigned long allocateColor(string name, Colormap cmap); 100 101 }; 102 103 #endif // __THEME_H