1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 20:38:08 +01:00

wmaker: Added 'const' attribute to most global functions

Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2013-06-16 17:57:48 +02:00
committed by Carlos R. Mafra
parent f0c1dc9fc3
commit 9b5db31d95
22 changed files with 65 additions and 64 deletions

View File

@@ -37,24 +37,24 @@ void wDefaultUpdateIcons(WScreen *scr);
void wReadStaticDefaults(WMPropList *dict); void wReadStaticDefaults(WMPropList *dict);
void wDefaultsCheckDomains(void *arg); void wDefaultsCheckDomains(void *arg);
void wSaveDefaults(WScreen *scr); void wSaveDefaults(WScreen *scr);
void wDefaultFillAttributes(char *instance, char *class, void wDefaultFillAttributes(const char *instance, const char *class,
WWindowAttributes *attr, WWindowAttributes *mask, WWindowAttributes *attr, WWindowAttributes *mask,
Bool useGlobalDefault); Bool useGlobalDefault);
char *get_default_image_path(void); char *get_default_image_path(void);
RImage *get_default_image(WScreen *scr); RImage *get_default_image(WScreen *scr);
char *wDefaultGetIconFile(char *instance, char *class, Bool default_icon); char *wDefaultGetIconFile(const char *instance, const char *class, Bool default_icon);
RImage *get_icon_image(WScreen *scr, char *winstance, char *wclass, int max_size); RImage *get_icon_image(WScreen *scr, char *winstance, char *wclass, int max_size);
char *get_icon_filename(WScreen *scr, char *winstance, char *wclass, char *command, char *get_icon_filename(WScreen *scr, char *winstance, char *wclass, char *command,
Bool default_icon); Bool default_icon);
int wDefaultGetStartWorkspace(WScreen *scr, char *instance, char *class); int wDefaultGetStartWorkspace(WScreen *scr, const char *instance, const char *class);
void wDefaultChangeIcon(WScreen *scr, char *instance, char* class, char *file); void wDefaultChangeIcon(WScreen *scr, const char *instance, const char* class, const char *file);
RImage *get_rimage_from_file(WScreen *scr, char *file_name, int max_size); RImage *get_rimage_from_file(WScreen *scr, char *file_name, int max_size);
void wDefaultPurgeInfo(WScreen *scr, char *instance, char *class); void wDefaultPurgeInfo(WScreen *scr, const char *instance, const char *class);
#endif /* WMDEFAULTS_H_ */ #endif /* WMDEFAULTS_H_ */

View File

