1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-18 20:10:29 +01:00

WINGs: Properly mark 'const' more 'char*' in the public API

Because the previous patch brought a (welcome) change in the public API,
seize the opportunity to go further in the improvement.
This commit is contained in:
Christophe CURIS
2021-08-08 09:36:15 +02:00
committed by Carlos R. Mafra
parent a079544647
commit 43f0474013
10 changed files with 28 additions and 28 deletions

View File

@@ -26,7 +26,7 @@
#include <WINGs/WUtil.h>
#include <X11/Xlib.h>
#define WINGS_H_VERSION 20150508
#define WINGS_H_VERSION 20210726
#ifdef __cplusplus
@@ -736,7 +736,7 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
void *cdata);
extern char *WMSelectionOwnerDidChangeNotification;
extern const char *WMSelectionOwnerDidChangeNotification;
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
@@ -977,11 +977,11 @@ WMPoint WMGetViewScreenPosition(WMView *view);
WMWidget* WMWidgetOfView(WMView *view);
/* notifications */
extern char *WMViewSizeDidChangeNotification;
extern const char *WMViewSizeDidChangeNotification;
extern char *WMViewFocusDidChangeNotification;
extern const char *WMViewFocusDidChangeNotification;
extern char *WMViewRealizedNotification;
extern const char *WMViewRealizedNotification;
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
@@ -1190,9 +1190,9 @@ void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
extern char *WMTextDidChangeNotification;
extern char *WMTextDidBeginEditingNotification;
extern char *WMTextDidEndEditingNotification;
extern const char *WMTextDidChangeNotification;
extern const char *WMTextDidBeginEditingNotification;
extern const char *WMTextDidEndEditingNotification;
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
@@ -1212,7 +1212,7 @@ void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
WMScrollArrowPosition position);
extern char *WMScrollerDidScrollNotification;
extern const char *WMScrollerDidScrollNotification;
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
@@ -1291,8 +1291,8 @@ Bool WMListAllowsMultipleSelection(WMList *lPtr);
Bool WMListAllowsEmptySelection(WMList *lPtr);
extern char *WMListDidScrollNotification;
extern char *WMListSelectionDidChangeNotification;
extern const char *WMListDidScrollNotification;
extern const char *WMListSelectionDidChangeNotification;
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
@@ -1496,7 +1496,7 @@ void WMSetColorPanelPickerMode(WMColorPanel *panel, WMColorPanelMode mode);
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
extern char *WMColorPanelColorChangedNotification;
extern const char *WMColorPanelColorChangedNotification;
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
@@ -1509,7 +1509,7 @@ WMColor* WMGetColorWellColor(WMColorWell *cPtr);
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
extern char *WMColorWellDidChangeNotification;
extern const char *WMColorWellDidChangeNotification;
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */

View File

@@ -41,7 +41,7 @@ typedef struct _WINGsConfiguration {
unsigned mouseWheelDown;
} _WINGsConfiguration;
extern char *_WINGS_progname;
extern const char *_WINGS_progname;
extern _WINGsConfiguration WINGsConfiguration;
extern struct W_Application WMApplication;

View File

@@ -7,7 +7,7 @@
#define MAX_PROPERTY_SIZE 8*1024
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
typedef struct SelectionHandler {
WMView *view;

View File

@@ -9,7 +9,7 @@
struct W_Application WMApplication;
char *_WINGS_progname = NULL;
const char *_WINGS_progname = NULL;
Bool W_ApplicationInitialized(void)
{

View File

@@ -44,7 +44,7 @@
# include <X11/extensions/shape.h>
#endif
char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
/*
* Bitmaps for magnifying glass cursor

View File

@@ -3,7 +3,7 @@
#define XDND_COLOR_DATA_TYPE "application/X-color"
char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
const char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
typedef struct W_ColorWell {
W_Class widgetClass;

View File

@@ -1,8 +1,8 @@
#include "WINGsP.h"
char *WMListDidScrollNotification = "WMListDidScrollNotification";
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
const char *WMListDidScrollNotification = "WMListDidScrollNotification";
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
typedef struct W_List {
W_Class widgetClass;

View File

@@ -20,7 +20,7 @@
#define AUTOSCROLL_DELAY 40
char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
const char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
typedef struct W_Scroller {
W_Class widgetClass;

View File

@@ -10,9 +10,9 @@
#define CURSOR_BLINK_ON_DELAY 600
#define CURSOR_BLINK_OFF_DELAY 300
char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
const char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
const char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
const char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
typedef struct W_TextField {
W_Class widgetClass;
@@ -942,7 +942,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
{
char buffer[64];
KeySym ksym;
char *textEvent = NULL;
const char *textEvent = NULL;
void *data = NULL;
int count, refresh = 0;
int control_pressed = 0;

View File

@@ -5,9 +5,9 @@
/* the notifications about views */
char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
char *WMViewRealizedNotification = "WMViewRealizedNotification";
const char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
const char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
const char *WMViewRealizedNotification = "WMViewRealizedNotification";
#define EVENT_MASK \
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \