Updating to version 0.20.2
[wmaker-crm.git] / WPrefs.app / WPrefs.h
blobb231434d2aacc092da95d1b109d89a63d0bca36a
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>
30 #include <X11/Xlib.h>
32 #include <proplist.h>
34 #include <wraster.h>
36 #include <WINGs.h>
37 #include <WUtil.h>
40 #define WVERSION "0.6"
41 #define WMVERSION "0.20.x"
44 typedef struct _Panel Panel;
46 typedef struct {
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 } CallbackRec;
56 /* all Panels must start with the following layout */
57 typedef struct PanelRec {
58 WMFrame *frame;
60 char *sectionName; /* section name to display in titlebar */
62 CallbackRec callbacks;
63 } PanelRec;
66 void AddSection(Panel *panel, char *iconFile);
68 char *LocateImage(char *name);
70 WMWindow *GetWindow(Panel *panel);
72 /* manipulate the dictionary for the WindowMaker domain */
74 proplist_t GetObjectForKey(char *defaultName);
76 void SetObjectForKey(proplist_t object, char *defaultName);
78 void RemoveObjectForKey(char *defaultName);
80 char *GetStringForKey(char *defaultName);
82 int GetIntegerForKey(char *defaultName);
84 Bool GetBoolForKey(char *defaultName);
86 int GetSpeedForKey(char *defaultName);
88 void SetIntegerForKey(int value, char *defaultName);
90 void SetStringForKey(char *value, char *defaultName);
92 void SetBoolForKey(Bool value, char *defaultName);
94 void SetSpeedForKey(int speed, char *defaultName);
96 #define FRAME_TOP 105
97 #define FRAME_LEFT -2
98 #define FRAME_WIDTH 524
99 #define FRAME_HEIGHT 235
104 * Needed for HAVE_LIBINTL_H
106 #include "../src/config.h"
108 #if HAVE_LIBINTL_H && I18N
109 # include <libintl.h>
110 # define _(text) gettext(text)
111 #else
112 # define _(text) (text)
113 #endif
115 #endif