1 /* WPrefs.h- general definitions
3 * WPrefs - Window Maker Preferences Program
5 * Copyright (c) 1998-2003 Alfredo K. Kojima
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
35 #include <WINGs/WINGs.h>
37 /* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
38 #include "../src/wconfig.h"
42 extern char *NOptionValueChanged
;
43 extern Bool xext_xkb_supported
;
45 typedef struct _Panel Panel
;
48 unsigned flags
; /* reserved for WPrefs.c Don't access it */
50 void (*createWidgets
)(Panel
*); /* called when showing for first time */
51 void (*updateDomain
)(Panel
*); /* save the changes to the dictionary */
52 Bool (*requiresRestart
)(Panel
*); /* return True if some static option was changed */
53 void (*undoChanges
)(Panel
*); /* reset values to those in the dictionary */
54 void (*prepareForClose
)(Panel
*); /* called when exiting WPrefs */
55 void (*showPanel
)(Panel
*); /* called when entering the panel */
56 void (*hidePanel
)(Panel
*); /* called when exiting the panel */
60 /* all Panels must start with the following layout */
61 typedef struct PanelRec
{
64 char *sectionName
; /* section name to display in titlebar */
68 CallbackRec callbacks
;
72 /* ---[ Wprefs.c ] ------------------------------------------------------- */
74 void AddSection(Panel
*panel
, const char *iconFile
);
76 char *LocateImage(const char *name
);
78 void SetButtonAlphaImage(WMScreen
*scr
, WMButton
*bPtr
, const char *file
);
80 /* Loads `file' into `icon_normal'. If `icon_greyed' is not NULL,
81 * combine `icon_normal' with some grey and then optionally with image
82 * `xis', and store it in `icon_greyed' (typically to produce a
83 * greyed-out, red-crossed version of `icon_normal') */
84 void CreateImages(WMScreen
*scr
, RContext
*rc
, RImage
*xis
, const char *file
,
85 WMPixmap
**icon_normal
, WMPixmap
**icon_greyed
);
87 WMWindow
*GetWindow(void);
89 /* manipulate the dictionary for the WindowMaker domain */
91 WMPropList
*GetObjectForKey(const char *defaultName
);
93 void SetObjectForKey(WMPropList
*object
, const char *defaultName
);
95 void RemoveObjectForKey(const char *defaultName
);
97 char *GetStringForKey(const char *defaultName
);
99 int GetIntegerForKey(const char *defaultName
);
101 Bool
GetBoolForKey(const char *defaultName
);
103 int GetSpeedForKey(const char *defaultName
);
105 void SetIntegerForKey(int value
, const char *defaultName
);
107 void SetStringForKey(const char *value
, const char *defaultName
);
109 void SetBoolForKey(Bool value
, const char *defaultName
);
111 void SetSpeedForKey(int speed
, const char *defaultName
);
114 /* ---[ KeyboardShortcuts.c ] -------------------------------------------- */
116 char *capture_shortcut(Display
*dpy
, Bool
*capturing
, Bool convert_case
);
119 /* ---[ double.c ] ------------------------------------------------------- */
120 typedef struct W_DoubleTest DoubleTest
;
122 DoubleTest
*CreateDoubleTest(WMWidget
*parent
, const char *text
);
125 /* ---[ main.c ] --------------------------------------------------------- */
126 void AddDeadChildHandler(pid_t pid
, void (*handler
)(void*), void *data
);
129 /* ---[ xmodifier.c ] ---------------------------------------------------- */
130 int ModifierFromKey(Display
* dpy
, const char *key
);
133 /* ---[ Panel Initializers ]---------------------------------------------- */
135 void Initialize(WMScreen
*scr
);
137 /* in alphabetical order - in case you'd want to add one */
138 Panel
*InitAppearance(WMWidget
*parent
);
139 Panel
*InitConfigurations(WMWidget
*parent
);
140 Panel
*InitDocks(WMWidget
*parent
);
141 Panel
*InitExpert(WMWidget
*parent
);
142 Panel
*InitFocus(WMWidget
*parent
);
143 Panel
*InitFontSimple(WMWidget
*parent
);
144 Panel
*InitIcons(WMWidget
*parent
);
145 Panel
*InitKeyboardShortcuts(WMWidget
*parent
);
146 Panel
*InitMenu(WMWidget
*parent
);
147 Panel
*InitMenuPreferences(WMWidget
*parent
);
148 Panel
*InitMouseSettings(WMWidget
*parent
);
149 Panel
*InitPaths(WMWidget
*parent
);
150 Panel
*InitPreferences(WMWidget
*parent
);
151 Panel
*InitWindowHandling(WMWidget
*parent
);
152 Panel
*InitWorkspace(WMWidget
*parent
);
155 #define FRAME_TOP 105
156 #define FRAME_LEFT -2
157 #define FRAME_WIDTH 524
158 #define FRAME_HEIGHT 235
159 #endif /* WPREFS_H_ */