Configure: Added explicit check for math library header
[wmaker-crm.git] / WPrefs.app / WPrefs.h
blob824010c3ce029e710c9a669ce75a2dbdda2f2c63
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.
22 #ifndef WPREFS_H_
23 #define WPREFS_H_
25 #include <stdlib.h>
26 #include <stdio.h>
27 #include <string.h>
28 #include <strings.h>
29 #include <signal.h>
31 #include <X11/Xlib.h>
33 #include <wraster.h>
35 #include <WINGs/WINGs.h>
37 /* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
38 #include "../src/wconfig.h"
40 /****/
42 extern char *NOptionValueChanged;
43 extern Bool xext_xkb_supported;
45 typedef struct _Panel Panel;
47 typedef struct {
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 */
57 } CallbackRec;
60 /* all Panels must start with the following layout */
61 typedef struct PanelRec {
62 WMBox *box;
64 char *sectionName; /* section name to display in titlebar */
66 char *description;
68 CallbackRec callbacks;
69 } PanelRec;
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,
79 const char *title1, const char *title2);
81 /* Loads `file' into `icon_normal'. If `icon_greyed' is not NULL,
82 * combine `icon_normal' with some grey and then optionally with image
83 * `xis', and store it in `icon_greyed' (typically to produce a
84 * greyed-out, red-crossed version of `icon_normal') */
85 void CreateImages(WMScreen *scr, RContext *rc, RImage *xis, const char *file,
86 WMPixmap **icon_normal, WMPixmap **icon_greyed);
88 WMWindow *GetWindow(Panel *panel);
90 /* manipulate the dictionary for the WindowMaker domain */
92 WMPropList *GetObjectForKey(const char *defaultName);
94 void SetObjectForKey(WMPropList *object, const char *defaultName);
96 void RemoveObjectForKey(const char *defaultName);
98 char *GetStringForKey(const char *defaultName);
100 int GetIntegerForKey(const char *defaultName);
102 Bool GetBoolForKey(const char *defaultName);
104 int GetSpeedForKey(const char *defaultName);
106 void SetIntegerForKey(int value, const char *defaultName);
108 void SetStringForKey(const char *value, const char *defaultName);
110 void SetBoolForKey(Bool value, const char *defaultName);
112 void SetSpeedForKey(int speed, const char *defaultName);
115 /* ---[ KeyboardShortcuts.c ] -------------------------------------------- */
117 char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case);
120 /* ---[ double.c ] ------------------------------------------------------- */
121 typedef struct W_DoubleTest DoubleTest;
123 DoubleTest *CreateDoubleTest(WMWidget *parent, const char *text);
126 /* ---[ main.c ] --------------------------------------------------------- */
127 void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
130 /* ---[ xmodifier.c ] ---------------------------------------------------- */
131 int ModifierFromKey(Display * dpy, const char *key);
134 /* ---[ Panel Initializers ]---------------------------------------------- */
136 void Initialize(WMScreen *scr);
138 /* in alphabetical order - in case you'd want to add one */
139 Panel *InitAppearance(WMScreen *scr, WMWidget *parent);
140 Panel *InitConfigurations(WMScreen *scr, WMWidget *parent);
141 Panel *InitDocks(WMScreen *scr, WMWidget *parent);
142 Panel *InitExpert(WMScreen *scr, WMWidget *parent);
143 Panel *InitFocus(WMScreen *scr, WMWidget *parent);
144 Panel *InitFontSimple(WMScreen *scr, WMWidget *parent);
145 Panel *InitIcons(WMScreen *scr, WMWidget *parent);
146 Panel *InitKeyboardShortcuts(WMScreen *scr, WMWidget *parent);
147 Panel *InitMenu(WMScreen *scr, WMWidget *parent);
148 Panel *InitMenuPreferences(WMScreen *scr, WMWidget *parent);
149 Panel *InitMouseSettings(WMScreen *scr, WMWidget *parent);
150 Panel *InitPaths(WMScreen *scr, WMWidget *parent);
151 Panel *InitPreferences(WMScreen *scr, WMWidget *parent);
152 Panel *InitWindowHandling(WMScreen *scr, WMWidget *parent);
153 Panel *InitWorkspace(WMScreen *scr, WMWidget *parent);
156 #define FRAME_TOP 105
157 #define FRAME_LEFT -2
158 #define FRAME_WIDTH 524
159 #define FRAME_HEIGHT 235
160 #endif /* WPREFS_H_ */