changed indentation to use spaces only
[wmaker-crm.git] / WPrefs.app / WPrefs.h
blob07dda5221ccfeebd90b9d85a065798d9af22abbf
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
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 <wraster.h>
35 #include <WINGs/WINGs.h>
37 /* For EXTENDED_WINDOWSHORTCUT */
38 #include "../src/wconfig.h"
40 /****/
42 #define WVERSION "0.45"
43 #define WMVERSION "0.65.x"
45 extern char *NOptionValueChanged;
47 typedef struct _Panel Panel;
49 typedef struct {
50 unsigned flags; /* reserved for WPrefs.c Don't access it */
52 void (*createWidgets)(Panel*); /* called when showing for first time */
53 void (*updateDomain)(Panel*); /* save the changes to the dictionary */
54 Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
55 void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
56 void (*prepareForClose)(Panel*); /* called when exiting WPrefs */
57 void (*showPanel)(Panel*); /* called when entering the panel */
58 void (*hidePanel)(Panel*); /* called when exiting the panel */
59 } CallbackRec;
62 /* all Panels must start with the following layout */
63 typedef struct PanelRec {
64 WMBox *box;
66 char *sectionName; /* section name to display in titlebar */
68 char *description;
70 CallbackRec callbacks;
71 } PanelRec;
75 void AddSection(Panel *panel, char *iconFile);
77 char *LocateImage(char *name);
79 void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file,
80 char *title1, char *title2);
82 WMWindow *GetWindow(Panel *panel);
84 /* manipulate the dictionary for the WindowMaker domain */
86 WMPropList *GetObjectForKey(char *defaultName);
88 void SetObjectForKey(WMPropList *object, char *defaultName);
90 void RemoveObjectForKey(char *defaultName);
92 char *GetStringForKey(char *defaultName);
94 int GetIntegerForKey(char *defaultName);
96 Bool GetBoolForKey(char *defaultName);
98 int GetSpeedForKey(char *defaultName);
100 void SetIntegerForKey(int value, char *defaultName);
102 void SetStringForKey(char *value, char *defaultName);
104 void SetBoolForKey(Bool value, char *defaultName);
106 void SetSpeedForKey(int speed, char *defaultName);
110 void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
113 #define FRAME_TOP 105
114 #define FRAME_LEFT -2
115 #define FRAME_WIDTH 524
116 #define FRAME_HEIGHT 235
121 * Needed for HAVE_LIBINTL_H
123 #include "../src/config.h"
125 #if HAVE_LIBINTL_H && I18N
126 # include <libintl.h>
127 # define _(text) gettext(text)
128 # define N_(text) (text)
129 #else
130 # define _(text) (text)
131 # define N_(text) (text)
132 #endif
134 #endif