Applied patch from Largo to update sound related stuff and documentation
[wmaker-crm.git] / WPrefs.app / WPrefs.h
blobb91c8cdc85319284222fb3da71e9691686f95b97
1 /* WPrefs.h- general definitions
2 *
3 * WPrefs - Window Maker Preferences Program
4 *
5 * Copyright (c) 1998, 1999 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 /* For EXTENDED_WINDOWSHORTCUT */
41 #include "../src/wconfig.h"
43 /****/
45 #define WVERSION "0.43"
46 #define WMVERSION "0.62.x"
48 extern char *NOptionValueChanged;
50 typedef struct _Panel Panel;
52 typedef struct {
53 unsigned flags; /* reserved for WPrefs.c Don't access it */
55 void (*createWidgets)(Panel*); /* called when showing for first time */
56 void (*updateDomain)(Panel*); /* save the changes to the dictionary */
57 Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
58 void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
59 void (*prepareForClose)(Panel*); /* called when exiting WPrefs */
60 void (*showPanel)(Panel*); /* called when entering the panel */
61 void (*hidePanel)(Panel*); /* called when exiting the panel */
62 } CallbackRec;
65 /* all Panels must start with the following layout */
66 typedef struct PanelRec {
67 WMFrame *frame;
69 char *sectionName; /* section name to display in titlebar */
71 char *description;
73 CallbackRec callbacks;
74 } PanelRec;
78 void AddSection(Panel *panel, char *iconFile);
80 char *LocateImage(char *name);
82 void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file,
83 char *title1, char *title2);
85 WMWindow *GetWindow(Panel *panel);
87 /* manipulate the dictionary for the WindowMaker domain */
89 proplist_t GetObjectForKey(char *defaultName);
91 void SetObjectForKey(proplist_t object, char *defaultName);
93 void RemoveObjectForKey(char *defaultName);
95 char *GetStringForKey(char *defaultName);
97 int GetIntegerForKey(char *defaultName);
99 Bool GetBoolForKey(char *defaultName);
101 int GetSpeedForKey(char *defaultName);
103 void SetIntegerForKey(int value, char *defaultName);
105 void SetStringForKey(char *value, char *defaultName);
107 void SetBoolForKey(Bool value, char *defaultName);
109 void SetSpeedForKey(int speed, char *defaultName);
113 void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
116 #define FRAME_TOP 105
117 #define FRAME_LEFT -2
118 #define FRAME_WIDTH 524
119 #define FRAME_HEIGHT 235
124 * Needed for HAVE_LIBINTL_H
126 #include "../src/config.h"
128 #if HAVE_LIBINTL_H && I18N
129 # include <libintl.h>
130 # define _(text) gettext(text)
131 # define N_(text) (text)
132 #else
133 # define _(text) (text)
134 # define N_(text) (text)
135 #endif
137 #endif