1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 13:54:12 +01:00

WINGs: Added 'const' attribute to functions in wballoon, wmenuitem, wmisc, wtextfield

This makes both the API and local function const-correct on their
input parameters.
This commit is contained in:
Christophe CURIS
2013-05-09 17:34:04 +02:00
committed by Carlos R. Mafra
parent a1119f8dd3
commit 6616323088
6 changed files with 32 additions and 31 deletions

View File

@@ -936,7 +936,7 @@ extern char *WMViewRealizedNotification;
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
void WMSetBalloonTextForView(char *text, WMView *view);
void WMSetBalloonTextForView(const char *text, WMView *view);
void WMSetBalloonTextAlignment(WMScreen *scr, WMAlignment alignment);
@@ -1097,14 +1097,14 @@ void WMSetFrameTitle(WMFrame *fPtr, const char *title);
WMTextField* WMCreateTextField(WMWidget *parent);
void WMInsertTextFieldText(WMTextField *tPtr, char *text, int position);
void WMInsertTextFieldText(WMTextField *tPtr, const char *text, int position);
void WMDeleteTextFieldRange(WMTextField *tPtr, WMRange range);
/* you can free the returned string */
char* WMGetTextFieldText(WMTextField *tPtr);
void WMSetTextFieldText(WMTextField *tPtr, char *text);
void WMSetTextFieldText(WMTextField *tPtr, const char *text);
void WMSetTextFieldAlignment(WMTextField *tPtr, WMAlignment alignment);
@@ -1325,7 +1325,7 @@ char* WMGetMenuItemShortcut(WMMenuItem *item);
unsigned WMGetMenuItemShortcutModifierMask(WMMenuItem *item);
void WMSetMenuItemShortcut(WMMenuItem *item, char *shortcut);
void WMSetMenuItemShortcut(WMMenuItem *item, const char *shortcut);
void WMSetMenuItemShortcutModifierMask(WMMenuItem *item, unsigned mask);
@@ -1339,7 +1339,7 @@ WMAction* WMGetMenuItemAction(WMMenuItem *item);
void* WMGetMenuItemData(WMMenuItem *item);
void WMSetMenuItemTitle(WMMenuItem *item, char *title);
void WMSetMenuItemTitle(WMMenuItem *item, const char *title);
char* WMGetMenuItemTitle(WMMenuItem *item);

View File

@@ -519,18 +519,18 @@ void W_DrawReliefWithGC(W_Screen *scr, Drawable d, int x, int y,
void W_CallDestroyHandlers(W_View *view);
void W_PaintTextAndImage(W_View *view, int wrap, WMColor *textColor,
W_Font *font, WMReliefType relief, char *text,
W_Font *font, WMReliefType relief, const char *text,
WMAlignment alignment, W_Pixmap *image,
WMImagePosition position, WMColor *backColor, int ofs);
void W_PaintText(W_View *view, Drawable d, WMFont *font, int x, int y,
int width, WMAlignment alignment, WMColor *color,
int wrap, char *text, int length);
int wrap, const char *text, int length);
int W_GetTextHeight(WMFont *font, char *text, int width, int wrap);
int W_GetTextHeight(WMFont *font, const char *text, int width, int wrap);
int W_TextWidth(WMFont *font, char *text, int length);
int W_TextWidth(WMFont *font, const char *text, int length);
void W_BroadcastMessage(W_View *targetParent, XEvent *event);