Code update for Window Maker version 0.50.0
[wmaker-crm.git] / WPrefs.app / WPrefs.h
blob4a456584ae34a048ba2d29b9f239683f205d7e66
1 /* WPrefs.h- general definitions
2 *
3 * WPrefs - Window Maker Preferences Program
4 *
5 * Copyright (c) 1998 Alfredo K. Kojima
6 *
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,
20 * USA.
23 #ifndef WPREFS_H_
24 #define WPREFS_H_
26 #include <stdlib.h>
27 #include <stdio.h>
28 #include <string.h>
29 #include <signal.h>
31 #include <X11/Xlib.h>
33 #include <proplist.h>
35 #include <wraster.h>
37 #include <WINGs.h>
38 #include <WUtil.h>
40 /** some config options **/
41 #undef EXTEND_WINDOWSHORTCUT
43 /****/
45 #define WVERSION "0.9"
46 #define WMVERSION "0.20.x"
49 typedef struct _Panel Panel;
51 typedef struct {
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 } CallbackRec;
61 /* all Panels must start with the following layout */
62 typedef struct PanelRec {
63 WMFrame *frame;
65 char *sectionName; /* section name to display in titlebar */
67 CallbackRec callbacks;
68 } PanelRec;
72 void AddSection(Panel *panel, char *iconFile);
74 char *LocateImage(char *name);
76 WMWindow *GetWindow(Panel *panel);
78 /* manipulate the dictionary for the WindowMaker domain */
80 proplist_t GetObjectForKey(char *defaultName);
82 void SetObjectForKey(proplist_t object, char *defaultName);
84 void RemoveObjectForKey(char *defaultName);
86 char *GetStringForKey(char *defaultName);
88 int GetIntegerForKey(char *defaultName);
90 Bool GetBoolForKey(char *defaultName);
92 int GetSpeedForKey(char *defaultName);
94 void SetIntegerForKey(int value, char *defaultName);
96 void SetStringForKey(char *value, char *defaultName);
98 void SetBoolForKey(Bool value, char *defaultName);
100 void SetSpeedForKey(int speed, char *defaultName);
104 void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
107 #define FRAME_TOP 105
108 #define FRAME_LEFT -2
109 #define FRAME_WIDTH 524
110 #define FRAME_HEIGHT 235
115 * Needed for HAVE_LIBINTL_H
117 #include "../src/config.h"
119 #if HAVE_LIBINTL_H && I18N
120 # include <libintl.h>
121 # define _(text) gettext(text)
122 #else
123 # define _(text) (text)
124 #endif
126 #endif