1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-05 16:45:50 +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

@@ -43,7 +43,7 @@ static void destroyBalloon(Balloon * bPtr);
static void handleEvents(XEvent * event, void *data);
static void showText(Balloon * bPtr, int x, int y, int w, int h, char *text);
static void showText(Balloon * bPtr, int x, int y, int w, int h, const char *text);
struct W_Balloon *W_CreateBalloon(WMScreen * scr)
{
@@ -80,7 +80,7 @@ void WMSetBalloonTextAlignment(WMScreen * scr, WMAlignment alignment)
}
void WMSetBalloonTextForView(char *text, WMView * view)
void WMSetBalloonTextForView(const char *text, WMView * view)
{
char *oldText = NULL;
WMScreen *scr = view->screen;
@@ -361,7 +361,7 @@ static Pixmap makePixmap(WMScreen * scr, int width, int height, int side, Pixmap
return pixmap;
}
static void showText(Balloon * bPtr, int x, int y, int w, int h, char *text)
static void showText(Balloon * bPtr, int x, int y, int w, int h, const char *text)
{
WMScreen *scr = bPtr->view->screen;
Display *dpy = WMScreenDisplay(scr);
@@ -377,7 +377,7 @@ static void showText(Balloon * bPtr, int x, int y, int w, int h, char *text)
{
int w;
char *ptr, *ptr2;
const char *ptr, *ptr2;
ptr2 = ptr = text;
width = 0;