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
;
44 typedef struct _Panel Panel
;
47 unsigned flags
; /* reserved for WPrefs.c Don't access it */
49 void (*createWidgets
)(Panel
*); /* called when showing for first time */
50 void (*updateDomain
)(Panel
*); /* save the changes to the dictionary */
51 Bool (*requiresRestart
)(Panel
*); /* return True if some static option was changed */
52 void (*undoChanges
)(Panel
*); /* reset values to those in the dictionary */
53 void (*prepareForClose
)(Panel
*); /* called when exiting WPrefs */
54 void (*showPanel
)(Panel
*); /* called when entering the panel */
55 void (*hidePanel
)(Panel
*); /* called when exiting the panel */
59 /* all Panels must start with the following layout */
60 typedef struct PanelRec
{
63 char *sectionName
; /* section name to display in titlebar */
67 CallbackRec callbacks
;
71 /* ---[ Wprefs.c ] ------------------------------------------------------- */
73 void AddSection(Panel
*panel
, const char *iconFile
);
75 char *LocateImage(const char *name
);
77 void SetButtonAlphaImage(WMScreen
*scr
, WMButton
*bPtr
, const char *file
,
78 const char *title1
, const char *title2
);
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(Panel
*panel
);
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 /* ---[ double.c ] ------------------------------------------------------- */
115 typedef struct W_DoubleTest DoubleTest
;
117 DoubleTest
*CreateDoubleTest(WMWidget
*parent
, const char *text
);
120 /* ---[ main.c ] --------------------------------------------------------- */
121 void AddDeadChildHandler(pid_t pid
, void (*handler
)(void*), void *data
);
124 /* ---[ xmodifier.c ] ---------------------------------------------------- */
125 int ModifierFromKey(Display
* dpy
, const char *key
);
128 #define FRAME_TOP 105
129 #define FRAME_LEFT -2
130 #define FRAME_WIDTH 524
131 #define FRAME_HEIGHT 235
132 #endif /* WPREFS_H_ */