1 /** 2 * @file settings.h 3 * @author Joe Wingbermuehle 4 * @date 2012 5 * 6 * @brief JWM settings. 7 * 8 */ 9 10 #ifndef SETTINGS_H 11 #define SETTINGS_H 12 13 /** Window snap modes. */ 14 typedef unsigned char SnapModeType; 15 #define SNAP_NONE 0 /**< Don't snap. */ 16 #define SNAP_SCREEN 1 /**< Snap to the edges of the screen. */ 17 #define SNAP_BORDER 2 /**< Snap to all borders. */ 18 19 /** Window move modes. */ 20 typedef unsigned char MoveModeType; 21 #define MOVE_OPAQUE 0 /**< Show window contents while moving. */ 22 #define MOVE_OUTLINE 1 /**< Show an outline while moving. */ 23 24 /** Window resize modes. */ 25 typedef unsigned char ResizeModeType; 26 #define RESIZE_OPAQUE 0 /**< Show window contents while resizing. */ 27 #define RESIZE_OUTLINE 1 /**< Show an outline while resizing. */ 28 29 /** Status window types. */ 30 typedef unsigned char StatusWindowType; 31 #define SW_OFF 0 /**< No status window. */ 32 #define SW_SCREEN 1 /**< Centered on screen. */ 33 #define SW_WINDOW 2 /**< Centered on window. */ 34 #define SW_CORNER 3 /**< Upper-left corner. */ 35 36 /** Focus models. */ 37 typedef unsigned char FocusModelType; 38 #define FOCUS_SLOPPY 0 /**< Sloppy focus, click to raise. */ 39 #define FOCUS_CLICK 1 /**< Click to focus, click to raise. */ 40 #define FOCUS_SLOPPY_TITLE 2 /**< Sloppy focus, title to raise. */ 41 #define FOCUS_CLICK_TITLE 3 /**< Click to focus, title to raise. */ 42 43 /** Decorations. */ 44 typedef unsigned char DecorationsType; 45 #define DECO_UNSET 0 46 #define DECO_FLAT 1 47 #define DECO_MOTIF 2 48 49 /** Popup mask. */ 50 typedef unsigned char PopupMaskType; 51 #define POPUP_NONE 0 52 #define POPUP_TASK 1 53 #define POPUP_PAGER 2 54 #define POPUP_BUTTON 4 55 #define POPUP_CLOCK 8 56 #define POPUP_MENU 16 57 #define POPUP_ALL 255 58 59 /** Text alignment. */ 60 typedef unsigned char AlignmentType; 61 #define ALIGN_LEFT 0 62 #define ALIGN_CENTER 1 63 #define ALIGN_RIGHT 2 64 65 /** Settings. */ 66 typedef struct { 67 unsigned doubleClickSpeed; 68 unsigned doubleClickDelta; 69 unsigned snapDistance; 70 unsigned popupDelay; 71 unsigned trayOpacity; 72 unsigned activeClientOpacity; 73 unsigned inactiveClientOpacity; 74 unsigned borderWidth; 75 unsigned titleHeight; 76 unsigned desktopWidth; 77 unsigned desktopHeight; 78 unsigned desktopCount; 79 unsigned menuOpacity; 80 unsigned desktopDelay; 81 unsigned cornerRadius; 82 unsigned moveMask; 83 unsigned dockSpacing; 84 AlignmentType titleTextAlignment; 85 SnapModeType snapMode; 86 MoveModeType moveMode; 87 StatusWindowType moveStatusType; 88 StatusWindowType resizeStatusType; 89 FocusModelType focusModel; 90 ResizeModeType resizeMode; 91 DecorationsType windowDecorations; 92 DecorationsType trayDecorations; 93 DecorationsType taskListDecorations; 94 DecorationsType menuDecorations; 95 PopupMaskType popupMask; 96 char groupTasks; 97 char listAllTasks; 98 } Settings; 99 100 extern Settings settings; 101 102 /*@{*/ 103 void InitializeSettings(void); 104 void StartupSettings(void); 105 #define ShutdownSettings() (void)(0) 106 #define DestroySettings() (void)(0) 107 /*@}*/ 108 109 /** Update a string setting. */ 110 void SetPathString(char **dest, const char *src); 111 112 #endif 113