1998-09-29 22:36:29 +00:00
|
|
|
/* WPrefs.h- general definitions
|
2004-10-12 21:28:27 +00:00
|
|
|
*
|
1998-10-21 14:43:47 +00:00
|
|
|
* WPrefs - Window Maker Preferences Program
|
2004-10-12 21:28:27 +00:00
|
|
|
*
|
2003-01-16 23:30:45 +00:00
|
|
|
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
2004-10-12 21:28:27 +00:00
|
|
|
*
|
1998-09-29 22:36:29 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
2010-10-08 01:32:11 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
1998-09-29 22:36:29 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#ifndef WPREFS_H_
|
|
|
|
|
#define WPREFS_H_
|
|
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
2011-03-24 16:07:20 +01:00
|
|
|
#include <strings.h>
|
1999-01-06 15:22:33 +00:00
|
|
|
#include <signal.h>
|
1998-09-29 22:36:29 +00:00
|
|
|
|
|
|
|
|
#include <X11/Xlib.h>
|
|
|
|
|
|
|
|
|
|
#include <wraster.h>
|
|
|
|
|
|
2001-01-18 19:21:56 +00:00
|
|
|
#include <WINGs/WINGs.h>
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2012-01-21 13:49:12 +01:00
|
|
|
/* Needed for HAVE_LIBINTL_H and EXTENDED_WINDOWSHORTCUT */
|
1999-09-19 14:43:00 +00:00
|
|
|
#include "../src/wconfig.h"
|
|
|
|
|
|
1999-01-06 15:22:33 +00:00
|
|
|
/****/
|
|
|
|
|
|
1999-04-12 04:54:50 +00:00
|
|
|
extern char *NOptionValueChanged;
|
|
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
typedef struct _Panel Panel;
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
unsigned flags; /* reserved for WPrefs.c Don't access it */
|
2004-10-12 21:28:27 +00:00
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
void (*createWidgets)(Panel*); /* called when showing for first time */
|
|
|
|
|
void (*updateDomain)(Panel*); /* save the changes to the dictionary */
|
|
|
|
|
Bool (*requiresRestart)(Panel*); /* return True if some static option was changed */
|
|
|
|
|
void (*undoChanges)(Panel*); /* reset values to those in the dictionary */
|
1999-03-18 01:11:18 +00:00
|
|
|
void (*prepareForClose)(Panel*); /* called when exiting WPrefs */
|
2000-07-14 05:48:35 +00:00
|
|
|
void (*showPanel)(Panel*); /* called when entering the panel */
|
|
|
|
|
void (*hidePanel)(Panel*); /* called when exiting the panel */
|
1998-09-29 22:36:29 +00:00
|
|
|
} CallbackRec;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* all Panels must start with the following layout */
|
|
|
|
|
typedef struct PanelRec {
|
2001-02-08 21:54:12 +00:00
|
|
|
WMBox *box;
|
1998-09-29 22:36:29 +00:00
|
|
|
|
|
|
|
|
char *sectionName; /* section name to display in titlebar */
|
1999-04-25 01:49:46 +00:00
|
|
|
|
|
|
|
|
char *description;
|
|
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
CallbackRec callbacks;
|
|
|
|
|
} PanelRec;
|
|
|
|
|
|
|
|
|
|
|
1999-01-06 15:22:33 +00:00
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
void AddSection(Panel *panel, char *iconFile);
|
|
|
|
|
|
|
|
|
|
char *LocateImage(char *name);
|
|
|
|
|
|
2000-09-24 02:31:58 +00:00
|
|
|
void SetButtonAlphaImage(WMScreen *scr, WMButton *bPtr, char *file,
|
|
|
|
|
char *title1, char *title2);
|
|
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
WMWindow *GetWindow(Panel *panel);
|
|
|
|
|
|
|
|
|
|
/* manipulate the dictionary for the WindowMaker domain */
|
|
|
|
|
|
2001-10-04 03:07:34 +00:00
|
|
|
WMPropList *GetObjectForKey(char *defaultName);
|
1998-09-29 22:36:29 +00:00
|
|
|
|
2001-10-04 03:07:34 +00:00
|
|
|
void SetObjectForKey(WMPropList *object, char *defaultName);
|
1998-09-29 22:36:29 +00:00
|
|
|
|
|
|
|
|
void RemoveObjectForKey(char *defaultName);
|
|
|
|
|
|
|
|
|
|
char *GetStringForKey(char *defaultName);
|
|
|
|
|
|
|
|
|
|
int GetIntegerForKey(char *defaultName);
|
|
|
|
|
|
|
|
|
|
Bool GetBoolForKey(char *defaultName);
|
|
|
|
|
|
|
|
|
|
int GetSpeedForKey(char *defaultName);
|
|
|
|
|
|
|
|
|
|
void SetIntegerForKey(int value, char *defaultName);
|
|
|
|
|
|
|
|
|
|
void SetStringForKey(char *value, char *defaultName);
|
|
|
|
|
|
|
|
|
|
void SetBoolForKey(Bool value, char *defaultName);
|
|
|
|
|
|
|
|
|
|
void SetSpeedForKey(int speed, char *defaultName);
|
|
|
|
|
|
1999-01-06 15:22:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
void AddDeadChildHandler(pid_t pid, void (*handler)(void*), void *data);
|
|
|
|
|
|
|
|
|
|
|
1998-09-29 22:36:29 +00:00
|
|
|
#define FRAME_TOP 105
|
2001-04-25 02:03:08 +00:00
|
|
|
#define FRAME_LEFT -2
|
|
|
|
|
#define FRAME_WIDTH 524
|
1998-09-29 22:36:29 +00:00
|
|
|
#define FRAME_HEIGHT 235
|
2010-04-11 21:12:01 +02:00
|
|
|
#endif /* WPREFS_H_ */
|
1998-09-29 22:36:29 +00:00
|
|
|
|