@@ -67,7 +67,7 @@ static WMPoint getCenter(WScreen * scr, int width, int height)
return wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr), width, height); return wGetPointToCenterRectInHead(scr, wGetHeadForPointerLocation(scr), width, height);
} }
int wMessageDialog(WScreen * scr, char *title, char *message, char *defBtn, char *altBtn, char *othBtn) int wMessageDialog(WScreen *scr, const char *title, const char *message, const char *defBtn, const char *altBtn, const char *othBtn)
{ {
WMAlertPanel *panel; WMAlertPanel *panel;
Window parent; Window parent;
@@ -109,7 +109,7 @@ static void toggleSaveSession(WMWidget *w, void *data)
wPreferences.save_session_on_exit = WMGetButtonSelected((WMButton *) w); wPreferences.save_session_on_exit = WMGetButtonSelected((WMButton *) w);
} }
int wExitDialog(WScreen * scr, char *title, char *message, char *defBtn, char *altBtn, char *othBtn) int wExitDialog(WScreen *scr, const char *title, const char *message, const char *defBtn, const char *altBtn, const char *othBtn)
{ {
WMAlertPanel *panel; WMAlertPanel *panel;
WMButton *saveSessionBtn; WMButton *saveSessionBtn;
@@ -407,7 +407,7 @@ static void handleHistoryKeyPress(XEvent * event, void *clientData)
} }
} }
int wAdvancedInputDialog(WScreen * scr, char *title, char *message, char *name, char **text) int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, const char *name, char **text)
{ {
WWindow *wwin; WWindow *wwin;
Window parent; Window parent;
@@ -471,7 +471,7 @@ int wAdvancedInputDialog(WScreen * scr, char *title, char *message, char *name,
} }
} }
int wInputDialog(WScreen * scr, char *title, char *message, char **text) int wInputDialog(WScreen *scr, const char *title, const char *message, char **text)
{ {
WWindow *wwin; WWindow *wwin;
Window parent; Window parent;
@@ -891,7 +891,7 @@ static void keyPressHandler(XEvent * event, void *data)
} }
} }
Bool wIconChooserDialog(WScreen * scr, char **file, char *instance, char *class) Bool wIconChooserDialog(WScreen *scr, char **file, const char *instance, const char *class)
{ {
WWindow *wwin; WWindow *wwin;
Window parent; Window parent;

View File

@@ -30,15 +30,15 @@ enum {
}; };
int wMessageDialog(WScreen *scr, char *title, char *message, int wMessageDialog(WScreen *scr, const char *title, const char *message,
char *defBtn, char *altBtn, char *othBtn); const char *defBtn, const char *altBtn, const char *othBtn);
int wAdvancedInputDialog(WScreen *scr, char *title, char *message, char *name, char **text); int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, const char *name, char **text);
int wInputDialog(WScreen *scr, char *title, char *message, char **text); int wInputDialog(WScreen *scr, const char *title, const char *message, char **text);
int wExitDialog(WScreen *scr, char *title, char *message, char *defBtn, int wExitDialog(WScreen *scr, const char *title, const char *message, const char *defBtn,
char *altBtn, char *othBtn); const char *altBtn, const char *othBtn);
Bool wIconChooserDialog(WScreen *scr, char **file, char *instance, char *class); Bool wIconChooserDialog(WScreen *scr, char **file, const char *instance, const char *class);
void wShowInfoPanel(WScreen *scr); void wShowInfoPanel(WScreen *scr);
void wShowLegalPanel(WScreen *scr); void wShowLegalPanel(WScreen *scr);

View File

@@ -1191,7 +1191,7 @@ void wFrameWindowResize(WFrameWindow * fwin, int width, int height)
reconfigure(fwin, 0, 0, width, height, True); reconfigure(fwin, 0, 0, width, height, True);
} }
int wFrameWindowChangeTitle(WFrameWindow * fwin, char *new_title) int wFrameWindowChangeTitle(WFrameWindow *fwin, const char *new_title)
{ {
/* check if the title is the same as before */ /* check if the title is the same as before */
if (fwin->title) { if (fwin->title) {

View File

@@ -181,7 +181,7 @@ void wFrameWindowShowButton(WFrameWindow *fwin, int flags);
void wFrameWindowHideButton(WFrameWindow *fwin, int flags); void wFrameWindowHideButton(WFrameWindow *fwin, int flags);
int wFrameWindowChangeTitle(WFrameWindow *fwin, char *new_title); int wFrameWindowChangeTitle(WFrameWindow *fwin, const char *new_title);
#ifdef XKB_BUTTON_HINT #ifdef XKB_BUTTON_HINT
void wFrameWindowUpdateLanguageButton(WFrameWindow *fwin); void wFrameWindowUpdateLanguageButton(WFrameWindow *fwin);

View File

@@ -353,7 +353,7 @@ static void shellCommandHandler(pid_t pid, unsigned char status, _tuple * data)
wfree(data); wfree(data);
} }
void ExecuteShellCommand(WScreen * scr, char *command) void ExecuteShellCommand(WScreen *scr, const char *command)
{ {
static char *shell = NULL; static char *shell = NULL;
pid_t pid; pid_t pid;

View File

@@ -31,7 +31,7 @@
noreturn void Exit(int status); noreturn void Exit(int status);
void Restart(char *manager, Bool abortOnFailure); void Restart(char *manager, Bool abortOnFailure);
void SetupEnvironment(WScreen *scr); void SetupEnvironment(WScreen *scr);
void ExecuteShellCommand(WScreen *scr, char *command); void ExecuteShellCommand(WScreen *scr, const char *command);
Bool RelaunchWindow(WWindow *wwin); Bool RelaunchWindow(WWindow *wwin);
noreturn void wAbort(Bool dumpCore); noreturn void wAbort(Bool dumpCore);
void ExecExitScript(void); void ExecExitScript(void);

View File

@@ -140,7 +140,7 @@ static void appearanceObserver(void *self, WMNotification * notif)
* The created menu. * The created menu.
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
WMenu *wMenuCreate(WScreen * screen, char *title, int main_menu) WMenu *wMenuCreate(WScreen *screen, const char *title, int main_menu)
{ {
WMenu *menu; WMenu *menu;
static int brother = 0; static int brother = 0;
@@ -230,7 +230,7 @@ WMenu *wMenuCreate(WScreen * screen, char *title, int main_menu)
return menu; return menu;
} }
WMenu *wMenuCreateForApp(WScreen * screen, char *title, int main_menu) WMenu *wMenuCreateForApp(WScreen *screen, const char *title, int main_menu)
{ {
WMenu *menu; WMenu *menu;
@@ -254,7 +254,7 @@ static void insertEntry(WMenu * menu, WMenuEntry * entry, int index)
menu->entries[index] = entry; menu->entries[index] = entry;
} }
WMenuEntry *wMenuInsertCallback(WMenu * menu, int index, char *text, WMenuEntry *wMenuInsertCallback(WMenu *menu, int index, const char *text,
void (*callback) (WMenu * menu, WMenuEntry * entry), void *clientdata) void (*callback) (WMenu * menu, WMenuEntry * entry), void *clientdata)
{ {
WMenuEntry *entry; WMenuEntry *entry;

View File

@@ -106,9 +106,9 @@ typedef struct WMenu {
void wMenuPaint(WMenu *menu); void wMenuPaint(WMenu *menu);
void wMenuDestroy(WMenu *menu, int recurse); void wMenuDestroy(WMenu *menu, int recurse);
void wMenuRealize(WMenu *menu); void wMenuRealize(WMenu *menu);
WMenuEntry *wMenuInsertCascade(WMenu *menu, int index, char *text, WMenuEntry *wMenuInsertCascade(WMenu *menu, int index, const char *text,
WMenu *cascade); WMenu *cascade);
WMenuEntry *wMenuInsertCallback(WMenu *menu, int index, char *text, WMenuEntry *wMenuInsertCallback(WMenu *menu, int index, const char *text,
void (*callback)(WMenu *menu, WMenuEntry *entry), void (*callback)(WMenu *menu, WMenuEntry *entry),
void *clientdata); void *clientdata);
@@ -119,8 +119,8 @@ void wMenuEntrySetCascade(WMenu *menu, WMenuEntry *entry, WMenu *cascade);
void wMenuRemoveItem(WMenu *menu, int index); void wMenuRemoveItem(WMenu *menu, int index);
WMenu *wMenuCreate(WScreen *screen, char *title, int main_menu); WMenu *wMenuCreate(WScreen *screen, const char *title, int main_menu);
WMenu *wMenuCreateForApp(WScreen *screen, char *title, int main_menu); WMenu *wMenuCreateForApp(WScreen *screen, const char *title, int main_menu);
void wMenuMap(WMenu *menu); void wMenuMap(WMenu *menu);
void wMenuMapAt(WMenu *menu, int x, int y, int keyboard); void wMenuMapAt(WMenu *menu, int x, int y, int keyboard);
#define wMenuMapCopyAt(menu, x, y) wMenuMapAt((menu)->brother, (x), (y), False) #define wMenuMapCopyAt(menu, x, y) wMenuMapAt((menu)->brother, (x), (y), False)

View File

@@ -316,7 +316,7 @@ char *ShrinkString(WMFont *font, const char *string, int width)
return text; return text;
} }
char *FindImage(char *paths, char *file) char *FindImage(const char *paths, const char *file)
{ {
char *tmp, *path = NULL; char *tmp, *path = NULL;
@@ -507,7 +507,7 @@ getuserinput(WScreen *scr, const char *line, int *ptr, Bool advanced)
* OPTION etc. NORMAL %<input> * OPTION etc. NORMAL %<input>
*/ */
#define TMPBUFSIZE 64 #define TMPBUFSIZE 64
char *ExpandOptions(WScreen * scr, char *cmdline) char *ExpandOptions(WScreen *scr, const char *cmdline)
{ {
int ptr, optr, state, len, olen; int ptr, optr, state, len, olen;
char *out, *nout; char *out, *nout;
@@ -688,7 +688,7 @@ char *ExpandOptions(WScreen * scr, char *cmdline)
return NULL; return NULL;
} }
void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char *where) void ParseWindowName(WMPropList *value, char **winstance, char **wclass, const char *where)
{ {
char *name; char *name;
@@ -815,7 +815,7 @@ char *GetShortcutKey(WShortKey key)
return GetShortcutString(tmp); return GetShortcutString(tmp);
} }
char *EscapeWM_CLASS(char *name, char *class) char *EscapeWM_CLASS(const char *name, const char *class)
{ {
char *ret; char *ret;
char *ename = NULL, *eclass = NULL; char *ename = NULL, *eclass = NULL;
@@ -921,7 +921,7 @@ static void UnescapeWM_CLASS(const char *str, char **name, char **class)
} }
} }
void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg) void SendHelperMessage(WScreen *scr, char type, int workspace, const char *msg)
{ {
char *buffer; char *buffer;
int len; int len;
@@ -986,7 +986,7 @@ Bool UpdateDomainFile(WDDomain * domain)
return result; return result;
} }
char *StrConcatDot(char *a, char *b) char *StrConcatDot(const char *a, const char *b)
{ {
int len; int len;
char *str; char *str;

View File

@@ -32,15 +32,15 @@ Bool UpdateDomainFile(WDDomain * domain);
void move_window(Window win, int from_x, int from_y, int to_x, int to_y); void move_window(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y); void SlideWindow(Window win, int from_x, int from_y, int to_x, int to_y);
void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int to_y); void SlideWindows(Window *wins[], int n, int from_x, int from_y, int to_x, int to_y);
void ParseWindowName(WMPropList * value, char **winstance, char **wclass, char *where); void ParseWindowName(WMPropList *value, char **winstance, char **wclass, const char *where);
void SendHelperMessage(WScreen * scr, char type, int workspace, char *msg); void SendHelperMessage(WScreen *scr, char type, int workspace, const char *msg);
char *ShrinkString(WMFont *font, const char *string, int width); char *ShrinkString(WMFont *font, const char *string, int width);
char *FindImage(char *paths, char *file); char *FindImage(const char *paths, const char *file);
char *ExpandOptions(WScreen * scr, char *cmdline); char *ExpandOptions(WScreen * scr, const char *cmdline);
char *GetShortcutString(const char *text); char *GetShortcutString(const char *text);
char *GetShortcutKey(WShortKey key); char *GetShortcutKey(WShortKey key);
char *EscapeWM_CLASS(char *name, char *class); char *EscapeWM_CLASS(const char *name, const char *class);
char *StrConcatDot(char *a, char *b); char *StrConcatDot(const char *a, const char *b);
char *GetCommandForWindow(Window win); char *GetCommandForWindow(Window win);
#endif #endif

View File

@@ -35,7 +35,7 @@
#include "resources.h" #include "resources.h"
#include "screen.h" #include "screen.h"
int wGetColorForColormap(Colormap colormap, char *color_name, XColor * color) int wGetColorForColormap(Colormap colormap, const char *color_name, XColor *color)
{ {
if (!XParseColor(dpy, colormap, color_name, color)) { if (!XParseColor(dpy, colormap, color_name, color)) {
wwarning(_("could not parse color \"%s\""), color_name); wwarning(_("could not parse color \"%s\""), color_name);
@@ -48,7 +48,7 @@ int wGetColorForColormap(Colormap colormap, char *color_name, XColor * color)
return True; return True;
} }
int wGetColor(WScreen * scr, char *color_name, XColor * color) int wGetColor(WScreen *scr, const char *color_name, XColor *color)
{ {
return wGetColorForColormap(scr->w_colormap, color_name, color); return wGetColorForColormap(scr->w_colormap, color_name, color);
} }

View File

@@ -21,8 +21,8 @@
#ifndef WMRESOURCES_H_ #ifndef WMRESOURCES_H_
#define WMRESOURCES_H_ #define WMRESOURCES_H_
int wGetColorForColormap(Colormap colormap, char *color_name, XColor *color); int wGetColorForColormap(Colormap colormap, const char *color_name, XColor *color);
int wGetColor(WScreen *scr, char *color_name, XColor *color); int wGetColor(WScreen *scr, const char *color_name, XColor *color);
void wFreeColor(WScreen *scr, unsigned long pixel); void wFreeColor(WScreen *scr, unsigned long pixel);
#endif #endif

View File

@@ -175,7 +175,7 @@ void wTextureDestroy(WScreen * scr, WTexture * texture)
#undef CANFREE #undef CANFREE
} }
WTexGradient *wTextureMakeGradient(WScreen * scr, int style, RColor * from, RColor * to) WTexGradient *wTextureMakeGradient(WScreen *scr, int style, const RColor *from, const RColor *to)
{ {
WTexGradient *texture; WTexGradient *texture;
XGCValues gcv; XGCValues gcv;
@@ -199,8 +199,8 @@ WTexGradient *wTextureMakeGradient(WScreen * scr, int style, RColor * from, RCol
return texture; return texture;
} }
WTexIGradient *wTextureMakeIGradient(WScreen * scr, int thickness1, RColor colors1[2], WTexIGradient *wTextureMakeIGradient(WScreen *scr, int thickness1, const RColor colors1[2],
int thickness2, RColor colors2[2]) int thickness2, const RColor colors2[2])
{ {
WTexIGradient *texture; WTexIGradient *texture;
XGCValues gcv; XGCValues gcv;

View File

@@ -159,10 +159,10 @@ typedef union WTexture {
WTexSolid *wTextureMakeSolid(WScreen*, XColor*); WTexSolid *wTextureMakeSolid(WScreen*, XColor*);
WTexGradient *wTextureMakeGradient(WScreen*, int, RColor*, RColor*); WTexGradient *wTextureMakeGradient(WScreen*, int, const RColor*, const RColor*);
WTexMGradient *wTextureMakeMGradient(WScreen*, int, RColor**); WTexMGradient *wTextureMakeMGradient(WScreen*, int, RColor**);
WTexTGradient *wTextureMakeTGradient(WScreen*, int, RColor*, RColor*, char *, int); WTexTGradient *wTextureMakeTGradient(WScreen*, int, RColor*, RColor*, char *, int);
WTexIGradient *wTextureMakeIGradient(WScreen*, int, RColor[], int, RColor[]); WTexIGradient *wTextureMakeIGradient(WScreen*, int, const RColor[], int, const RColor[]);
WTexPixmap *wTextureMakePixmap(WScreen *scr, int style, char *pixmap_file, WTexPixmap *wTextureMakePixmap(WScreen *scr, int style, char *pixmap_file,
XColor *color); XColor *color);
void wTextureDestroy(WScreen*, WTexture*); void wTextureDestroy(WScreen*, WTexture*);

View File

@@ -200,7 +200,7 @@ static WMPropList *get_value_from_instanceclass(const char *value)
* *
*---------------------------------------------------------------------- *----------------------------------------------------------------------
*/ */
void wDefaultFillAttributes(char *instance, char *class, void wDefaultFillAttributes(const char *instance, const char *class,
WWindowAttributes *attr, WWindowAttributes *mask, WWindowAttributes *attr, WWindowAttributes *mask,
Bool useGlobalDefault) Bool useGlobalDefault)
{ {
@@ -483,7 +483,7 @@ RImage *get_icon_image(WScreen *scr, char *winstance, char *wclass, int max_size
return get_rimage_from_file(scr, file_name, max_size); return get_rimage_from_file(scr, file_name, max_size);
} }
int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class) int wDefaultGetStartWorkspace(WScreen *scr, const char *instance, const char *class)
{ {
WMPropList *value; WMPropList *value;
int w; int w;
@@ -512,7 +512,7 @@ int wDefaultGetStartWorkspace(WScreen * scr, char *instance, char *class)
} }
/* Get the name of the Icon File. If default_icon is True, then, default value included */ /* Get the name of the Icon File. If default_icon is True, then, default value included */
char *wDefaultGetIconFile(char *instance, char *class, Bool default_icon) char *wDefaultGetIconFile(const char *instance, const char *class, Bool default_icon)
{ {
WMPropList *value; WMPropList *value;
char *tmp; char *tmp;
@@ -533,7 +533,7 @@ char *wDefaultGetIconFile(char *instance, char *class, Bool default_icon)
return tmp; return tmp;
} }
void wDefaultChangeIcon(WScreen * scr, char *instance, char *class, char *file) void wDefaultChangeIcon(WScreen *scr, const char *instance, const char *class, const char *file)
{ {
WDDomain *db = WDWindowAttributes; WDDomain *db = WDWindowAttributes;
WMPropList *icon_value = NULL, *value, *attr, *key, *def_win, *def_icon = NULL; WMPropList *icon_value = NULL, *value, *attr, *key, *def_win, *def_icon = NULL;
@@ -597,7 +597,7 @@ void wDefaultChangeIcon(WScreen * scr, char *instance, char *class, char *file)
WMPLSetCaseSensitive(False); WMPLSetCaseSensitive(False);
} }
void wDefaultPurgeInfo(WScreen *scr, char *instance, char *class) void wDefaultPurgeInfo(WScreen *scr, const char *instance, const char *class)
{ {
WMPropList *value, *key, *dict; WMPropList *value, *key, *dict;
char *buffer; char *buffer;

View File

@@ -1324,7 +1324,7 @@ WWindow *wManageWindow(WScreen *scr, Window window)
} }
WWindow *wManageInternalWindow(WScreen *scr, Window window, Window owner, WWindow *wManageInternalWindow(WScreen *scr, Window window, Window owner,
char *title, int x, int y, int width, int height) const char *title, int x, int y, int width, int height)
{ {
WWindow *wwin; WWindow *wwin;
int foo; int foo;
@@ -2548,7 +2548,8 @@ void wWindowUpdateGNUstepAttr(WWindow * wwin, GNUstepWMAttributes * attr)
} }
} }
WMagicNumber wWindowAddSavedState(char *instance, char *class, char *command, pid_t pid, WSavedState * state) WMagicNumber wWindowAddSavedState(const char *instance, const char *class,
const char *command, pid_t pid, WSavedState * state)
{ {
WWindowState *wstate; WWindowState *wstate;

View File

@@ -370,7 +370,7 @@ void wWindowSetKeyGrabs(WWindow *wwin);
void wWindowResetMouseGrabs(WWindow *wwin); void wWindowResetMouseGrabs(WWindow *wwin);
WWindow *wManageInternalWindow(WScreen *scr, Window window, Window owner, WWindow *wManageInternalWindow(WScreen *scr, Window window, Window owner,
char *title, int x, int y, const char *title, int x, int y,
int width, int height); int width, int height);
void wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace); void wWindowSetupInitialAttributes(WWindow *wwin, int *level, int *workspace);
@@ -383,7 +383,7 @@ void wWindowUnmap(WWindow *wwin);
void wWindowDeleteSavedStatesForPID(pid_t pid); void wWindowDeleteSavedStatesForPID(pid_t pid);
WMagicNumber wWindowAddSavedState(char *instance, char *class, char *command, WMagicNumber wWindowAddSavedState(const char *instance, const char *class, const char *command,
pid_t pid, WSavedState *state); pid_t pid, WSavedState *state);
WMagicNumber wWindowGetSavedState(Window win); WMagicNumber wWindowGetSavedState(Window win);

View File

@@ -667,7 +667,7 @@ static void newWSCommand(WMenu *menu, WMenuEntry *foo)
wWorkspaceChange(menu->frame->screen_ptr, ws); wWorkspaceChange(menu->frame->screen_ptr, ws);
} }
void wWorkspaceRename(WScreen * scr, int workspace, char *name) void wWorkspaceRename(WScreen *scr, int workspace, const char *name)
{ {
char buf[MAX_WORKSPACENAME_WIDTH + 1]; char buf[MAX_WORKSPACENAME_WIDTH + 1];
char *tmp; char *tmp;
@@ -923,7 +923,7 @@ void wWorkspaceRestoreState(WScreen *scr)
} }
/* Returns the workspace number for a given workspace name */ /* Returns the workspace number for a given workspace name */
int wGetWorkspaceNumber(WScreen * scr, char * value) int wGetWorkspaceNumber(WScreen *scr, const char *value)
{ {
int w, i; int w, i;

View File

@@ -31,7 +31,7 @@ typedef struct WWorkspace {
void wWorkspaceMake(WScreen *scr, int count); void wWorkspaceMake(WScreen *scr, int count);
int wWorkspaceNew(WScreen *scr); int wWorkspaceNew(WScreen *scr);
int wGetWorkspaceNumber(WScreen * scr, char * value); int wGetWorkspaceNumber(WScreen *scr, const char *value);
Bool wWorkspaceDelete(WScreen *scr, int workspace); Bool wWorkspaceDelete(WScreen *scr, int workspace);
void wWorkspaceChange(WScreen *scr, int workspace); void wWorkspaceChange(WScreen *scr, int workspace);
void wWorkspaceForceChange(WScreen *scr, int workspace); void wWorkspaceForceChange(WScreen *scr, int workspace);
@@ -40,7 +40,7 @@ void wWorkspaceMenuUpdate(WScreen *scr, WMenu *menu);
void wWorkspaceMenuEdit(WScreen *scr); void wWorkspaceMenuEdit(WScreen *scr);
void wWorkspaceSaveState(WScreen *scr, WMPropList *old_state); void wWorkspaceSaveState(WScreen *scr, WMPropList *old_state);
void wWorkspaceRestoreState(WScreen *scr); void wWorkspaceRestoreState(WScreen *scr);
void wWorkspaceRename(WScreen *scr, int workspace, char *name); void wWorkspaceRename(WScreen *scr, int workspace, const char *name);
void wWorkspaceRelativeChange(WScreen *scr, int amount); void wWorkspaceRelativeChange(WScreen *scr, int amount);
#endif #endif

View File

@@ -262,7 +262,7 @@ static void x_reset_modifier_mapping(Display * display)
XFreeModifiermap(x_modifier_keymap); XFreeModifiermap(x_modifier_keymap);
} }
int wXModifierFromKey(char *key) int wXModifierFromKey(const char *key)
{ {
if (strcasecmp(key, "SHIFT") == 0 && ShiftMask != 0) if (strcasecmp(key, "SHIFT") == 0 && ShiftMask != 0)
return ShiftMask; return ShiftMask;

View File

@@ -21,6 +21,6 @@
#define _XMODIFIER_H_INCLUDED #define _XMODIFIER_H_INCLUDED
void wXModifierInitialize(void); void wXModifierInitialize(void);
int wXModifierFromKey(char *key); int wXModifierFromKey(const char *key);
#endif /* _XMODIFIER_H_INCLUDED */ #endif /* _XMODIFIER_H_INCLUDED */