1 /* WPrefs.h- general definitions
3 * WPrefs - Window Maker Preferences Program
5 * Copyright (c) 1998, 1999 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
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
37 #include <WINGs/WINGs.h>
39 /* For EXTENDED_WINDOWSHORTCUT */
40 #include "../src/wconfig.h"
44 #define WVERSION "0.45"
45 #define WMVERSION "0.65.x"
47 extern char *NOptionValueChanged
;
49 typedef struct _Panel Panel
;
52 unsigned flags
; /* reserved for WPrefs.c Don't access it */
54 void (*createWidgets
)(Panel
*); /* called when showing for first time */
55 void (*updateDomain
)(Panel
*); /* save the changes to the dictionary */
56 Bool (*requiresRestart
)(Panel
*); /* return True if some static option was changed */
57 void (*undoChanges
)(Panel
*); /* reset values to those in the dictionary */
58 void (*prepareForClose
)(Panel
*); /* called when exiting WPrefs */
59 void (*showPanel
)(Panel
*); /* called when entering the panel */
60 void (*hidePanel
)(Panel
*); /* called when exiting the panel */
64 /* all Panels must start with the following layout */
65 typedef struct PanelRec
{
68 char *sectionName
; /* section name to display in titlebar */
72 CallbackRec callbacks
;
77 void AddSection(Panel
*panel
, char *iconFile
);
79 char *LocateImage(char *name
);
81 void SetButtonAlphaImage(WMScreen
*scr
, WMButton
*bPtr
, char *file
,
82 char *title1
, char *title2
);
84 WMWindow
*GetWindow(Panel
*panel
);
86 /* manipulate the dictionary for the WindowMaker domain */
88 proplist_t
GetObjectForKey(char *defaultName
);
90 void SetObjectForKey(proplist_t object
, char *defaultName
);
92 void RemoveObjectForKey(char *defaultName
);
94 char *GetStringForKey(char *defaultName
);
96 int GetIntegerForKey(char *defaultName
);
98 Bool
GetBoolForKey(char *defaultName
);
100 int GetSpeedForKey(char *defaultName
);
102 void SetIntegerForKey(int value
, char *defaultName
);
104 void SetStringForKey(char *value
, char *defaultName
);
106 void SetBoolForKey(Bool value
, char *defaultName
);
108 void SetSpeedForKey(int speed
, char *defaultName
);
112 void AddDeadChildHandler(pid_t pid
, void (*handler
)(void*), void *data
);
115 #define FRAME_TOP 105
116 #define FRAME_LEFT -2
117 #define FRAME_WIDTH 524
118 #define FRAME_HEIGHT 235
123 * Needed for HAVE_LIBINTL_H
125 #include "../src/config.h"
127 #if HAVE_LIBINTL_H && I18N
128 # include <libintl.h>
129 # define _(text) gettext(text)
130 # define N_(text) (text)
132 # define _(text) (text)
133 # define N_(text) (text)