wings: phase β — rename X11 typedefs in shared/Wayland code

Sed pass restricted to files outside src/backend/x11 and outside
*_x11.c — i.e. all code that should not depend on X11 typedefs.

  Window     → WNativeWindow      (existing typedef in WMEvent.h)
  Atom       → WMNativeAtom
  Pixmap     → WMNativePixmap
  Cursor     → WMNativeCursor
  Drawable   → WMDrawable          (existing typedef)
  KeySym     → WMNativeKeysym
  Colormap   → WMNativeColormap

X11 backend files keep using the original Xlib type names because
they make Xlib API calls that take those types.  All typedefs are
ultimately 'unsigned long' so values pass through opaquely between
shared code and the backend.

Public WINGs API affected: WMSelectionCallback, WMSelectionProcs,
and a handful of widget signatures that took Atom/Window arguments
now take WMNativeAtom/WNativeWindow.  Source-compatible at the
binary level; consumers must rebuild.

Time and XID typedefs left for a follow-up — both are heavily used
in field/variable names that need careful auditing.  Display* and
GC stay in W_Screen for now; phase δ moves them into an X11-only
sub-struct.
This commit is contained in:
Window Maker 2026-05-24 10:49:47 +02:00
parent 1a49d6b857
commit 0f839a9c6d
163 changed files with 840 additions and 840 deletions

View File

@ -50,7 +50,7 @@ typedef struct {
static char *SelectionColor = "#bbbbcc";
static void
stringDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMColor * textColor,
stringDraw(WMScreen * scr, WMDrawable d, GC gc, GC sgc, WMColor * textColor,
WMFont * font, void *data, WMRect rect, Bool selected)
{
int x, y;
@ -79,7 +79,7 @@ stringDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMColor * textColor,
XSetClipMask(dpy, gc, WM_NATIVE_NONE);
}
static void pixmapDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMPixmap * pixmap, WMRect rect, Bool selected)
static void pixmapDraw(WMScreen * scr, WMDrawable d, GC gc, GC sgc, WMPixmap * pixmap, WMRect rect, Bool selected)
{
int x, y;
XRectangle rects[1];
@ -119,7 +119,7 @@ static void pixmapDraw(WMScreen * scr, Drawable d, GC gc, GC sgc, WMPixmap * pix
/* ---------------------------------------------------------------------- */
static void SECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void SECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringEditorData *strdata = (StringEditorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -129,7 +129,7 @@ static void SECellPainter(WMTableColumnDelegate * self, WMTableColumn * column,
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), False);
}
static void selectedSECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedSECellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringEditorData *strdata = (StringEditorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -188,7 +188,7 @@ WMTableColumnDelegate *WTCreateStringEditorDelegate(WMTableView * parent)
/* ---------------------------------------------------------------------- */
static void ESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void ESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -199,7 +199,7 @@ static void ESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column,
strdata->options[i], WMTableViewRectForCell(table, column, row), False);
}
static void selectedESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedESCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
EnumSelectorData *strdata = (EnumSelectorData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -281,7 +281,7 @@ void WTSetEnumSelectorOptions(WMTableColumnDelegate * delegate, char **options,
/* ---------------------------------------------------------------------- */
static void BSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void BSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -298,7 +298,7 @@ static void BSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column,
}
}
static void selectedBSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedBSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
BooleanSwitchData *strdata = (BooleanSwitchData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -369,7 +369,7 @@ WMTableColumnDelegate *WTCreateBooleanSwitchDelegate(WMTableView * parent)
/* ---------------------------------------------------------------------- */
static void SCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void SCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -379,7 +379,7 @@ static void SCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, i
WMTableViewDataForCell(table, column, row), WMTableViewRectForCell(table, column, row), False);
}
static void selectedSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -412,7 +412,7 @@ WMTableColumnDelegate *WTCreateStringDelegate(WMTableView * parent)
/* ---------------------------------------------------------------------- */
static void PCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void PCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -423,7 +423,7 @@ static void PCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, i
WMTableViewRectForCell(table, column, row), False);
}
static void selectedPCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedPCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -455,7 +455,7 @@ WMTableColumnDelegate *WTCreatePixmapDelegate(WMTableView * table)
/* ---------------------------------------------------------------------- */
static void drawPSCell(WMTableColumnDelegate * self, Drawable d, WMTableColumn * column, int row, Bool selected)
static void drawPSCell(WMTableColumnDelegate * self, WMDrawable d, WMTableColumn * column, int row, Bool selected)
{
StringData *strdata = (StringData *) self->data;
WMTableView *table = WMGetTableColumnTableView(column);
@ -490,12 +490,12 @@ static void drawPSCell(WMTableColumnDelegate * self, Drawable d, WMTableColumn *
strdata->textColor, strdata->font, str, rect, selected);
}
static void PSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void PSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
drawPSCell(self, d, column, row, False);
}
static void selectedPSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, Drawable d)
static void selectedPSCellPainter(WMTableColumnDelegate * self, WMTableColumn * column, int row, WMDrawable d)
{
drawPSCell(self, d, column, row, True);
}

View File

@ -131,7 +131,7 @@ struct W_TableView {
GC gridGC;
WMColor *gridColor;
Cursor splitterCursor;
WMNativeCursor splitterCursor;
void *dataSource;
@ -410,7 +410,7 @@ static void splitterHandler(XEvent * event, void *data)
GC gc = scr->ixorGC;
Display *dpy = WMScreenDisplay(scr);
int h = WMWidgetHeight(table) - 22;
Window w = WMViewXID(table->view);
WNativeWindow w = WMViewXID(table->view);
pos = WMGetViewPosition(WMWidgetView(column->titleW));
@ -824,7 +824,7 @@ static void drawGrid(WMTableView * table, WMRect rect)
int y1, y2;
int x1, x2;
int xx;
Drawable d = WMGetPixmapXID(table->viewBuffer);
WMDrawable d = WMGetPixmapXID(table->viewBuffer);
GC gc = table->gridGC;
#if 0
@ -915,7 +915,7 @@ static void drawRow(WMTableView * table, int row, WMRect clipRect)
int i;
WMRange cols = columnsInRect(table, clipRect);
WMTableColumn *column;
Drawable d = WMGetPixmapXID(table->viewBuffer);
WMDrawable d = WMGetPixmapXID(table->viewBuffer);
for (i = cols.position; i < cols.position + cols.count; i++) {
column = WMGetFromArray(table->columns, i);
@ -935,7 +935,7 @@ static void drawFullRow(WMTableView * table, int row)
{
int i;
WMTableColumn *column;
Drawable d = WMGetPixmapXID(table->viewBuffer);
WMDrawable d = WMGetPixmapXID(table->viewBuffer);
for (i = 0; i < WMGetArrayItemCount(table->columns); i++) {
column = WMGetFromArray(table->columns, i);

View File

@ -18,9 +18,9 @@ extern const char *WMTableViewSelectionDidChangeNotification;
typedef struct WMTableColumnDelegate {
void *data;
void (*drawCell)(struct WMTableColumnDelegate *self,
WMTableColumn *column, int row, Drawable d);
WMTableColumn *column, int row, WMDrawable d);
void (*drawSelectedCell)(struct WMTableColumnDelegate *self,
WMTableColumn *column, int row, Drawable d);
WMTableColumn *column, int row, WMDrawable d);
void (*beginCellEdit)(struct WMTableColumnDelegate *self, WMTableColumn *column,
int row);

View File

@ -90,7 +90,7 @@ MyWidget *CreateMyWidget(WMWidget * parent)
/*
* Create the view for our widget.
* Note: the Window for the view is only created after the view is
* Note: the WNativeWindow for the view is only created after the view is
* realized with W_RealizeView()
*
* Consider the returned view as read-only.

View File

@ -570,8 +570,8 @@ void testText(WMScreen * scr)
#define FNAME "Verdana,sans serif:pixelsize=12"
#define MSG \
"Window Maker is the GNU window manager for the " \
"X Window System. It was designed to emulate the " \
"WNativeWindow Maker is the GNU window manager for the " \
"X WNativeWindow System. It was designed to emulate the " \
"look and feel of part of the NEXTSTEP(tm) GUI. It's " \
"supposed to be relatively fast and small, feature " \
"rich, easy to configure and easy to use, with a simple " \

View File

@ -58,7 +58,7 @@ extern "C" {
typedef unsigned long WMPixel;
/* WMDrawable: opaque surface handle passed to WMDrawString/WMDrawImageString.
* In X11 mode this is an X11 Drawable (XID).
* In X11 mode this is an X11 WMDrawable (XID).
* In Wayland mode this is a pixman_image_t* cast to unsigned long. */
typedef unsigned long WMDrawable;
@ -88,7 +88,7 @@ typedef struct {
#ifndef _DEFINED_GNUSTEP_WINDOW_INFO
#define _DEFINED_GNUSTEP_WINDOW_INFO
/*
* Window levels are taken from GNUstep (gui/AppKit/NSWindow.h)
* WNativeWindow levels are taken from GNUstep (gui/AppKit/NSWindow.h)
* NSDesktopWindowLevel intended to be the level at which things
* on the desktop sit ... so you should be able
* to put a desktop background just below it.
@ -506,7 +506,7 @@ typedef void WMAction2(void *self, void *clientData);
/* delegate method like stuff */
typedef void WMListDrawProc(WMList *lPtr, int index, Drawable d, char *text,
typedef void WMListDrawProc(WMList *lPtr, int index, WMDrawable d, char *text,
int state, WMRect *rect);
@ -588,15 +588,15 @@ typedef struct WMTabViewDelegate {
typedef void WMSelectionCallback(WMView *view, Atom selection, Atom target,
typedef void WMSelectionCallback(WMView *view, WMNativeAtom selection, WMNativeAtom target,
Time timestamp, void *cdata, WMData *data);
typedef struct WMSelectionProcs {
WMData* (*convertSelection)(WMView *view, Atom selection, Atom target,
void *cdata, Atom *type);
void (*selectionLost)(WMView *view, Atom selection, void *cdata);
void (*selectionDone)(WMView *view, Atom selection, Atom target,
WMData* (*convertSelection)(WMView *view, WMNativeAtom selection, WMNativeAtom target,
void *cdata, WMNativeAtom *type);
void (*selectionLost)(WMView *view, WMNativeAtom selection, void *cdata);
void (*selectionDone)(WMView *view, WMNativeAtom selection, WMNativeAtom target,
void *cdata);
} WMSelectionProcs;
@ -703,7 +703,7 @@ WMPixmap* WMGetApplicationIconPixmap(WMScreen *app);
/* If color==NULL it will use the default color for panels: ae/aa/ae */
WMPixmap* WMCreateApplicationIconBlendedPixmap(WMScreen *scr, const RColor *color);
void WMSetApplicationIconWindow(WMScreen *scr, Window window);
void WMSetApplicationIconWindow(WMScreen *scr, WNativeWindow window);
/* ---[ WINGs/wevent.c ]-------------------------------------------------- */
@ -735,12 +735,12 @@ void WMRelayToNextResponder(WMView *view, WMEvent *event);
/* ---[ WINGs/selection.c ]----------------------------------------------- */
Bool WMCreateSelectionHandler(WMView *view, Atom selection, Time timestamp,
Bool WMCreateSelectionHandler(WMView *view, WMNativeAtom selection, Time timestamp,
WMSelectionProcs *procs, void *cdata);
void WMDeleteSelectionHandler(WMView *view, Atom selection, Time timestamp);
void WMDeleteSelectionHandler(WMView *view, WMNativeAtom selection, Time timestamp);
Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
Bool WMRequestSelection(WMView *view, WMNativeAtom selection, WMNativeAtom target,
Time timestamp, WMSelectionCallback *callback,
void *cdata);
@ -836,8 +836,8 @@ void WMReleasePixmap(WMPixmap *pixmap);
WMPixmap* WMCreatePixmap(WMScreen *scrPtr, int width, int height, int depth,
Bool masked);
WMPixmap* WMCreatePixmapFromXPixmaps(WMScreen *scrPtr, Pixmap pixmap,
Pixmap mask, int width, int height,
WMPixmap* WMCreatePixmapFromXPixmaps(WMScreen *scrPtr, WMNativePixmap pixmap,
WMNativePixmap mask, int width, int height,
int depth);
WMPixmap* WMCreatePixmapFromRImage(WMScreen *scrPtr, RImage *image,
@ -860,11 +860,11 @@ WMPixmap* WMCreateScaledBlendedPixmapFromFile(WMScreen *scrPtr, const char *file
unsigned int width,
unsigned int height);
void WMDrawPixmap(WMPixmap *pixmap, Drawable d, int x, int y);
void WMDrawPixmap(WMPixmap *pixmap, WMDrawable d, int x, int y);
Pixmap WMGetPixmapXID(WMPixmap *pixmap);
WMNativePixmap WMGetPixmapXID(WMPixmap *pixmap);
Pixmap WMGetPixmapMaskXID(WMPixmap *pixmap);
WMNativePixmap WMGetPixmapMaskXID(WMPixmap *pixmap);
WMPixmap* WMGetSystemPixmap(WMScreen *scr, int image);
@ -964,13 +964,13 @@ unsigned int WMWidgetWidth(WMWidget *w);
unsigned int WMWidgetHeight(WMWidget *w);
Window WMWidgetXID(WMWidget *w);
WNativeWindow WMWidgetXID(WMWidget *w);
void WMRedisplayWidget(WMWidget *w);
/* ---[ WINGs/wview.c ]--------------------------------------------------- */
Window WMViewXID(WMView *view);
WNativeWindow WMViewXID(WMView *view);
void WMSetViewNotifySizeChanges(WMView *view, Bool flag);

View File

@ -42,7 +42,7 @@ typedef enum WMEventType {
WME_MOTION,
WME_ENTER,
WME_LEAVE,
/* Window lifecycle */
/* WNativeWindow lifecycle */
WME_EXPOSE,
WME_CONFIGURE,
WME_CONFIGURE_REQUEST,

View File

@ -8,7 +8,7 @@
static Bool _WindowExists;
Atom W_OperationToAction(WMScreen * scr, WMDragOperationType operation)
WMNativeAtom W_OperationToAction(WMScreen * scr, WMDragOperationType operation)
{
switch (operation) {
case WDOperationNone:
@ -34,7 +34,7 @@ Atom W_OperationToAction(WMScreen * scr, WMDragOperationType operation)
}
}
WMDragOperationType W_ActionToOperation(WMScreen * scr, Atom action)
WMDragOperationType W_ActionToOperation(WMScreen * scr, WMNativeAtom action)
{
if (action == scr->xdndActionCopy) {
return WDOperationCopy;
@ -107,7 +107,7 @@ static int handleNoWindowXError(Display * dpy, XErrorEvent * errEvt)
return errEvt->error_code;
}
static Bool windowExists(Display * dpy, Window win)
static Bool windowExists(Display * dpy, WNativeWindow win)
{
void *previousErrorHandler;
XWindowAttributes attr;
@ -125,7 +125,7 @@ static Bool windowExists(Display * dpy, Window win)
}
Bool
W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
W_SendDnDClientMessage(Display * dpy, WNativeWindow win, WMNativeAtom message,
unsigned long data0,
unsigned long data1, unsigned long data2, unsigned long data3, unsigned long data4)
{
@ -178,7 +178,7 @@ void W_HandleDNDClientMessage(WMView * toplevel, XClientMessageEvent * event)
{
WMScreen *scr = W_VIEW_SCREEN(toplevel);
WMDraggingInfo *info = &scr->dragInfo;
Atom messageType = event->message_type;
WMNativeAtom messageType = event->message_type;
#ifdef XDND_DEBUG
{

View File

@ -59,10 +59,10 @@ static WMArray *createDropDataArray(WMArray * requiredTypes)
return WMCreateArray(0);
}
static WMArray *getTypesFromTypeList(WMScreen * scr, Window sourceWin)
static WMArray *getTypesFromTypeList(WMScreen * scr, WNativeWindow sourceWin)
{
Atom dataType;
Atom *typeAtomList;
WMNativeAtom dataType;
WMNativeAtom *typeAtomList;
WMArray *typeList;
int i, format;
unsigned long count, remaining;
@ -79,7 +79,7 @@ static WMArray *getTypesFromTypeList(WMScreen * scr, Window sourceWin)
}
typeList = createSourceTypeArray(count);
typeAtomList = (Atom *) data;
typeAtomList = (WMNativeAtom *) data;
for (i = 0; i < count; i++) {
WMAddToArray(typeList, XGetAtomName(scr->display, typeAtomList[i]));
}
@ -92,13 +92,13 @@ static WMArray *getTypesFromTypeList(WMScreen * scr, Window sourceWin)
static WMArray *getTypesFromThreeTypes(WMScreen * scr, XClientMessageEvent * event)
{
WMArray *typeList;
Atom atom;
WMNativeAtom atom;
int i;
typeList = createSourceTypeArray(3);
for (i = 2; i < 5; i++) {
if (event->data.l[i] != WM_NATIVE_NONE) {
atom = (Atom) event->data.l[i];
atom = (WMNativeAtom) event->data.l[i];
WMAddToArray(typeList, XGetAtomName(scr->display, atom));
}
}
@ -153,9 +153,9 @@ static char *getNextRequestedDataType(WMDraggingInfo * info)
/* ----- Action list ----- */
static WMArray *sourceOperationList(WMScreen * scr, Window sourceWin)
static WMArray *sourceOperationList(WMScreen * scr, WNativeWindow sourceWin)
{
Atom dataType, *actionList;
WMNativeAtom dataType, *actionList;
int i, size;
unsigned long count, remaining;
unsigned char *actionDatas = NULL;
@ -176,7 +176,7 @@ static WMArray *sourceOperationList(WMScreen * scr, Window sourceWin)
return NULL;
}
actionList = (Atom *) actionDatas;
actionList = (WMNativeAtom *) actionDatas;
XGetWindowProperty(scr->display, sourceWin, scr->xdndActionDescriptionAtom,
0, 0x8000000L, False, XA_STRING, &dataType, &size,
@ -217,7 +217,7 @@ static WMArray *sourceOperationList(WMScreen * scr, Window sourceWin)
/* ----- Dragging Info ----- */
static void updateSourceWindow(WMDraggingInfo * info, XClientMessageEvent * event)
{
XDND_SOURCE_WIN(info) = (Window) event->data.l[0];
XDND_SOURCE_WIN(info) = (WNativeWindow) event->data.l[0];
}
static WMView *findChildInView(WMView * parent, int x, int y)
@ -247,9 +247,9 @@ static WMView *findChildInView(WMView * parent, int x, int y)
static WMView *findDestinationViewInToplevel(WMView * toplevel, int x, int y)
{
WMScreen *scr = W_VIEW_SCREEN(toplevel);
Window toplevelWin = WMViewXID(toplevel);
WNativeWindow toplevelWin = WMViewXID(toplevel);
int xInToplevel, yInToplevel;
Window foo;
WNativeWindow foo;
XTranslateCoordinates(scr->display, scr->rootWin, toplevelWin, x, y, &xInToplevel, &yInToplevel, &foo);
return findChildInView(toplevel, xInToplevel, yInToplevel);
@ -358,7 +358,7 @@ void W_DragDestinationStorePositionMsgInfo(WMDraggingInfo * info, WMView * tople
/* send a DnD message to the source window */
static void
sendDnDClientMessage(WMDraggingInfo * info, Atom message,
sendDnDClientMessage(WMDraggingInfo * info, WMNativeAtom message,
unsigned long data1, unsigned long data2, unsigned long data3, unsigned long data4)
{
if (!W_SendDnDClientMessage(W_VIEW_SCREEN(XDND_AWARE_VIEW(info))->display,
@ -372,7 +372,7 @@ sendDnDClientMessage(WMDraggingInfo * info, Atom message,
/* send a xdndStatus message to the source, with position and size
of the destination if it has no subwidget (requesting a position message
on every move otherwise) */
static void sendStatusMessage(WMView * destView, WMDraggingInfo * info, Atom action)
static void sendStatusMessage(WMView * destView, WMDraggingInfo * info, WMNativeAtom action)
{
unsigned long data1;
@ -382,7 +382,7 @@ static void sendStatusMessage(WMView * destView, WMDraggingInfo * info, Atom act
WMScreen *scr = W_VIEW_SCREEN(destView);
int destX, destY;
WMSize destSize = WMGetViewSize(destView);
Window foo;
WNativeWindow foo;
XTranslateCoordinates(scr->display, WMViewXID(destView), scr->rootWin, 0, 0, &destX, &destY, &foo);
@ -399,7 +399,7 @@ static void sendStatusMessage(WMView * destView, WMDraggingInfo * info, Atom act
}
static void
storeDropData(WMView * destView, Atom selection, Atom target, Time timestamp, void *cdata, WMData * data)
storeDropData(WMView * destView, WMNativeAtom selection, WMNativeAtom target, Time timestamp, void *cdata, WMData * data)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
WMDraggingInfo *info = &(scr->dragInfo);
@ -502,7 +502,7 @@ static void finishDrop(WMView * destView, WMDraggingInfo * info)
W_DragDestinationInfoClear(info);
}
static Atom getAllowedAction(WMView * destView, WMDraggingInfo * info)
static WMNativeAtom getAllowedAction(WMView * destView, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
@ -551,7 +551,7 @@ static void *checkDropAllowed(WMView *destView, WMDraggingInfo *info)
static WMPoint *getDropLocationInView(WMView * view)
{
Window rootWin, childWin;
WNativeWindow rootWin, childWin;
int rootX, rootY;
unsigned int mask;
WMPoint *location;
@ -651,7 +651,7 @@ static const char *stateName(W_DndState * state)
static void *idleState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr;
Atom sourceMsg;
WMNativeAtom sourceMsg;
if (destView->dragDestinationProcs != NULL) {
scr = W_VIEW_SCREEN(destView);
@ -679,7 +679,7 @@ static void *idleState(WMView * destView, XClientMessageEvent * event, WMDraggin
static void *waitEnterState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
Atom sourceMsg = event->message_type;
WMNativeAtom sourceMsg = event->message_type;
if (sourceMsg == scr->xdndEnterAtom) {
W_DragDestinationStoreEnterMsgInfo(info, destView, event);
@ -693,7 +693,7 @@ static void *waitEnterState(WMView * destView, XClientMessageEvent * event, WMDr
static void *inspectDropDataState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr;
Atom sourceMsg;
WMNativeAtom sourceMsg;
scr = W_VIEW_SCREEN(destView);
sourceMsg = event->message_type;
@ -717,7 +717,7 @@ static void *inspectDropDataState(WMView * destView, XClientMessageEvent * event
static void *dropNotAllowedState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
Atom sourceMsg = event->message_type;
WMNativeAtom sourceMsg = event->message_type;
if (sourceMsg == scr->xdndDropAtom) {
finishDrop(destView, info);
@ -739,7 +739,7 @@ static void *dropNotAllowedState(WMView * destView, XClientMessageEvent * event,
static void *dropAllowedState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
Atom sourceMsg = event->message_type;
WMNativeAtom sourceMsg = event->message_type;
if (sourceMsg == scr->xdndDropAtom) {
if (XDND_DROP_DATAS(info) != NULL) {
@ -775,7 +775,7 @@ static void *dropAllowedState(WMView * destView, XClientMessageEvent * event, WM
static void *waitForDropDataState(WMView * destView, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(destView);
Atom sourceMsg = event->message_type;
WMNativeAtom sourceMsg = event->message_type;
if (sourceMsg == scr->xdndSelectionAtom) {
/* store next data */
@ -858,12 +858,12 @@ static void W_SetXdndAwareProperty(WMScreen *scr, WMView *view)
void WMRegisterViewForDraggedTypes(WMView * view, WMArray * acceptedTypes)
{
Atom *types;
WMNativeAtom *types;
int typeCount;
int i;
typeCount = WMGetArrayItemCount(acceptedTypes);
types = wmalloc(sizeof(Atom) * (typeCount + 1));
types = wmalloc(sizeof(WMNativeAtom) * (typeCount + 1));
for (i = 0; i < typeCount; i++) {
types[i] = XInternAtom(W_VIEW_SCREEN(view)->display, WMGetFromArray(acceptedTypes, i), False);

View File

@ -126,7 +126,7 @@ static void recolorCursor(WMDraggingInfo * info, Bool dropIsAllowed)
/* ----- end of drag cursor ----- */
/* ----- selection procs ----- */
static WMData *convertSelection(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
static WMData *convertSelection(WMView * view, WMNativeAtom selection, WMNativeAtom target, void *cdata, WMNativeAtom * type)
{
WMScreen *scr;
WMData *data;
@ -153,7 +153,7 @@ static WMData *convertSelection(WMView * view, Atom selection, Atom target, void
return data;
}
static void selectionLost(WMView * view, Atom selection, void *cdata)
static void selectionLost(WMView * view, WMNativeAtom selection, void *cdata)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) view;
@ -163,7 +163,7 @@ static void selectionLost(WMView * view, Atom selection, void *cdata)
wwarning(_("XDND selection lost during drag operation..."));
}
static void selectionDone(WMView * view, Atom selection, Atom target, void *cdata)
static void selectionDone(WMView * view, WMNativeAtom selection, WMNativeAtom target, void *cdata)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) view;
@ -180,9 +180,9 @@ static void selectionDone(WMView * view, Atom selection, Atom target, void *cdat
/* ----- visual part ----- */
static Window makeDragIcon(WMScreen * scr, WMPixmap * pixmap)
static WNativeWindow makeDragIcon(WMScreen * scr, WMPixmap * pixmap)
{
Window window;
WNativeWindow window;
WMSize size;
unsigned long flags;
XSetWindowAttributes attribs;
@ -211,7 +211,7 @@ static Window makeDragIcon(WMScreen * scr, WMPixmap * pixmap)
return window;
}
static void slideWindow(Display * dpy, Window win, int srcX, int srcY, int dstX, int dstY)
static void slideWindow(Display * dpy, WNativeWindow win, int srcX, int srcY, int dstX, int dstY)
{
double x, y, dx, dy;
int i;
@ -267,7 +267,7 @@ static void initDragImagePos(WMView * view, WMDraggingInfo * info, WMEvent * eve
WMSize iconSize = WMGetPixmapSize(view->dragImage);
WMSize viewSize = WMGetViewSize(view);
WMPoint viewPos;
Window foo;
WNativeWindow foo;
XTranslateCoordinates(W_VIEW_SCREEN(view)->display,
WMViewXID(view), W_VIEW_SCREEN(view)->rootWin,
@ -311,7 +311,7 @@ static void endDragImage(WMDraggingInfo * info, Bool slideBack)
if (slideBack) {
WMPoint toLocation;
Window foo;
WNativeWindow foo;
XTranslateCoordinates(W_VIEW_SCREEN(view)->display,
WMViewXID(view), W_VIEW_SCREEN(view)->rootWin,
@ -330,12 +330,12 @@ static void endDragImage(WMDraggingInfo * info, Bool slideBack)
/* send a DnD message to the destination window */
static Bool
sendDnDClientMessage(WMDraggingInfo * info, Atom message,
sendDnDClientMessage(WMDraggingInfo * info, WMNativeAtom message,
unsigned long data1, unsigned long data2, unsigned long data3, unsigned long data4)
{
Display *dpy = sourceScreen(info)->display;
Window srcWin = WMViewXID(XDND_SOURCE_VIEW(info));
Window destWin = XDND_DEST_WIN(info);
WNativeWindow srcWin = WMViewXID(XDND_SOURCE_VIEW(info));
WNativeWindow destWin = XDND_DEST_WIN(info);
if (!W_SendDnDClientMessage(dpy, destWin, message, srcWin, data1, data2, data3, data4)) {
/* drop failed */
@ -409,10 +409,10 @@ static Bool sendDropMessage(WMDraggingInfo * info)
/* ----- end of messages ----- */
static Atom *getTypeAtomList(WMScreen * scr, WMView * view, int *count)
static WMNativeAtom *getTypeAtomList(WMScreen * scr, WMView * view, int *count)
{
WMArray *types;
Atom *typeAtoms;
WMNativeAtom *typeAtoms;
int i;
types = view->dragSourceProcs->dropDataTypes(view);
@ -420,7 +420,7 @@ static Atom *getTypeAtomList(WMScreen * scr, WMView * view, int *count)
if (types != NULL) {
*count = WMGetArrayItemCount(types);
if (*count > 0) {
typeAtoms = wmalloc((*count) * sizeof(Atom));
typeAtoms = wmalloc((*count) * sizeof(WMNativeAtom));
for (i = 0; i < *count; i++) {
typeAtoms[i] = XInternAtom(scr->display, WMGetFromArray(types, i), False);
}
@ -433,7 +433,7 @@ static Atom *getTypeAtomList(WMScreen * scr, WMView * view, int *count)
}
*count = 1;
typeAtoms = wmalloc(sizeof(Atom));
typeAtoms = wmalloc(sizeof(WMNativeAtom));
*typeAtoms = WM_NATIVE_NONE;
return typeAtoms;
@ -441,7 +441,7 @@ static Atom *getTypeAtomList(WMScreen * scr, WMView * view, int *count)
static void registerDropTypes(WMScreen * scr, WMView * view, WMDraggingInfo * info)
{
Atom *typeList;
WMNativeAtom *typeList;
int i, count;
typeList = getTypeAtomList(scr, view, &count);
@ -462,12 +462,12 @@ static void registerDropTypes(WMScreen * scr, WMView * view, WMDraggingInfo * in
static void registerOperationList(WMScreen * scr, WMView * view, WMArray * operationArray)
{
Atom *actionList;
WMNativeAtom *actionList;
WMDragOperationType operation;
int count = WMGetArrayItemCount(operationArray);
int i;
actionList = wmalloc(sizeof(Atom) * count);
actionList = wmalloc(sizeof(WMNativeAtom) * count);
for (i = 0; i < count; i++) {
operation = WMGetDragOperationItemType(WMGetFromArray(operationArray, i));
@ -643,9 +643,9 @@ void WMSetViewDragSourceProcs(WMView * view, WMDragSourceProcs * procs)
view->dragSourceProcs->fetchDragData = defFetchDragData;
}
static Bool isXdndAware(WMScreen * scr, Window win)
static Bool isXdndAware(WMScreen * scr, WNativeWindow win)
{
Atom type;
WMNativeAtom type;
int format;
unsigned long count, remain;
unsigned char *winXdndVersion;
@ -666,10 +666,10 @@ static Bool isXdndAware(WMScreen * scr, Window win)
return (count == 1); /* xdnd version is set */
}
static Window *windowChildren(Display * dpy, Window win, unsigned *nchildren)
static WNativeWindow *windowChildren(Display * dpy, WNativeWindow win, unsigned *nchildren)
{
Window *children;
Window foo, bar;
WNativeWindow *children;
WNativeWindow foo, bar;
if (!XQueryTree(dpy, win, &foo, &bar, &children, nchildren)) {
*nchildren = 0;
@ -678,10 +678,10 @@ static Window *windowChildren(Display * dpy, Window win, unsigned *nchildren)
return children;
}
static Window lookForAwareWindow(WMScreen * scr, WMPoint * mousePos, Window win)
static WNativeWindow lookForAwareWindow(WMScreen * scr, WMPoint * mousePos, WNativeWindow win)
{
int tmpx, tmpy;
Window child;
WNativeWindow child;
/* Since xdnd v3, only the toplevel window should be aware */
if (isXdndAware(scr, win))
@ -698,11 +698,11 @@ static Window lookForAwareWindow(WMScreen * scr, WMPoint * mousePos, Window win)
return WM_NATIVE_NONE;
}
static Window findDestination(WMDraggingInfo * info, WMPoint * mousePos)
static WNativeWindow findDestination(WMDraggingInfo * info, WMPoint * mousePos)
{
WMScreen *scr = sourceScreen(info);
unsigned nchildren;
Window *children = windowChildren(scr->display, scr->rootWin, &nchildren);
WNativeWindow *children = windowChildren(scr->display, scr->rootWin, &nchildren);
int i;
XWindowAttributes attr;
@ -739,7 +739,7 @@ static Window findDestination(WMDraggingInfo * info, WMPoint * mousePos)
static void storeDestinationProtocolVersion(WMDraggingInfo * info)
{
Atom type;
WMNativeAtom type;
int format;
unsigned long count, remain;
unsigned char *winXdndVersion;
@ -787,7 +787,7 @@ static void initMotionProcess(WMView * view, WMDraggingInfo * info, WMEvent * ev
static void processMotion(WMDraggingInfo * info, WMPoint * mousePos)
{
Window newDestination = findDestination(info, mousePos);
WNativeWindow newDestination = findDestination(info, mousePos);
W_DragSourceStopTimer();
@ -958,7 +958,7 @@ static void traceStatusMsg(Display * dpy, XClientMessageEvent * statusEvent)
}
#endif
static void storeDropAction(WMDraggingInfo * info, Atom destAction)
static void storeDropAction(WMDraggingInfo * info, WMNativeAtom destAction)
{
WMView *sourceView = XDND_SOURCE_VIEW(info);
WMScreen *scr = W_VIEW_SCREEN(sourceView);
@ -1006,7 +1006,7 @@ static void storeStatusMessageInfos(WMDraggingInfo * info, XClientMessageEvent *
static void *idleState(WMView * view, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr;
Atom destMsg = event->message_type;
WMNativeAtom destMsg = event->message_type;
scr = W_VIEW_SCREEN(view);
@ -1035,7 +1035,7 @@ static void *idleState(WMView * view, XClientMessageEvent * event, WMDraggingInf
static void *dropAllowedState(WMView * view, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(view);
Atom destMsg = event->message_type;
WMNativeAtom destMsg = event->message_type;
if (destMsg == scr->xdndStatusAtom) {
storeStatusMessageInfos(info, event);
@ -1054,7 +1054,7 @@ static void *dropAllowedState(WMView * view, XClientMessageEvent * event, WMDrag
static void *finishDropState(WMView * view, XClientMessageEvent * event, WMDraggingInfo * info)
{
WMScreen *scr = W_VIEW_SCREEN(view);
Atom destMsg = event->message_type;
WMNativeAtom destMsg = event->message_type;
if (destMsg == scr->xdndFinishedAtom) {
endDragProcess(info, True);

View File

@ -1,5 +1,5 @@
/*
* Window Maker miscelaneous function library
* WNativeWindow Maker miscelaneous function library
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* WUtil / error.h
*
* Copyright (c) 2014 Window Maker Team
* Copyright (c) 2014 WNativeWindow Maker Team
*
* 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

View File

@ -1,5 +1,5 @@
/*
* Window Maker miscelaneous function library
* WNativeWindow Maker miscelaneous function library
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,5 +1,5 @@
/*
* Window Maker miscelaneous function library
* WNativeWindow Maker miscelaneous function library
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 2012 Christophe Curis
*

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 2012 Christophe Curis
*

View File

@ -1,7 +1,7 @@
/* WUtil / misc.c
*
* Copyright (c) 2001 Dan Pascu
* Copyright (c) 2014 Window Maker Team
* Copyright (c) 2014 WNativeWindow Maker Team
*
* 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

View File

@ -11,7 +11,7 @@ const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
typedef struct SelectionHandler {
WMView *view;
Atom selection;
WMNativeAtom selection;
Time timestamp;
WMSelectionProcs procs;
void *data;
@ -24,8 +24,8 @@ typedef struct SelectionHandler {
typedef struct SelectionCallback {
WMView *view;
Atom selection;
Atom target;
WMNativeAtom selection;
WMNativeAtom target;
Time timestamp;
WMSelectionCallback *callback;
void *data;
@ -42,7 +42,7 @@ static WMArray *selHandlers = NULL;
static Bool gotXError = False;
void WMDeleteSelectionHandler(WMView * view, Atom selection, Time timestamp)
void WMDeleteSelectionHandler(WMView * view, WMNativeAtom selection, Time timestamp)
{
SelectionHandler *handler;
WMArrayIterator iter;
@ -73,7 +73,7 @@ void WMDeleteSelectionHandler(WMView * view, Atom selection, Time timestamp)
vb->selection_release(view->screen->viewBackendCtx, view, selection);
}
static void WMDeleteSelectionCallback(WMView * view, Atom selection, Time timestamp)
static void WMDeleteSelectionCallback(WMView * view, WMNativeAtom selection, Time timestamp)
{
SelectionCallback *handler;
WMArrayIterator iter;
@ -106,7 +106,7 @@ static int handleXError(Display * dpy, XErrorEvent * ev)
return 1;
}
static Bool writeSelection(Display * dpy, Window requestor, Atom property, Atom type, WMData * data)
static Bool writeSelection(Display * dpy, WNativeWindow requestor, WMNativeAtom property, WMNativeAtom type, WMData * data)
{
static void *oldHandler;
int format, bpi;
@ -133,7 +133,7 @@ static Bool writeSelection(Display * dpy, Window requestor, Atom property, Atom
return !gotXError;
}
static void notifySelection(XEvent * event, Atom prop)
static void notifySelection(XEvent * event, WMNativeAtom prop)
{
XEvent ev;
@ -183,9 +183,9 @@ static void handleRequestEvent(XEvent * event)
if (handler->procs.convertSelection != NULL
&& handler->selection == event->xselectionrequest.selection) {
Atom atom;
WMNativeAtom atom;
WMData *data;
Atom prop;
WMNativeAtom prop;
/* they're requesting for something old.. maybe another handler
* can handle it */
@ -241,11 +241,11 @@ static void handleRequestEvent(XEvent * event)
WMFreeArray(copy);
}
static WMData *getSelectionData(Display * dpy, Window win, Atom where)
static WMData *getSelectionData(Display * dpy, WNativeWindow win, WMNativeAtom where)
{
WMData *wdata;
unsigned char *data;
Atom rtype;
WMNativeAtom rtype;
int bits, bpi;
unsigned long len, bytes;
@ -325,7 +325,7 @@ void W_HandleSelectionEvent(XEvent * event)
}
}
Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMSelectionProcs * procs, void *cdata)
Bool WMCreateSelectionHandler(WMView * view, WMNativeAtom selection, Time timestamp, WMSelectionProcs * procs, void *cdata)
{
SelectionHandler *handler;
const W_ViewBackend *vb = view->screen->viewBackend;
@ -356,7 +356,7 @@ Bool WMCreateSelectionHandler(WMView * view, Atom selection, Time timestamp, WMS
}
Bool
WMRequestSelection(WMView * view, Atom selection, Atom target, Time timestamp,
WMRequestSelection(WMView * view, WMNativeAtom selection, WMNativeAtom target, Time timestamp,
WMSelectionCallback * callback, void *cdata)
{
SelectionCallback *handler;

View File

@ -1,6 +1,6 @@
/* WUtil / userdefaults.h
*
* Copyright (c) 2014 Window Maker Team
* Copyright (c) 2014 WNativeWindow Maker Team
*
* 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

View File

@ -8,7 +8,7 @@
#include "GNUstep.h"
void WMSetApplicationIconWindow(WMScreen * scr, Window window)
void WMSetApplicationIconWindow(WMScreen * scr, WNativeWindow window)
{
scr->applicationIconWindow = window;
@ -106,7 +106,7 @@ void WMSetApplicationHasAppIcon(WMScreen * scr, Bool flag)
void W_InitApplication(WMScreen * scr)
{
Window leader;
WNativeWindow leader;
XClassHint *classHint;
XWMHints *hints;

View File

@ -21,7 +21,7 @@ typedef struct W_Balloon {
int delay;
Window forWindow; /* window for which the balloon
WNativeWindow forWindow; /* window for which the balloon
* is being show in the moment */
struct {
@ -237,7 +237,7 @@ void W_BalloonHandleEnterView(WMView * view)
#define SPACE 12
static void drawBalloon(WMScreen * scr, Pixmap bitmap, Pixmap pix, int x, int y, int w, int h, int side)
static void drawBalloon(WMScreen * scr, WMNativePixmap bitmap, WMNativePixmap pix, int x, int y, int w, int h, int side)
{
Display *dpy = scr->display;
WMColor *white = WMWhiteColor(scr);
@ -329,11 +329,11 @@ static void drawBalloon(WMScreen * scr, Pixmap bitmap, Pixmap pix, int x, int y,
WMReleaseColor(black);
}
static Pixmap makePixmap(WMScreen * scr, int width, int height, int side, Pixmap * mask)
static WMNativePixmap makePixmap(WMScreen * scr, int width, int height, int side, WMNativePixmap * mask)
{
Display *dpy = WMScreenDisplay(scr);
Pixmap bitmap;
Pixmap pixmap;
WMNativePixmap bitmap;
WMNativePixmap pixmap;
int x, y;
WMColor *black = WMBlackColor(scr);
@ -369,8 +369,8 @@ void W_BalloonShowText(void *bPtr_v, int x, int y, int w, int h, const char *tex
Display *dpy = WMScreenDisplay(scr);
int width;
int height;
Pixmap pixmap;
Pixmap mask;
WMNativePixmap pixmap;
WMNativePixmap mask;
WMFont *font = bPtr->font ? bPtr->font : scr->normalFont;
int textHeight;
int side = 0;

View File

@ -69,7 +69,7 @@ static void setupScroller(WMBrowser * bPtr);
static void scrollToColumn(WMBrowser * bPtr, int column, Bool updateScroller);
static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect);
static void paintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect);
static void loadColumn(WMBrowser * bPtr, int column);
@ -474,7 +474,7 @@ static void willResizeBrowser(W_ViewDelegate * self, WMView * view, unsigned int
}
}
static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void paintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
WMView *view = W_VIEW(lPtr);
W_Screen *scr = view->screen;

View File

@ -73,7 +73,7 @@ typedef struct WLClientCtx {
static WLClientCtx *g_wlclient_ctx = NULL;
/* Forward decl — defined in wview_wl.c */
extern void W_SetViewBacking(Window id, void *img);
extern void W_SetViewBacking(WNativeWindow id, void *img);
/* ------------------------------------------------------------------ */
/* wl_shm-backed buffer allocator */
@ -227,12 +227,12 @@ typedef struct WLClientToplevel {
#define WLC_TOPTABLE_SIZE 128
static struct {
Window id;
WNativeWindow id;
WLClientToplevel *top;
} wlc_toptable[WLC_TOPTABLE_SIZE];
static void
wlc_top_put(Window id, WLClientToplevel *top)
wlc_top_put(WNativeWindow id, WLClientToplevel *top)
{
unsigned idx = ((unsigned)id) % WLC_TOPTABLE_SIZE;
for (int i = 0; i < WLC_TOPTABLE_SIZE; i++) {
@ -246,7 +246,7 @@ wlc_top_put(Window id, WLClientToplevel *top)
}
static WLClientToplevel *
wlc_top_find(Window id)
wlc_top_find(WNativeWindow id)
{
unsigned idx = ((unsigned)id) % WLC_TOPTABLE_SIZE;
for (int i = 0; i < WLC_TOPTABLE_SIZE; i++) {
@ -258,7 +258,7 @@ wlc_top_find(Window id)
}
static void
wlc_top_remove(Window id)
wlc_top_remove(WNativeWindow id)
{
unsigned idx = ((unsigned)id) % WLC_TOPTABLE_SIZE;
for (int i = 0; i < WLC_TOPTABLE_SIZE; i++) {
@ -379,20 +379,20 @@ wl_client_toplevel_commit_locked(WLClientToplevel *top)
static void
wl_client_view_commit(unsigned long id)
{
WLClientToplevel *top = wlc_top_find((Window)id);
WLClientToplevel *top = wlc_top_find((WNativeWindow)id);
if (top) wl_client_toplevel_commit_locked(top);
}
static void
wl_client_view_destroy_backing(unsigned long id)
{
WLClientToplevel *top = wlc_top_find((Window)id);
WLClientToplevel *top = wlc_top_find((WNativeWindow)id);
if (!top) return;
if (top->xdg_toplevel) xdg_toplevel_destroy(top->xdg_toplevel);
if (top->xdg_surface) xdg_surface_destroy(top->xdg_surface);
if (top->surface) wl_surface_destroy(top->surface);
if (top->buf) wlclient_destroy_shm_buffer(top->buf);
wlc_top_remove((Window)id);
wlc_top_remove((WNativeWindow)id);
wfree(top);
}
@ -438,7 +438,7 @@ wl_client_toplevel_realize(struct W_View *view, int width, int height)
* view->window here using a deferred-association: the caller sets the
* window field first. Actually wview_wl.c assigns view->window BEFORE
* calling W_WLClientToplevelRealizeFn, so we can use it now. */
wlc_top_put((Window)view->window, top);
wlc_top_put((WNativeWindow)view->window, top);
return top->buf->image;
fail:
@ -453,7 +453,7 @@ fail:
static void
wl_client_toplevel_resize(struct W_View *view, int width, int height)
{
WLClientToplevel *top = wlc_top_find((Window)view->window);
WLClientToplevel *top = wlc_top_find((WNativeWindow)view->window);
if (!top) return;
if (top->buf && top->buf->width == width && top->buf->height == height)

View File

@ -50,7 +50,7 @@ const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNoti
* Bitmaps for magnifying glass cursor
*/
/* Cursor */
/* WMNativeCursor */
#define Cursor_x_hot 11
#define Cursor_y_hot 11
#define Cursor_width 32
@ -95,7 +95,7 @@ typedef struct MovingView {
WMView *view; /* The view this is all about */
XImage *image; /* What's under the view */
XImage *dirtyRect; /* Storage of overlapped image area */
Pixmap magPix; /* Magnified part of pixmap */
WMNativePixmap magPix; /* Magnified part of pixmap */
RColor color; /* Color of a pixel in the image */
int x, y; /* Position of view */
} MovingView;
@ -209,9 +209,9 @@ typedef struct W_ColorPanel {
/* Look-Up Tables and Images */
wheelMatrix *wheelMtrx;
Pixmap wheelImg;
Pixmap selectionImg;
Pixmap selectionBackImg;
WMNativePixmap wheelImg;
WMNativePixmap selectionImg;
WMNativePixmap selectionBackImg;
RImage *customPaletteImg;
char *lastBrowseDir;
@ -275,10 +275,10 @@ static void readXColors(W_ColorPanel * panel);
static void closeWindowCallback(WMWidget * w, void *data);
static Cursor magnifyGrabPointer(W_ColorPanel * panel);
static WMNativeCursor magnifyGrabPointer(W_ColorPanel * panel);
static WMPoint magnifyInitialize(W_ColorPanel * panel);
static Pixmap magnifyCreatePixmap(WMColorPanel * panel);
static WMNativePixmap magnifyCreatePixmap(WMColorPanel * panel);
static void magnifyGetImageStored(W_ColorPanel * panel, int x1, int y1, int x2, int y2);
static XImage *magnifyGetImage(WMScreen * scr, XImage * image, int x, int y, int w, int h);
@ -331,7 +331,7 @@ static void customPaletteMenuNewFromFile(W_ColorPanel * panel);
static void customPaletteMenuRename(W_ColorPanel * panel);
static void customPaletteMenuRemove(W_ColorPanel * panel);
static void colorListPaintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect);
static void colorListPaintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect);
static void colorListSelect(WMWidget * w, void *data);
static void colorListColorMenuCallback(WMWidget * w, void *data);
static void colorListListMenuCallback(WMWidget * w, void *data);
@ -1056,7 +1056,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
WMMapSubwidgets(panel->customPaletteContentFrm);
WMMapSubwidgets(panel->colorListFrm);
/* Pixmap to indicate selection positions
/* WMNativePixmap to indicate selection positions
* wheelframe MUST be mapped.
*/
const W_RenderBackend *R = scrPtr->renderBackend;
@ -1361,7 +1361,7 @@ static void modeButtonCallback(WMWidget * w, void *data)
WMSetColorPanelPickerMode(panel, WMHSBModeColorPanel);
}
/****************** Magnifying Cursor Functions *******************/
/****************** Magnifying WMNativeCursor Functions *******************/
static XImage *magnifyGetImage(WMScreen * scr, XImage * image, int x, int y, int w, int h)
{
@ -1531,12 +1531,12 @@ static void magnifyGetImageStored(WMColorPanel * panel, int x1, int y1, int x2,
return;
}
static Pixmap magnifyCreatePixmap(WMColorPanel * panel)
static WMNativePixmap magnifyCreatePixmap(WMColorPanel * panel)
{
W_Screen *scr = WMWidgetScreen(panel->win);
int u, v;
#ifndef USE_XSHAPE
Pixmap pixmap;
WMNativePixmap pixmap;
#endif
unsigned long color;
@ -1614,15 +1614,15 @@ static WMView *magnifyCreateView(W_ColorPanel * panel)
return magView;
}
static Cursor magnifyGrabPointer(W_ColorPanel * panel)
static WMNativeCursor magnifyGrabPointer(W_ColorPanel * panel)
{
W_Screen *scr = WMWidgetScreen(panel->win);
Pixmap magPixmap, magPixmap2;
Cursor magCursor;
WMNativePixmap magPixmap, magPixmap2;
WMNativeCursor magCursor;
XColor fgColor = { 0, 0, 0, 0, DoRed | DoGreen | DoBlue, 0 };
XColor bgColor = { 0, 0xbf00, 0xa000, 0x5000, DoRed | DoGreen | DoBlue, 0 };
/* Cursor creation stuff */
/* WMNativeCursor creation stuff */
magPixmap = XCreatePixmapFromBitmapData(scr->display, W_DRAWABLE(scr),
(char *)Cursor_bits, Cursor_width, Cursor_height, 1, 0, 1);
magPixmap2 = XCreatePixmapFromBitmapData(scr->display, W_DRAWABLE(scr),
@ -1649,9 +1649,9 @@ static WMPoint magnifyInitialize(W_ColorPanel * panel)
W_Screen *scr = WMWidgetScreen(panel->win);
int x, y, u, v;
unsigned int mask;
Pixmap pixmap, clip_mask;
WMNativePixmap pixmap, clip_mask;
WMPoint point;
Window root_return, child_return;
WNativeWindow root_return, child_return;
clip_mask = XCreatePixmapFromBitmapData(scr->display, W_DRAWABLE(scr),
(char *)Cursor_mask_bits, Cursor_mask_width, Cursor_mask_height,
@ -1698,8 +1698,8 @@ void W_ColorPanelMagnify(WMWidget * w, void *data)
W_ColorPanel *panel = (W_ColorPanel *) (data);
W_Screen *scr = WMWidgetScreen(panel->win);
Cursor magCursor;
Pixmap pixmap;
WMNativeCursor magCursor;
WMNativePixmap pixmap;
WMEvent event;
XEvent rawEvent;
WMPoint initialPosition;
@ -2843,7 +2843,7 @@ static void customSetPalette(W_ColorPanel * panel)
{
W_Screen *scr = WMWidgetScreen(panel->win);
RImage *scaledImg;
Pixmap image;
WMNativePixmap image;
image = scr->renderBackend->pixmap_create(scr->renderBackendCtx, customPaletteWidth, customPaletteHeight, scr->depth);
scaledImg = RScaleImage(panel->customPaletteImg, customPaletteWidth, customPaletteHeight);
@ -3263,7 +3263,7 @@ static void customPaletteHistoryCallback(WMWidget * w, void *data)
/************************* ColorList Panel Functions **********************/
static void colorListPaintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void colorListPaintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
WMScreen *scr = WMWidgetScreen(lPtr);
WMView *view = W_VIEW(lPtr);

View File

@ -306,7 +306,7 @@ static WMPixmap *makeDragPixmap(WMColorWell * cPtr)
R->draw_rect(rctx, pix, scr->black, 0, 0, 15, 15);
return WMCreatePixmapFromXPixmaps(scr, (Pixmap)pix, WM_NATIVE_NONE, 16, 16, scr->depth);
return WMCreatePixmapFromXPixmaps(scr, (WMNativePixmap)pix, WM_NATIVE_NONE, 16, 16, scr->depth);
}
static void handleDragEvents(WMEvent * event, void *data)

View File

@ -197,8 +197,8 @@ int WMHandleEvent(WMEvent * event)
/* Look up the WINGs view for this event via the view backend. */
view = (W_View *)event->_view_target;
if (!view) {
extern W_View *W_GetViewForWindow(Window id);
view = W_GetViewForWindow((Window)window);
extern W_View *W_GetViewForWindow(WNativeWindow id);
view = W_GetViewForWindow((WNativeWindow)window);
}
if (!view) {
if (extraEventHandler)
@ -274,7 +274,7 @@ int WMHandleEvent(WMEvent * event)
view->screen->ignoreNextDoubleClick = 0;
} else {
if (event->type == WME_BUTTON_PRESS) {
view->screen->lastClickWindow = (Window)event->u.button.window;
view->screen->lastClickWindow = (WNativeWindow)event->u.button.window;
view->screen->lastClickTime = event->u.button.time;
}
}
@ -302,7 +302,7 @@ int WMIsDoubleClick(WMEvent * event)
if (!view)
return False;
if (view->screen->lastClickWindow != (Window)event->u.button.window)
if (view->screen->lastClickWindow != (WNativeWindow)event->u.button.window)
return False;
if (event->u.button.time - view->screen->lastClickTime < WINGsConfiguration.doubleClickDelay) {

View File

@ -360,7 +360,7 @@ static int userWidgetCount = 0;
/***** end data ******/
static void renderPixmap(W_Screen * screen, Pixmap d, Pixmap mask, char **data, int width, int height)
static void renderPixmap(W_Screen * screen, WMNativePixmap d, WMNativePixmap mask, char **data, int width, int height)
{
int x, y;
GC whiteGC = WMColorGC(screen->white);
@ -653,7 +653,7 @@ void W_X11PlatformInit(W_Screen *scrPtr)
{
Display *display = scrPtr->display;
XGCValues gcv;
Pixmap stipple;
WMNativePixmap stipple;
int i;
static char *atomNames[] = {
"_GNUSTEP_WM_ATTR",
@ -683,11 +683,11 @@ void W_X11PlatformInit(W_Screen *scrPtr)
"_NET_WM_ICON_NAME",
"_NET_WM_ICON",
};
Atom atoms[wlengthof(atomNames)];
WMNativeAtom atoms[wlengthof(atomNames)];
/* Create missing CUT_BUFFERs */
{
Atom *rootWinProps;
WMNativeAtom *rootWinProps;
int exists[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
int count;
@ -780,7 +780,7 @@ void W_X11PlatformInit(W_Screen *scrPtr)
scrPtr->textCursor = XCreateFontCursor(display, XC_xterm);
{
XColor bla;
Pixmap blank;
WMNativePixmap blank;
blank = XCreatePixmap(display, scrPtr->stipple, 1, 1, 1);
XSetForeground(display, scrPtr->monoGC, 0);
XFillRectangle(display, blank, scrPtr->monoGC, 0, 0, 1, 1);
@ -1105,7 +1105,7 @@ unsigned int WMWidgetHeight(WMWidget * w)
return W_VIEW(w)->size.height;
}
Window WMWidgetXID(WMWidget * w)
WNativeWindow WMWidgetXID(WMWidget * w)
{
return W_VIEW(w)->window;
}

View File

@ -200,7 +200,7 @@ void W_SetPreeditPositon(W_View * view, int x, int y)
}
}
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int buflen, KeySym *keysym, Status *status)
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int buflen, WMNativeKeysym *keysym, Status *status)
{
WMScreen *scr = W_VIEW_SCREEN(view);
@ -217,13 +217,13 @@ int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int bufl
* Map a keycode to the corresponding keysym
* To replace the deprecated X11 function XKeycodeToKeysym
*/
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
WMNativeKeysym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
{
static int min_kc = -1;
static int max_kc;
int num_syms;
KeySym *key_syms;
KeySym ks;
WMNativeKeysym *key_syms;
WMNativeKeysym ks;
XDisplayKeycodes(display, &min_kc, &max_kc);
if (keycode < min_kc || keycode > max_kc || index < 0) {

View File

@ -30,7 +30,7 @@ typedef struct W_List {
WMScroller *vScroller;
Pixmap doubleBuffer;
WMNativePixmap doubleBuffer;
struct {
unsigned int allowMultipleSelection:1;
@ -87,7 +87,7 @@ static void updateDoubleBufferPixmap(WMList * lPtr)
if (lPtr->doubleBuffer)
scr->renderBackend->pixmap_free(scr->renderBackendCtx, (WMDrawable)lPtr->doubleBuffer);
lPtr->doubleBuffer =
(Pixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx, view->size.width, lPtr->itemHeight, scr->depth);
(WMNativePixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx, view->size.width, lPtr->itemHeight, scr->depth);
}
static void realizeObserver(void *self, WMNotification * not)
@ -475,7 +475,7 @@ static void paintItem(List * lPtr, int index)
flags |= WLDSIsBranch;
if (lPtr->draw)
(*lPtr->draw) (lPtr, index, (Drawable)d, itemPtr->text, flags, &rect);
(*lPtr->draw) (lPtr, index, (WMDrawable)d, itemPtr->text, flags, &rect);
R->pixmap_copy(rctx, d, (WMDrawable)view->window, 0, 0, width, height, x, y);
} else {
@ -483,7 +483,7 @@ static void paintItem(List * lPtr, int index)
R->fill_rect(rctx, d, back, 0, 0, width, height);
W_PaintText(view, (Drawable)d, scr->normalFont, 4, 0, width, WALeft, scr->black, False, itemPtr->text, tlen);
W_PaintText(view, (WMDrawable)d, scr->normalFont, 4, 0, width, WALeft, scr->black, False, itemPtr->text, tlen);
R->pixmap_copy(rctx, d, (WMDrawable)view->window, 0, 0, width, height, x, y);
}

View File

@ -166,7 +166,7 @@ int W_GetTextHeight(WMFont * font, const char *text, int width, int wrap)
}
void
W_PaintText(W_View * view, Drawable d, WMFont * font, int x, int y,
W_PaintText(W_View * view, WMDrawable d, WMFont * font, int x, int y,
int width, WMAlignment alignment, WMColor * color, int wrap,
const char *text, int length)
{

View File

@ -38,9 +38,9 @@ WMPixmap *WMCreatePixmap(WMScreen * scrPtr, int width, int height, int depth, Bo
pixPtr->depth = depth;
pixPtr->refCount = 1;
pixPtr->pixmap = (Pixmap)scrPtr->renderBackend->pixmap_create(scrPtr->renderBackendCtx, width, height, depth);
pixPtr->pixmap = (WMNativePixmap)scrPtr->renderBackend->pixmap_create(scrPtr->renderBackendCtx, width, height, depth);
if (masked) {
pixPtr->mask = (Pixmap)scrPtr->renderBackend->pixmap_create(scrPtr->renderBackendCtx, width, height, 1);
pixPtr->mask = (WMNativePixmap)scrPtr->renderBackend->pixmap_create(scrPtr->renderBackendCtx, width, height, 1);
} else {
pixPtr->mask = WM_NATIVE_NONE;
}
@ -48,7 +48,7 @@ WMPixmap *WMCreatePixmap(WMScreen * scrPtr, int width, int height, int depth, Bo
return pixPtr;
}
WMPixmap *WMCreatePixmapFromXPixmaps(WMScreen * scrPtr, Pixmap pixmap, Pixmap mask,
WMPixmap *WMCreatePixmapFromXPixmaps(WMScreen * scrPtr, WMNativePixmap pixmap, WMNativePixmap mask,
int width, int height, int depth)
{
WMPixmap *pixPtr;
@ -84,7 +84,7 @@ WMPixmap *WMCreatePixmapFromFile(WMScreen * scrPtr, const char *fileName)
WMPixmap *WMCreatePixmapFromRImage(WMScreen * scrPtr, RImage * image, int threshold)
{
WMPixmap *pixPtr;
Pixmap pixmap, mask;
WMNativePixmap pixmap, mask;
if (image == NULL)
return NULL;
@ -180,14 +180,14 @@ WMPixmap *WMCreatePixmapFromXPMData(WMScreen * scrPtr, char **data)
return pixPtr;
}
Pixmap WMGetPixmapXID(WMPixmap * pixmap)
WMNativePixmap WMGetPixmapXID(WMPixmap * pixmap)
{
wassertrv(pixmap != NULL, WM_NATIVE_NONE);
return pixmap->pixmap;
}
Pixmap WMGetPixmapMaskXID(WMPixmap * pixmap)
WMNativePixmap WMGetPixmapMaskXID(WMPixmap * pixmap)
{
wassertrv(pixmap != NULL, WM_NATIVE_NONE);
@ -250,7 +250,7 @@ WMPixmap *WMGetSystemPixmap(WMScreen * scr, int image)
}
}
void WMDrawPixmap(WMPixmap * pixmap, Drawable d, int x, int y)
void WMDrawPixmap(WMPixmap * pixmap, WMDrawable d, int x, int y)
{
WMScreen *scr = pixmap->screen;

View File

@ -278,7 +278,7 @@ static void paintPopUpButton(PopUpButton * bPtr)
W_DrawRelief(scr, pixmap, 0, 0, bPtr->view->size.width, bPtr->view->size.height, WRRaised);
if (caption) {
W_PaintText(bPtr->view, (Drawable)pixmap, scr->normalFont, 6,
W_PaintText(bPtr->view, (WMDrawable)pixmap, scr->normalFont, 6,
(bPtr->view->size.height - WMFontHeight(scr->normalFont)) / 2,
bPtr->view->size.width, WALeft,
bPtr->flags.enabled ? scr->black : scr->darkGray, False, caption, strlen(caption));
@ -365,7 +365,7 @@ static void paintMenuEntry(PopUpButton * bPtr, int index, int highlight)
}
}
static Pixmap makeMenuPixmap(PopUpButton * bPtr)
static WMNativePixmap makeMenuPixmap(PopUpButton * bPtr)
{
W_Screen *scr = bPtr->view->screen;
const W_RenderBackend *R = scr->renderBackend;
@ -399,7 +399,7 @@ static Pixmap makeMenuPixmap(PopUpButton * bPtr)
else
color = scr->black;
W_PaintText(bPtr->menuView, (Drawable)pixmap, scr->normalFont, 6,
W_PaintText(bPtr->menuView, (WMDrawable)pixmap, scr->normalFont, 6,
i * itemHeight + yo, width, WALeft, color, False, text, strlen(text));
if (!bPtr->flags.pullsDown && i == bPtr->selectedItemIndex) {
@ -412,7 +412,7 @@ static Pixmap makeMenuPixmap(PopUpButton * bPtr)
i++;
}
return (Pixmap)pixmap;
return (WMNativePixmap)pixmap;
}
static void resizeMenu(PopUpButton * bPtr)
@ -427,7 +427,7 @@ static void resizeMenu(PopUpButton * bPtr)
static void popUpMenu(PopUpButton * bPtr)
{
W_Screen *scr = bPtr->view->screen;
Window dummyW;
WNativeWindow dummyW;
int x, y;
if (!bPtr->flags.enabled)

View File

@ -237,8 +237,8 @@ render_wl_fill_arc(void *rctx, WMDrawable d, WMColor *color,
}
}
static Pixmap
render_wl_create_disabled_mask(void *rctx, Pixmap src_mask,
static WMNativePixmap
render_wl_create_disabled_mask(void *rctx, WMNativePixmap src_mask,
unsigned int width, unsigned int height)
{
(void)rctx;
@ -259,7 +259,7 @@ render_wl_create_disabled_mask(void *rctx, Pixmap src_mask,
}
}
return (Pixmap)(uintptr_t)mask;
return (WMNativePixmap)(uintptr_t)mask;
}
const W_RenderBackend W_RenderBackendWL = {

View File

@ -41,7 +41,7 @@ typedef struct W_Ruler {
int motion; /* the position of the _moving_ marker(s) */
int end; /* the last tick on the baseline (restrict markers to it) */
Pixmap drawBuffer;
WMNativePixmap drawBuffer;
struct {
unsigned int whichMarker:3;
@ -143,7 +143,7 @@ static void createDrawBuffer(Ruler * rPtr)
if (rPtr->drawBuffer)
scr->renderBackend->pixmap_free(scr->renderBackendCtx, (WMDrawable)rPtr->drawBuffer);
rPtr->drawBuffer = (Pixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx,
rPtr->drawBuffer = (WMNativePixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx,
rPtr->view->size.width, 40, scr->depth);
scr->renderBackend->fill_rect(scr->renderBackendCtx, (WMDrawable)rPtr->drawBuffer,
scr->gray, 0, 0, rPtr->view->size.width, 40);
@ -389,7 +389,7 @@ WMRuler *WMCreateRuler(WMWidget * parent)
rPtr->view->self = rPtr;
rPtr->drawBuffer = (Pixmap) NULL;
rPtr->drawBuffer = (WMNativePixmap) NULL;
W_ResizeView(rPtr->view, w, 40);

View File

@ -12,7 +12,7 @@ typedef struct W_Slider {
int value;
Pixmap knobPixmap;
WMNativePixmap knobPixmap;
WMPixmap *backPixmap;
WMAction *action;
@ -251,7 +251,7 @@ static void makeKnobPixmap(Slider * sPtr)
if (sPtr->knobPixmap)
R->pixmap_free(rctx, (WMDrawable)sPtr->knobPixmap);
sPtr->knobPixmap = (Pixmap)pix;
sPtr->knobPixmap = (WMNativePixmap)pix;
}
static void didResizeSlider(W_ViewDelegate * self, WMView * view)

View File

@ -63,7 +63,7 @@ static void paintTabView(TabView * tPtr);
static void W_SetTabViewItemParent(WMTabViewItem * item, WMTabView * parent);
static void W_DrawLabel(WMTabViewItem * item, Drawable d, WMRect rect, Bool enabled);
static void W_DrawLabel(WMTabViewItem * item, WMDrawable d, WMRect rect, Bool enabled);
static void W_UnmapTabViewItem(WMTabViewItem * item);
@ -668,7 +668,7 @@ static void paintTabView(TabView * tPtr)
rect.pos.y = ty;
rect.size.width = W_TabViewItemTabWidth(tPtr->items[first + i]);
rect.size.height = theight;
W_DrawLabel(tPtr->items[first + i], (Drawable)buffer, rect,
W_DrawLabel(tPtr->items[first + i], (WMDrawable)buffer, rect,
tPtr->flags.enabled && tPtr->items[first + i]->flags.enabled);
}
@ -765,7 +765,7 @@ static void W_SetTabViewItemParent(WMTabViewItem * item, WMTabView * parent)
item->tabView = parent;
}
static void W_DrawLabel(WMTabViewItem * item, Drawable d, WMRect rect, Bool enabled)
static void W_DrawLabel(WMTabViewItem * item, WMDrawable d, WMRect rect, Bool enabled)
{
WMScreen *scr = W_VIEW(item->tabView)->screen;

View File

@ -105,7 +105,7 @@ typedef struct W_Text {
WMColor *bgColor; /* The background color */
GC stippledGC; /* the GC to overlay selected graphics with */
Pixmap db; /* the buffer on which to draw */
WMNativePixmap db; /* the buffer on which to draw */
WMPixmap *bgPixmap; /* the background pixmap */
myRect visible; /* the actual rectangle that can be drawn into */
@ -219,9 +219,9 @@ static char *default_bullet[] = {
};
/* These id are used when sharing the selected text between applications */
static Atom XA_Targets = WM_NATIVE_NONE;
static Atom XA_Format_Text = WM_NATIVE_NONE;
static Atom XA_Format_Compound_Text = WM_NATIVE_NONE;
static WMNativeAtom XA_Targets = WM_NATIVE_NONE;
static WMNativeAtom XA_Format_Text = WM_NATIVE_NONE;
static WMNativeAtom XA_Format_Compound_Text = WM_NATIVE_NONE;
static void handleEvents(WMEvent * event, void *data);
static void layOutDocument(Text * tPtr);
@ -629,7 +629,7 @@ static void paintText(Text * tPtr)
WMScreen *scr = tPtr->view->screen;
const W_RenderBackend *R = scr->renderBackend;
void *rctx = scr->renderBackendCtx;
Window win = tPtr->view->window;
WNativeWindow win = tPtr->view->window;
WMColor *color;
if (!tPtr->view->flags.realized || !tPtr->db || tPtr->flags.frozen)
@ -1731,7 +1731,7 @@ static void textDidResize(W_ViewDelegate * self, WMView * view)
if (tPtr->db) {
scr->renderBackend->pixmap_free(scr->renderBackendCtx, (WMDrawable)tPtr->db);
tPtr->db = (Pixmap) NULL;
tPtr->db = (WMNativePixmap) NULL;
}
if (tPtr->visible.w < 40)
@ -1740,7 +1740,7 @@ static void textDidResize(W_ViewDelegate * self, WMView * view)
tPtr->visible.h = 20;
if (!tPtr->db) {
tPtr->db = (Pixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx,
tPtr->db = (WMNativePixmap)scr->renderBackend->pixmap_create(scr->renderBackendCtx,
tPtr->visible.w, tPtr->visible.h, scr->depth);
}
}
@ -1780,7 +1780,7 @@ static void clearText(Text * tPtr)
/* possibly remove a single character from the currentTextBlock,
or if there's a selection, remove it...
note that Delete and Backspace are treated differently */
static void deleteTextInteractively(Text * tPtr, KeySym ksym)
static void deleteTextInteractively(Text * tPtr, WMNativeKeysym ksym)
{
TextBlock *tb;
Bool back = (Bool) (ksym == XK_BackSpace);
@ -2043,7 +2043,7 @@ static void releaseSelection(Text * tPtr)
paintText(tPtr);
}
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
static WMData *requestHandler(WMView * view, WMNativeAtom selection, WMNativeAtom target, void *cdata, WMNativeAtom * type)
{
Text *tPtr = view->self;
WMData *data = NULL;
@ -2066,7 +2066,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
printf("didn't get it\n");
if (target == XA_Targets) {
Atom array[4];
WMNativeAtom array[4];
array[0] = XA_Targets;
array[1] = XA_STRING;
@ -2083,7 +2083,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
return NULL;
}
static void lostHandler(WMView * view, Atom selection, void *cdata)
static void lostHandler(WMView * view, WMNativeAtom selection, void *cdata)
{
/* Parameter not used, but tell the compiler that it is ok */
(void) selection;
@ -2204,7 +2204,7 @@ static void fontChanged(void *observerData, WMNotification * notification)
static void handleTextKeyPress(Text * tPtr, WMEvent * event)
{
char buffer[64];
KeySym ksym;
WMNativeKeysym ksym;
int control_pressed = False;
TextBlock *tb = NULL;
@ -2339,7 +2339,7 @@ static void handleTextKeyPress(Text * tPtr, WMEvent * event)
}
}
static void pasteText(WMView * view, Atom selection, Atom target, Time timestamp, void *cdata, WMData * data)
static void pasteText(WMView * view, WMNativeAtom selection, WMNativeAtom target, Time timestamp, void *cdata, WMData * data)
{
Text *tPtr = (Text *) view->self;
char *text;
@ -2388,7 +2388,7 @@ static void pasteText(WMView * view, Atom selection, Atom target, Time timestamp
static void handleActionEvents(WMEvent * event, void *data)
{
Text *tPtr = (Text *) data;
KeySym ksym;
WMNativeKeysym ksym;
switch (event->type) {
case WME_KEY_PRESS:
@ -3060,7 +3060,7 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
tPtr->docWidth = 0;
tPtr->docHeight = 0;
tPtr->dBulletPix = WMCreatePixmapFromXPMData(tPtr->view->screen, default_bullet);
tPtr->db = (Pixmap) NULL;
tPtr->db = (WMNativePixmap) NULL;
tPtr->bgPixmap = NULL;
tPtr->margins = WMGetRulerMargins(NULL);

View File

@ -106,9 +106,9 @@ struct W_ViewDelegate _TextFieldViewDelegate = {
NULL
};
static void lostSelection(WMView * view, Atom selection, void *cdata);
static void lostSelection(WMView * view, WMNativeAtom selection, void *cdata);
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type);
static WMData *requestHandler(WMView * view, WMNativeAtom selection, WMNativeAtom target, void *cdata, WMNativeAtom * type);
static WMSelectionProcs selectionHandler = {
requestHandler,
@ -234,14 +234,14 @@ static void decrToFit(TextField * tPtr)
#undef TEXT_WIDTH
#undef TEXT_WIDTH2
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
static WMData *requestHandler(WMView * view, WMNativeAtom selection, WMNativeAtom target, void *cdata, WMNativeAtom * type)
{
TextField *tPtr = view->self;
int count;
Display *dpy = tPtr->view->screen->display;
Atom _TARGETS;
Atom TEXT = XInternAtom(dpy, "TEXT", False);
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMNativeAtom _TARGETS;
WMNativeAtom TEXT = XInternAtom(dpy, "TEXT", False);
WMNativeAtom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
WMData *data;
/* Parameter not used, but tell the compiler that it is ok */
@ -262,7 +262,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
_TARGETS = XInternAtom(dpy, "TARGETS", False);
if (target == _TARGETS) {
Atom supported_type[4];
WMNativeAtom supported_type[4];
supported_type[0] = _TARGETS;
supported_type[1] = XA_STRING;
@ -280,7 +280,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
}
static void lostSelection(WMView * view, Atom selection, void *cdata)
static void lostSelection(WMView * view, WMNativeAtom selection, void *cdata)
{
TextField *tPtr = (WMTextField *) view->self;
@ -797,7 +797,7 @@ static void paintTextField(TextField * tPtr)
/* this is quite dirty */
viewbuffer.screen = view->screen;
viewbuffer.size = view->size;
viewbuffer.window = (Window)drawbuffer;
viewbuffer.window = (WNativeWindow)drawbuffer;
if (tPtr->textLen > 0) {
tw = WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]), tPtr->textLen - tPtr->viewPosition);
@ -939,7 +939,7 @@ static void handleEvents(WMEvent * event, void *data)
static void handleTextFieldKeyPress(TextField * tPtr, WMEvent * event)
{
char buffer[64];
KeySym ksym;
WMNativeKeysym ksym;
const char *textEvent = NULL;
void *data = NULL;
int count, refresh = 0;
@ -1327,7 +1327,7 @@ static int pointToCursorPosition(TextField * tPtr, int x)
return b;
}
static void pasteText(WMView * view, Atom selection, Atom target, Time timestamp, void *cdata, WMData * data)
static void pasteText(WMView * view, WMNativeAtom selection, WMNativeAtom target, Time timestamp, void *cdata, WMData * data)
{
TextField *tPtr = (TextField *) view->self;
char *str;

View File

@ -467,12 +467,12 @@ void W_SetViewBackgroundPixmap(W_View *view, WMPixmap *pix)
WMReleasePixmap(view->backImage);
view->backImage = WMRetainPixmap(pix);
/* Pixmap background is X11-specific; Wayland uses pixman rendering.
/* WMNativePixmap background is X11-specific; Wayland uses pixman rendering.
* The backend's set_background_color handles the realized case for X11.
* For Wayland this is a no-op at the view level. */
}
void W_SetViewCursor(W_View * view, Cursor cursor)
void W_SetViewCursor(W_View * view, WMNativeCursor cursor)
{
view->cursor = cursor;
if (W_VIEW_REALIZED(view)) {
@ -588,7 +588,7 @@ void WMSetViewNotifySizeChanges(WMView * view, Bool flag)
view->flags.notifySizeChanged = ((flag == 0) ? 0 : 1);
}
Window WMViewXID(WMView * view)
WNativeWindow WMViewXID(WMView * view)
{
return view->window;
}

View File

@ -24,9 +24,9 @@ extern void wl_view_destroy_backing_impl(unsigned long id);
/* Simple view lookup table (ID → W_View*) */
#define VIEW_TABLE_SIZE 256
static struct { Window id; W_View *view; void *backing; } view_table[VIEW_TABLE_SIZE];
static struct { WNativeWindow id; W_View *view; void *backing; } view_table[VIEW_TABLE_SIZE];
static void view_table_put(Window id, W_View *view)
static void view_table_put(WNativeWindow id, W_View *view)
{
unsigned idx = ((unsigned)id) % VIEW_TABLE_SIZE;
for (int i = 0; i < VIEW_TABLE_SIZE; i++) {
@ -39,7 +39,7 @@ static void view_table_put(Window id, W_View *view)
}
}
W_View *W_GetViewForWindow(Window id)
W_View *W_GetViewForWindow(WNativeWindow id)
{
unsigned idx = ((unsigned)id) % VIEW_TABLE_SIZE;
for (int i = 0; i < VIEW_TABLE_SIZE; i++) {
@ -55,7 +55,7 @@ W_View *W_GetViewForWindow(Window id)
}
/* Get/set backing pixman image for a view ID */
void *W_GetViewBacking(Window id)
void *W_GetViewBacking(WNativeWindow id)
{
unsigned idx = ((unsigned)id) % VIEW_TABLE_SIZE;
for (int i = 0; i < VIEW_TABLE_SIZE; i++) {
@ -68,7 +68,7 @@ void *W_GetViewBacking(Window id)
return NULL;
}
void W_SetViewBacking(Window id, void *img)
void W_SetViewBacking(WNativeWindow id, void *img)
{
unsigned idx = ((unsigned)id) % VIEW_TABLE_SIZE;
for (int i = 0; i < VIEW_TABLE_SIZE; i++) {
@ -82,7 +82,7 @@ void W_SetViewBacking(Window id, void *img)
}
}
static void view_table_remove(Window id)
static void view_table_remove(WNativeWindow id)
{
unsigned idx = ((unsigned)id) % VIEW_TABLE_SIZE;
for (int i = 0; i < VIEW_TABLE_SIZE; i++) {
@ -118,14 +118,14 @@ Bool W_IsValidView(W_View *view)
* that WMDrawString() can resolve a WM window ID to a pixman_image_t when
* drawing text into frame_buf images (e.g. miniwindow title).
*/
void W_RegisterBacking(Window id, void *img)
void W_RegisterBacking(WNativeWindow id, void *img)
{
view_table_put(id, NULL);
W_SetViewBacking(id, img);
}
/* W_UnregisterBacking - remove a backing registration (on frame_buf destroy). */
void W_UnregisterBacking(Window id)
void W_UnregisterBacking(WNativeWindow id)
{
view_table_remove(id);
}
@ -145,7 +145,7 @@ static void wl_create_root(void *vctx, W_View *view)
{
(void)vctx;
view->window = (Window)wl_view_next_id++;
view->window = (WNativeWindow)wl_view_next_id++;
view_table_put(view->window, view);
/* Default screen size — the WM backend will update this */
view->size.width = 1920;
@ -165,7 +165,7 @@ static void wl_realize(void *vctx, W_View *view)
(void)vctx;
/* Assign a synthetic ID so W_DispatchMessage doesn't skip this view */
view->window = (Window)wl_view_next_id++;
view->window = (WNativeWindow)wl_view_next_id++;
view_table_put(view->window, view);
/* Allocate a backing pixman image for this view */
@ -391,12 +391,12 @@ static void wl_set_background_color(void *vctx, W_View *view, WMColor *color)
/* Background is handled by pixman rendering in frame_paint */
}
static void wl_set_cursor(void *vctx, W_View *view, Cursor cursor)
static void wl_set_cursor(void *vctx, W_View *view, WMNativeCursor cursor)
{
(void)vctx;
(void)view;
(void)cursor;
/* Cursor is managed by wlroots seat */
/* WMNativeCursor is managed by wlroots seat */
}
static void wl_redisplay(void *vctx, W_View *view)
@ -492,19 +492,19 @@ static WMPoint wl_get_screen_position(void *vctx, W_View *view)
return wmkpoint(x, y);
}
static Bool wl_selection_acquire(void *vctx, W_View *view, Atom selection, Time timestamp)
static Bool wl_selection_acquire(void *vctx, W_View *view, WMNativeAtom selection, Time timestamp)
{
(void)vctx; (void)view; (void)selection; (void)timestamp;
/* TODO: implement via wl_data_device */
return True;
}
static void wl_selection_release(void *vctx, W_View *view, Atom selection)
static void wl_selection_release(void *vctx, W_View *view, WMNativeAtom selection)
{
(void)vctx; (void)view; (void)selection;
}
static char *wl_selection_fetch(void *vctx, Atom selection, int *len_out)
static char *wl_selection_fetch(void *vctx, WMNativeAtom selection, int *len_out)
{
(void)vctx; (void)selection;
/* Use the clipboard fetch path (reads from seat selection via pipe) */

View File

@ -1,6 +1,6 @@
/* Apperance.c- color/texture for titlebar etc.
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1999-2003 Alfredo K. Kojima
*
@ -40,12 +40,12 @@ static const struct {
WMRect preview; /* The rectangle where the corresponding object is displayed */
WMPoint hand; /* The coordinate where the hand is drawn when pointing this item */
} colorOptions[] = {
/* Related to Window titles */
{ "FTitleColor", "white", N_("Focused Window Title"),
/* Related to WNativeWindow titles */
{ "FTitleColor", "white", N_("Focused WNativeWindow Title"),
{ { 30, 10 }, { 190, 20 } }, { 5, 10 } },
{ "UTitleColor", "black", N_("Unfocused Window Title"),
{ "UTitleColor", "black", N_("Unfocused WNativeWindow Title"),
{ { 30, 40 }, { 190, 20 } }, { 5, 40 } },
{ "PTitleColor", "white", N_("Owner of Focused Window Title"),
{ "PTitleColor", "white", N_("Owner of Focused WNativeWindow Title"),
{ { 30, 70 }, { 190, 20 } }, { 5, 70 } },
/* Related to Menus */
@ -67,12 +67,12 @@ static const struct {
* Note that the entries are reffered by their index for performance
*/
/* Related to Window's border */
{ "FrameFocusedBorderColor", "black", N_("Focused Window Border Color") ,
/* Related to WNativeWindow's border */
{ "FrameFocusedBorderColor", "black", N_("Focused WNativeWindow Border Color") ,
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
{ "FrameBorderColor", "black", N_("Window Border Color") ,
{ "FrameBorderColor", "black", N_("WNativeWindow Border Color") ,
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
{ "FrameSelectedBorderColor", "white", N_("Selected Window Border Color") ,
{ "FrameSelectedBorderColor", "white", N_("Selected WNativeWindow Border Color") ,
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
/* Related to Icons and Clip */
@ -208,9 +208,9 @@ typedef struct _Panel {
WMAlignment titleAlignment;
Pixmap preview;
Pixmap previewNoText;
Pixmap previewBack;
WMNativePixmap preview;
WMNativePixmap previewNoText;
WMNativePixmap previewBack;
char *fprefix;
} _Panel;
@ -219,7 +219,7 @@ typedef struct {
char *title;
char *texture;
WMPropList *prop;
Pixmap preview;
WMNativePixmap preview;
char *path;
@ -380,7 +380,7 @@ static const struct {
#define PFOCUSED 0
{ "FTitleBack", "(solid, black)", N_("[Focused]"),
{ { 30, 10 }, { 190, 20 } }, { 5, 10 }, N_("Titlebar of Focused Window") },
{ { 30, 10 }, { 190, 20 } }, { 5, 10 }, N_("Titlebar of Focused WNativeWindow") },
#define PUNFOCUSED 1
{ "UTitleBack", "(solid, gray)", N_("[Unfocused]"),
@ -388,11 +388,11 @@ static const struct {
#define POWNER 2
{ "PTitleBack", "(solid, \"#616161\")", N_("[Owner of Focused]"),
{ { 30, 70 }, { 190, 20 } }, { 5, 70 }, N_("Titlebar of Focused Window's Owner") },
{ { 30, 70 }, { 190, 20 } }, { 5, 70 }, N_("Titlebar of Focused WNativeWindow's Owner") },
#define PRESIZEBAR 3
{ "ResizebarBack", "(solid, gray)", N_("[Resizebar]"),
{ { 30, 100 }, { 190, 9 } }, { 5, 100 }, N_("Window Resizebar") },
{ { 30, 100 }, { 190, 9 } }, { 5, 100 }, N_("WNativeWindow Resizebar") },
#define PMTITLE 4
{ "MenuTitleBack", "(solid, black)", N_("[Menu Title]"),
@ -544,12 +544,12 @@ static void drawMenuBevel(RImage * img)
}
}
static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int height, const char *path, int border)
static WMNativePixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int height, const char *path, int border)
{
char *type;
RImage *image = NULL;
RImage *timage = NULL;
Pixmap pixmap;
WMNativePixmap pixmap;
RContext *rc = WMScreenRContext(scr);
char *str;
RColor rcolor;
@ -756,11 +756,11 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
return pixmap;
}
static Pixmap renderMenu(_Panel * panel, WMPropList * texture, int width, int iheight)
static WMNativePixmap renderMenu(_Panel * panel, WMPropList * texture, int width, int iheight)
{
WMScreen *scr = WMWidgetScreen(panel->parent);
Display *dpy = WMScreenDisplay(scr);
Pixmap pix, tmp;
WMNativePixmap pix, tmp;
GC gc = XCreateGC(dpy, WMWidgetXID(panel->parent), 0, NULL);
int i;
@ -792,7 +792,7 @@ static void renderPreview(_Panel * panel, GC gc, int part, int relief)
{
WMListItem *item;
TextureListItem *titem;
Pixmap pix;
WMNativePixmap pix;
WMScreen *scr = WMWidgetScreen(panel->box);
item = WMGetListItem(panel->texLs, panel->textureIndex[part]);
@ -817,7 +817,7 @@ static void updatePreviewBox(_Panel * panel, int elements)
{
WMScreen *scr = WMWidgetScreen(panel->parent);
Display *dpy = WMScreenDisplay(scr);
Pixmap pix;
WMNativePixmap pix;
GC gc;
int colorUpdate = 0;
@ -837,7 +837,7 @@ static void updatePreviewBox(_Panel * panel, int elements)
WMReleasePixmap(p);
}
if (elements & (1 << PBACKGROUND)) {
Pixmap tmp;
WMNativePixmap tmp;
TextureListItem *titem;
WMListItem *item;
@ -1263,7 +1263,7 @@ static void textureDoubleClick(WMWidget * w, void *data)
updatePreviewBox(panel, 1 << section);
}
static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void paintListItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
WMScreen *scr = WMWidgetScreen(lPtr);
@ -1312,13 +1312,13 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
WMReleaseColor(black);
}
static Pixmap loadRImage(WMScreen * scr, const char *path)
static WMNativePixmap loadRImage(WMScreen * scr, const char *path)
{
FILE *f;
RImage *image;
int w, h, d, cnt;
size_t read_size;
Pixmap pixmap;
WMNativePixmap pixmap;
f = fopen(path, "rb");
if (!f)
@ -1462,7 +1462,7 @@ static void changeColorPage(WMWidget * w, void *data)
}
static void
paintText(WMScreen * scr, Drawable d, WMColor * color, WMFont * font,
paintText(WMScreen * scr, WMDrawable d, WMColor * color, WMFont * font,
int x, int y, int w, int h, WMAlignment align, char *text)
{
int l = strlen(text);
@ -1486,7 +1486,7 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
{
WMScreen *scr = WMWidgetScreen(panel->box);
Display *dpy = WMScreenDisplay(scr);
Pixmap d, pnot;
WMNativePixmap d, pnot;
GC gc;
d = panel->preview;
@ -1497,21 +1497,21 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
XCopyArea(dpy, pnot, d, gc, 30, 10, 190, 20, 30, 10);
paintText(scr, d, panel->colors[FTITLE_COL],
panel->boldFont, 30, 10, 190, 20,
panel->titleAlignment, _("Focused Window"));
panel->titleAlignment, _("Focused WNativeWindow"));
}
if (elements & (1 << UTITLE_COL)) {
XCopyArea(dpy, pnot, d, gc, 30, 40, 190, 20, 30, 40);
paintText(scr, d, panel->colors[UTITLE_COL],
panel->boldFont, 30, 40, 190, 20,
panel->titleAlignment,
_("Unfocused Window"));
_("Unfocused WNativeWindow"));
}
if (elements & (1 << OTITLE_COL)) {
XCopyArea(dpy, pnot, d, gc, 30, 70, 190, 20, 30, 70);
paintText(scr, d, panel->colors[OTITLE_COL],
panel->boldFont, 30, 70, 190, 20,
panel->titleAlignment,
_("Owner of Focused Window"));
_("Owner of Focused WNativeWindow"));
}
if (elements & (1 << MTITLE_COL)) {
XCopyArea(dpy, pnot, d, gc, 30, 120, 90, 20, 30, 120);
@ -1648,7 +1648,7 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
}
if (elements & (1 << CLIP_COL) || elements & (1 << CCLIP_COL)) {
Pixmap pix;
WMNativePixmap pix;
RColor black;
RColor dark;
RColor light;

View File

@ -1,6 +1,6 @@
/* Configurations.c- misc. configurations
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -347,7 +347,7 @@ static void createPanel(Panel *p)
WMMoveWidget(panel->dithF, 237, 120);
WMSetFrameTitle(panel->dithF, _("Dithering colormap for 8bpp"));
WMSetBalloonTextForView(_("Number of colors to reserve for Window Maker\n"
WMSetBalloonTextForView(_("Number of colors to reserve for WNativeWindow Maker\n"
"on displays that support only 8bpp (PseudoColor)."),
WMWidgetView(panel->dithF));
@ -433,7 +433,7 @@ Panel *InitConfigurations(WMWidget *parent)
panel->sectionName = _("Other Configurations");
panel->description = _("Animation speeds, titlebar styles, various option\n"
"toggling and number of colors to reserve for\n" "Window Maker on 8bit displays.");
"toggling and number of colors to reserve for\n" "WNativeWindow Maker on 8bit displays.");
panel->parent = parent;
panel->callbacks.createWidgets = createPanel;

View File

@ -1,6 +1,6 @@
/* Workspace.c- workspace options
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2012 Daniel Déchelotte (heavily inspired from file (c) Alfredo K. Kojima)
*

View File

@ -1,10 +1,10 @@
/* Expert.c- expert user options
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
* Copyright (c) 1998-2003 Alfredo K. Kojima
* Copyright (c) 2009-2023 Window Maker Team
* Copyright (c) 2009-2023 WNativeWindow Maker Team
*
* 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
@ -54,7 +54,7 @@ static struct expert_option {
{ N_("Do not set non-WindowMaker specific parameters (do not use xset)."),
/* default: */ False, OPTION_USERDEF, "NoXSetStuff" },
{ N_("Automatically save session when exiting Window Maker."),
{ N_("Automatically save session when exiting WNativeWindow Maker."),
/* default: */ False, OPTION_WMAKER, "SaveSessionOnExit" },
{ N_("Use SaveUnder in window frames, icons, menus and other objects."),

View File

@ -1,6 +1,6 @@
/* Focus.c- input and colormap focus stuff
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -218,7 +218,7 @@ static void createPanel(Panel * p)
WMMapWidget(box);
}
/***************** Colormap Installation Mode ****************/
/***************** WMNativeColormap Installation Mode ****************/
panel->cfocF = WMCreateFrame(panel->box);
WMResizeWidget(panel->cfocF, 240, 77);
@ -251,7 +251,7 @@ static void createPanel(Panel * p)
panel->raisF = WMCreateFrame(panel->box);
WMResizeWidget(panel->raisF, 245, 68);
WMMoveWidget(panel->raisF, 265, 10);
WMSetFrameTitle(panel->raisF, _("Automatic Window Raise Delay"));
WMSetFrameTitle(panel->raisF, _("Automatic WNativeWindow Raise Delay"));
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
@ -349,7 +349,7 @@ Panel *InitFocus(WMWidget *parent)
panel = wmalloc(sizeof(_Panel));
panel->sectionName = _("Window Focus Preferences");
panel->sectionName = _("WNativeWindow Focus Preferences");
panel->description = _("Keyboard focus switching policy and related options.");
panel->parent = parent;

View File

@ -1,6 +1,6 @@
/* FontSimple.c- simplified font configuration panel
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2004 Alfredo K. Kojima
*
@ -96,7 +96,7 @@ static const struct {
const char *option;
const char *label;
} fontOptions[] = {
{ "WindowTitleFont", N_("Window Title") },
{ "WindowTitleFont", N_("WNativeWindow Title") },
{ "MenuTitleFont", N_("Menu Title") },
{ "MenuTextFont", N_("Menu Text") },
{ "IconTitleFont", N_("Icon Title") },
@ -738,7 +738,7 @@ Panel *InitFontSimple(WMWidget *parent)
panel->sectionName = _("Font Configuration");
panel->description = _("Configure fonts for Window Maker titlebars, menus etc.");
panel->description = _("Configure fonts for WNativeWindow Maker titlebars, menus etc.");
panel->parent = parent;

View File

@ -1,8 +1,8 @@
/* HotCornerShortcuts.c - screen corners actions
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2023 Window Maker Team
* Copyright (c) 2023 WNativeWindow Maker Team
*
* 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
@ -32,7 +32,7 @@ typedef struct _Panel {
WMWidget *parent;
WMPixmap *icon;
Pixmap quarter[4];
WMNativePixmap quarter[4];
WMFrame *hcF;
WMButton *hcB;
@ -440,7 +440,7 @@ static void prepareForClose(_Panel *panel)
WMScreen *scr = WMWidgetScreen(panel->parent);
WMReleasePixmap(panel->icon);
for (i = 0; i < sizeof(panel->quarter) / sizeof(Pixmap); i++)
for (i = 0; i < sizeof(panel->quarter) / sizeof(WMNativePixmap); i++)
XFreePixmap(scr->display, panel->quarter[i]);
}

View File

@ -1,6 +1,6 @@
/* Icons.c- icon preferences
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* KeyboardSettings.c- keyboard options (equivalent to xset)
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* KeyboardShortcuts.c- keyboard shortcut bindings
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -137,7 +137,7 @@ static struct keyOption {
{ "MoveToWorkspace9Key", N_("Move window to workspace 9") },
{ "MoveToWorkspace10Key", N_("Move window to workspace 10") },
/* Window Selection */
/* WNativeWindow Selection */
{ "WindowShortcut1Key", N_("Shortcut for window 1") },
{ "WindowShortcut2Key", N_("Shortcut for window 2") },
{ "WindowShortcut3Key", N_("Shortcut for window 3") },
@ -157,7 +157,7 @@ static struct keyOption {
{ "WindowRelaunchKey", N_("Launch new instance of application") },
{ "ScreenSwitchKey", N_("Switch to next screen/monitor") },
{ "RunKey", N_("Run application") },
{ "ExitKey", N_("Exit Window Maker") },
{ "ExitKey", N_("Exit WNativeWindow Maker") },
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") },
{ "ScreenCaptureKey", N_("Capture the entire screen") },
@ -171,7 +171,7 @@ static struct keyOption {
#ifndef HAVE_XCONVERTCASE
/* from Xlib */
static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
static void XConvertCase(register WMNativeKeysym sym, WMNativeKeysym * lower, WMNativeKeysym * upper)
{
*lower = sym;
*upper = sym;
@ -191,7 +191,7 @@ static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
*upper -= (XK_oslash - XK_Ooblique);
break;
case 1: /* Latin 2 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
/* Assume the WMNativeKeysym is a legal value (ignore discontinuities) */
if (sym == XK_Aogonek)
*lower = XK_aogonek;
else if (sym >= XK_Lstroke && sym <= XK_Sacute)
@ -214,7 +214,7 @@ static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
*upper -= (XK_racute - XK_Racute);
break;
case 2: /* Latin 3 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
/* Assume the WMNativeKeysym is a legal value (ignore discontinuities) */
if (sym >= XK_Hstroke && sym <= XK_Hcircumflex)
*lower += (XK_hstroke - XK_Hstroke);
else if (sym >= XK_Gbreve && sym <= XK_Jcircumflex)
@ -229,7 +229,7 @@ static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
*upper -= (XK_cabovedot - XK_Cabovedot);
break;
case 3: /* Latin 4 */
/* Assume the KeySym is a legal value (ignore discontinuities) */
/* Assume the WMNativeKeysym is a legal value (ignore discontinuities) */
if (sym >= XK_Rcedilla && sym <= XK_Tslash)
*lower += (XK_rcedilla - XK_Rcedilla);
else if (sym >= XK_rcedilla && sym <= XK_tslash)
@ -244,7 +244,7 @@ static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
*upper -= (XK_amacron - XK_Amacron);
break;
case 6: /* Cyrillic */
/* Assume the KeySym is a legal value (ignore discontinuities) */
/* Assume the WMNativeKeysym is a legal value (ignore discontinuities) */
if (sym >= XK_Serbian_DJE && sym <= XK_Serbian_DZE)
*lower -= (XK_Serbian_DJE - XK_Serbian_dje);
else if (sym >= XK_Serbian_dje && sym <= XK_Serbian_dze)
@ -255,7 +255,7 @@ static void XConvertCase(register KeySym sym, KeySym * lower, KeySym * upper)
*upper += (XK_Cyrillic_YU - XK_Cyrillic_yu);
break;
case 7: /* Greek */
/* Assume the KeySym is a legal value (ignore discontinuities) */
/* Assume the WMNativeKeysym is a legal value (ignore discontinuities) */
if (sym >= XK_Greek_ALPHAaccent && sym <= XK_Greek_OMEGAaccent)
*lower += (XK_Greek_alphaaccent - XK_Greek_ALPHAaccent);
else if (sym >= XK_Greek_alphaaccent && sym <= XK_Greek_omegaaccent &&
@ -311,7 +311,7 @@ char *capture_shortcut(WMScreen *scr, Bool *capturing, Bool convert_case)
{
Display *dpy = WMScreenDisplay(scr);
WMEvent ev;
KeySym ksym, lksym, uksym;
WMNativeKeysym ksym, lksym, uksym;
char buffer[64];
char *key = NULL;
unsigned int numlock_mask;
@ -521,7 +521,7 @@ static void showData(_Panel * panel)
WMRedisplayWidget(panel->actLs);
}
static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void paintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
int width, height, x, y;
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);

View File

@ -1,6 +1,6 @@
/* Menu.c- menu definition
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*
@ -367,7 +367,7 @@ static void createPanel(_Panel * p)
panel->gray = gray;
{
Pixmap pix;
WMNativePixmap pix;
Display *dpy = WMScreenDisplay(scr);
GC gc;
WMPixmap *pixm;
@ -434,7 +434,7 @@ static void createPanel(_Panel * p)
putNewItem(panel, pad, PLPipeInfo, _("Generated PL Menu"));
putNewItem(panel, pad, DirectoryInfo, _("Directory Contents"));
putNewItem(panel, pad, WSMenuInfo, _("Workspace Menu"));
putNewItem(panel, pad, WWindowListInfo, _("Window List Menu"));
putNewItem(panel, pad, WWindowListInfo, _("WNativeWindow List Menu"));
panel->itemPad[0] = pad;
}
@ -486,7 +486,7 @@ static void createPanel(_Panel * p)
data = putNewItem(panel, pad, ExecInfo, _("ghostview"));
data->param.exec.command = "gv";
data = putNewItem(panel, pad, CommandInfo, _("Exit Window Maker"));
data = putNewItem(panel, pad, CommandInfo, _("Exit WNativeWindow Maker"));
data->param.command.command = 3;
WMMapWidget(pad);
@ -764,10 +764,10 @@ static void createPanel(_Panel * p)
WMInsertListItem(panel->icommandL, 1, _("Hide All Windows Except For The Focused One"));
WMInsertListItem(panel->icommandL, 2, _("Show All Windows"));
WMInsertListItem(panel->icommandL, 3, _("Exit Window Maker"));
WMInsertListItem(panel->icommandL, 3, _("Exit WNativeWindow Maker"));
WMInsertListItem(panel->icommandL, 4, _("Exit X Session"));
WMInsertListItem(panel->icommandL, 5, _("Restart Window Maker"));
WMInsertListItem(panel->icommandL, 6, _("Start Another Window Manager : ("));
WMInsertListItem(panel->icommandL, 5, _("Restart WNativeWindow Maker"));
WMInsertListItem(panel->icommandL, 6, _("Start Another WNativeWindow Manager : ("));
WMInsertListItem(panel->icommandL, 7, _("Save Current Session"));
WMInsertListItem(panel->icommandL, 8, _("Clear Saved Session"));
@ -778,7 +778,7 @@ static void createPanel(_Panel * p)
panel->paramF = WMCreateFrame(panel->optionsF);
WMResizeWidget(panel->paramF, width, 50);
WMMoveWidget(panel->paramF, 10, 105);
WMSetFrameTitle(panel->paramF, _("Window Manager to Start"));
WMSetFrameTitle(panel->paramF, _("WNativeWindow Manager to Start"));
panel->paramT = WMCreateTextField(panel->paramF);
WMResizeWidget(panel->paramT, width - 20, 20);
@ -1100,7 +1100,7 @@ static void updateFrameTitle(_Panel * panel, const char *title, InfoType type)
break;
case WWindowListInfo:
tmp = wstrconcat(title, _(": Open Window List Submenu"));
tmp = wstrconcat(title, _(": Open WNativeWindow List Submenu"));
break;
default:

View File

@ -1,6 +1,6 @@
/* MenuPreferences.c- menu related preferences
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,7 +1,7 @@
/* MouseSettings.c- mouse options (some are equivalent to xset)
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -55,12 +55,12 @@ static const struct {
} button_actions[] = {
{ "None", N_("None") },
{ "OpenApplicationsMenu", N_("Applications Menu") },
{ "OpenWindowListMenu", N_("Window List Menu") },
{ "OpenWindowListMenu", N_("WNativeWindow List Menu") },
{ "SelectWindows", N_("Select Windows") },
{ "MoveToPrevWorkspace", N_("Previous Workspace") },
{ "MoveToNextWorkspace", N_("Next Workspace") },
{ "MoveToPrevWindow", N_("Previous Window") },
{ "MoveToNextWindow", N_("Next Window") }
{ "MoveToPrevWindow", N_("Previous WNativeWindow") },
{ "MoveToNextWindow", N_("Next WNativeWindow") }
};
static const struct {
@ -369,7 +369,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
int idx;
char *array[8];
int a;
KeySym ksym;
WMNativeKeysym ksym;
int k;
char *ptr;
char *tmp;

View File

@ -1,6 +1,6 @@
/* Paths.c- pixmap/icon paths
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -171,7 +171,7 @@ static void browseForFile(WMWidget * w, void *data)
}
}
static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void paintItem(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
int width, height, x, y;
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
@ -278,7 +278,7 @@ static void createPanel(Panel * p)
tab = WMCreateTabViewItemWithIdentifier(0);
WMSetTabViewItemView(tab, WMWidgetView(panel->pixF));
WMAddItemInTabView(panel->tabv, tab);
WMSetTabViewItemLabel(tab, _("Pixmap Search Paths"));
WMSetTabViewItemLabel(tab, _("WMNativePixmap Search Paths"));
panel->pixL = WMCreateList(panel->pixF);
WMResizeWidget(panel->pixL, 480, 147);

View File

@ -1,6 +1,6 @@
/* Preferences.c- misc ergonomic preferences
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -54,7 +54,7 @@ typedef struct _TexturePanel {
/*-- Gradient --*/
Pixmap gimage;
WMNativePixmap gimage;
/* colors */
WMFrame *gcolF;
@ -434,7 +434,7 @@ static void sliderChangeCallback(WMWidget *w, void *data)
updateGradButtons(panel);
}
static void paintGradListItem(WMList *lPtr, int index, Drawable d, char *text, int state, WMRect *rect)
static void paintGradListItem(WMList *lPtr, int index, WMDrawable d, char *text, int state, WMRect *rect)
{
TexturePanel *panel = (TexturePanel *) WMGetHangedData(lPtr);
WMScreen *scr = WMWidgetScreen(lPtr);
@ -1344,7 +1344,7 @@ TexturePanel *CreateTexturePanel(WMWindow *keyWindow)
{
WMPixmap *pixmap;
Pixmap p;
WMNativePixmap p;
WMColor *color;
pixmap = WMCreatePixmap(scr, 155, 18, WMScreenDepth(scr), False);
@ -1479,8 +1479,8 @@ void testOKButton(WMWidget *self, void *data)
{
char *test;
Display *dpy;
Window win;
Pixmap pix;
WNativeWindow win;
WMNativePixmap pix;
RImage *image;
TexturePanel *panel = (TexturePanel *) data;

View File

@ -1,6 +1,6 @@
/* Themes.c- Theme stuff
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* WPrefs.c- main window and other basic stuff
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -209,7 +209,7 @@ static void createMainWindow(WMScreen * scr)
WPrefs.win = WMCreateWindow(scr, "wprefs");
WMResizeWidget(WPrefs.win, 520, 390);
WMSetWindowTitle(WPrefs.win, _("Window Maker Preferences"));
WMSetWindowTitle(WPrefs.win, _("WNativeWindow Maker Preferences"));
WMSetWindowCloseAction(WPrefs.win, quit, NULL);
WMSetWindowMaxSize(WPrefs.win, 520, 390);
WMSetWindowMinSize(WPrefs.win, 520, 390);
@ -279,7 +279,7 @@ static void createMainWindow(WMScreen * scr)
WMResizeWidget(WPrefs.nameL, FRAME_WIDTH - 20, 60);
WMMoveWidget(WPrefs.nameL, 10, 50);
WMSetLabelFont(WPrefs.nameL, font);
WMSetLabelText(WPrefs.nameL, _("Window Maker Preferences"));
WMSetLabelText(WPrefs.nameL, _("WNativeWindow Maker Preferences"));
WMReleaseFont(font);
WPrefs.versionL = WMCreateLabel(WPrefs.banner);
@ -551,7 +551,7 @@ void Initialize(WMScreen * scr)
WMMapWidget(WPrefs.win);
XFlush(WMScreenDisplay(scr));
WMSetLabelText(WPrefs.statusL, _("Loading Window Maker configuration files..."));
WMSetLabelText(WPrefs.statusL, _("Loading WNativeWindow Maker configuration files..."));
XFlush(WMScreenDisplay(scr));
loadConfigurations(scr, WPrefs.win);
@ -614,11 +614,11 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
if (!WMIsPLDictionary(db)) {
WMReleasePropList(db);
db = NULL;
sprintf(mbuf, _("Window Maker domain (%s) is corrupted!"), path);
sprintf(mbuf, _("WNativeWindow Maker domain (%s) is corrupted!"), path);
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
}
} else {
sprintf(mbuf, _("Could not load Window Maker domain (%s) from defaults database."), path);
sprintf(mbuf, _("Could not load WNativeWindow Maker domain (%s) from defaults database."), path);
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
}
@ -633,29 +633,29 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
wfree(command);
}
if (!file || !fgets(buffer, 1023, file)) {
werror(_("could not extract version information from Window Maker"));
werror(_("could not extract version information from WNativeWindow Maker"));
wfatal(_("Make sure wmaker is in your search path."));
WMRunAlertPanel(scr, mainw, _("Error"),
_
("Could not extract version from Window Maker. Make sure it is correctly installed and is in your PATH environment variable."),
("Could not extract version from WNativeWindow Maker. Make sure it is correctly installed and is in your PATH environment variable."),
_("OK"), NULL, NULL);
exit(1);
}
if (file)
pclose(file);
if (sscanf(buffer, "Window Maker %i.%i.%i", &v1, &v2, &v3) != 3
if (sscanf(buffer, "WNativeWindow Maker %i.%i.%i", &v1, &v2, &v3) != 3
&& sscanf(buffer, "WindowMaker %i.%i.%i", &v1, &v2, &v3) != 3) {
WMRunAlertPanel(scr, mainw, _("Error"),
_("Could not extract version from Window Maker. "
_("Could not extract version from WNativeWindow Maker. "
"Make sure it is correctly installed and the path "
"where it installed is in the PATH environment "
"variable."), _("OK"), NULL, NULL);
exit(1);
}
if (v1 == 0 && (v2 < 18 || v3 < 0)) {
sprintf(mbuf, _("WPrefs only supports Window Maker 0.18.0 or newer.\n"
sprintf(mbuf, _("WPrefs only supports WNativeWindow Maker 0.18.0 or newer.\n"
"The version installed is %i.%i.%i\n"), v1, v2, v3);
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
exit(1);
@ -664,7 +664,7 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
if (v1 > 1 || (v1 == 1 && (v2 > 0))) {
sprintf(mbuf,
_
("Window Maker %i.%i.%i, which is installed in your system, is not fully supported by this version of WPrefs."),
("WNativeWindow Maker %i.%i.%i, which is installed in your system, is not fully supported by this version of WPrefs."),
v1, v2, v3);
WMRunAlertPanel(scr, mainw, _("Warning"), mbuf, _("OK"), NULL, NULL);
}
@ -696,11 +696,11 @@ static void loadConfigurations(WMScreen * scr, WMWindow * mainw)
if (!WMIsPLDictionary(gdb)) {
WMReleasePropList(gdb);
gdb = NULL;
sprintf(mbuf, _("Window Maker domain (%s) is corrupted!"), buffer);
sprintf(mbuf, _("WNativeWindow Maker domain (%s) is corrupted!"), buffer);
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
}
} else {
sprintf(mbuf, _("Could not load global Window Maker domain (%s)."), buffer);
sprintf(mbuf, _("Could not load global WNativeWindow Maker domain (%s)."), buffer);
WMRunAlertPanel(scr, mainw, _("Error"), mbuf, _("OK"), NULL, NULL);
}

View File

@ -1,6 +1,6 @@
/* WPrefs.h- general definitions
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* WindowHandling.c- options for handling windows
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -303,11 +303,11 @@ static void createPanel(Panel * p)
WMSetBoxHorizontal(hbox, True);
WMAddBoxSubview(panel->box, WMWidgetView(hbox), False, True, 110, 0, 10);
/************** Window Placement ***************/
/************** WNativeWindow Placement ***************/
panel->placF = WMCreateFrame(panel->box);
WMResizeWidget(panel->placF, 222, 163);
WMMoveWidget(panel->placF, 8, 6);
WMSetFrameTitle(panel->placF, _("Window Placement"));
WMSetFrameTitle(panel->placF, _("WNativeWindow Placement"));
WMSetBalloonTextForView(_("How to place windows when they are first put\n"
"on screen."), WMWidgetView(panel->placF));
@ -562,7 +562,7 @@ static void createPanel(Panel * p)
WMMapSubwidgets(panel->resF);
/**************** Dragging a Maximized Window ****************/
/**************** Dragging a Maximized WNativeWindow ****************/
panel->dragmaxF = WMCreateFrame(panel->box);
WMResizeWidget(panel->dragmaxF, 357, 49);
WMMoveWidget(panel->dragmaxF, 8, 172);
@ -595,9 +595,9 @@ Panel *InitWindowHandling(WMWidget *parent)
panel = wmalloc(sizeof(_Panel));
panel->sectionName = _("Window Handling Preferences");
panel->sectionName = _("WNativeWindow Handling Preferences");
panel->description = _("Window handling options. Initial placement style\n"
panel->description = _("WNativeWindow handling options. Initial placement style\n"
"edge resistance, opaque move etc.");
panel->parent = parent;

View File

@ -1,6 +1,6 @@
/* Workspace.c- workspace options
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* editmenu.c - editable menus
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*
@ -179,7 +179,7 @@ static void paintEditMenuItem(WEditMenuItem * iPtr)
{
WMScreen *scr = WMWidgetScreen(iPtr);
WMColor *color;
Window win = W_VIEW(iPtr)->window;
WNativeWindow win = W_VIEW(iPtr)->window;
int w = W_VIEW(iPtr)->size.width;
int h = W_VIEW(iPtr)->size.height;
WMFont *font = (iPtr->flags.isTitle ? scr->boldFont : scr->normalFont);
@ -300,17 +300,17 @@ typedef struct {
int window_style;
int window_level;
int reserved;
Pixmap miniaturize_pixmap; /* pixmap for miniaturize button */
Pixmap close_pixmap; /* pixmap for close button */
Pixmap miniaturize_mask; /* miniaturize pixmap mask */
Pixmap close_mask; /* close pixmap mask */
WMNativePixmap miniaturize_pixmap; /* pixmap for miniaturize button */
WMNativePixmap close_pixmap; /* pixmap for close button */
WMNativePixmap miniaturize_mask; /* miniaturize pixmap mask */
WMNativePixmap close_mask; /* close pixmap mask */
int extra_flags;
} GNUstepWMAttributes;
#define GSWindowStyleAttr (1<<0)
#define GSWindowLevelAttr (1<<1)
static void writeGNUstepWMAttr(WMScreen * scr, Window window, GNUstepWMAttributes * attr)
static void writeGNUstepWMAttr(WMScreen * scr, WNativeWindow window, GNUstepWMAttributes * attr)
{
unsigned long data[9];
@ -913,7 +913,7 @@ static void editItemLabel(WEditMenuItem * item)
/* -------------------------------------------------- */
static void slideWindow(Display * dpy, Window win, int srcX, int srcY, int dstX, int dstY)
static void slideWindow(Display * dpy, WNativeWindow win, int srcX, int srcY, int dstX, int dstY)
{
double x, y, dx, dy;
int i;
@ -948,10 +948,10 @@ static int errorHandler(Display * d, XErrorEvent * ev)
return 0;
}
static WEditMenu *findMenuInWindow(Display * dpy, Window toplevel, int x, int y)
static WEditMenu *findMenuInWindow(Display * dpy, WNativeWindow toplevel, int x, int y)
{
Window foo, bar;
Window *children;
WNativeWindow foo, bar;
WNativeWindow *children;
unsigned nchildren;
int i;
WEditMenu *menu;
@ -979,7 +979,7 @@ static WEditMenu *findMenuInWindow(Display * dpy, Window toplevel, int x, int y)
if (XGetWindowAttributes(dpy, children[i], &attr)
&& attr.map_state == IsViewable
&& x >= attr.x && y >= attr.y && x < attr.x + attr.width && y < attr.y + attr.height) {
Window tmp;
WNativeWindow tmp;
tmp = children[i];
@ -1000,7 +1000,7 @@ static WEditMenu *findMenuInWindow(Display * dpy, Window toplevel, int x, int y)
static void handleDragOver(WEditMenu *menu, WMView *view, WEditMenuItem *item, int y)
{
WMScreen *scr = W_VIEW_SCREEN(menu->view);
Window blaw;
WNativeWindow blaw;
int mx, my;
int offs;
@ -1018,7 +1018,7 @@ static void handleDragOver(WEditMenu *menu, WMView *view, WEditMenuItem *item, i
static void handleItemDrop(WEditMenu *menu, WEditMenuItem *item, int y)
{
WMScreen *scr = W_VIEW_SCREEN(menu->view);
Window blaw;
WNativeWindow blaw;
int mx, my;
int index;
@ -1059,7 +1059,7 @@ static void dragMenu(WEditMenu * menu)
Bool done = False;
int dx, dy;
unsigned blau;
Window blaw;
WNativeWindow blaw;
XGetGeometry(scr->display, W_VIEW_DRAWABLE(menu->view), &blaw, &dx, &dy, &blau, &blau, &blau, &blau);
@ -1162,10 +1162,10 @@ static void dragItem(WEditMenu * menu, WEditMenuItem * item, Bool copy)
int x = 0, y = 0;
int dx, dy;
Bool done = False;
Window blaw;
WNativeWindow blaw;
int blai;
unsigned blau;
Window win;
WNativeWindow win;
WMView *dview;
int orix, oriy;
Bool enteredMenu = False;

View File

@ -1,6 +1,6 @@
/* editmenu.h - editable menus
*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*

View File

@ -1,5 +1,5 @@
/*
* WPrefs - Window Maker Preferences Program
* WPrefs - WNativeWindow Maker Preferences Program
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -110,7 +110,7 @@ int main(int argc, char **argv)
if (argc > 1) {
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-version") == 0 || strcmp(argv[i], "--version") == 0) {
printf("WPrefs (Window Maker) %s\n", VERSION);
printf("WPrefs (WNativeWindow Maker) %s\n", VERSION);
exit(0);
} else if (strcmp(argv[i], "-display") == 0) {
i++;

View File

@ -164,11 +164,11 @@ static void x_reset_modifier_mapping(Display * display)
mkpm = x_modifier_keymap->max_keypermod;
for (modifier_index = 0; modifier_index < 8; modifier_index++)
for (modifier_key = 0; modifier_key < mkpm; modifier_key++) {
KeySym last_sym = 0;
WMNativeKeysym last_sym = 0;
for (column = 0; column < 4; column += 2) {
KeyCode code = x_modifier_keymap->modifiermap[modifier_index * mkpm
+ modifier_key];
KeySym sym;
WMNativeKeysym sym;
if (code) {
sym = W_KeycodeToKeysym(display, code, column);

View File

@ -1,6 +1,6 @@
/* GNUstep.h-- stuff for compatibility with GNUstep applications
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -41,7 +41,7 @@ enum {
#ifndef _DEFINED_GNUSTEP_WINDOW_INFO
#define _DEFINED_GNUSTEP_WINDOW_INFO
/*
* Window levels are taken from GNUstep (gui/AppKit/NSWindow.h)
* WNativeWindow levels are taken from GNUstep (gui/AppKit/NSWindow.h)
* NSDesktopWindowLevel intended to be the level at which things
* on the desktop sit ... so you should be able
* to put a desktop background just below it.

View File

@ -1,8 +1,8 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
*
* 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
@ -275,7 +275,7 @@ typedef enum {
}
/* Flags for the Window Maker state when restarting/crash situations */
/* Flags for the WNativeWindow Maker state when restarting/crash situations */
#define WFLAGS_NONE (0)
#define WFLAGS_CRASHED (1<<0)
@ -496,7 +496,7 @@ extern struct WPreferences {
} flags; /* internal flags */
/* Map table between w_cursor and actual X id */
Cursor cursor[WCUR_LAST];
WMNativeCursor cursor[WCUR_LAST];
int switch_panel_icon_size; /* icon size in switch panel */
@ -560,45 +560,45 @@ extern struct wmaker_global_variables {
/* definition for X Atoms */
struct {
/* Window-Manager related */
/* WNativeWindow-Manager related */
struct {
Atom state;
Atom change_state;
Atom protocols;
Atom take_focus;
Atom delete_window;
Atom save_yourself;
Atom client_leader;
Atom colormap_windows;
Atom colormap_notify;
Atom ignore_focus_events;
WMNativeAtom state;
WMNativeAtom change_state;
WMNativeAtom protocols;
WMNativeAtom take_focus;
WMNativeAtom delete_window;
WMNativeAtom save_yourself;
WMNativeAtom client_leader;
WMNativeAtom colormap_windows;
WMNativeAtom colormap_notify;
WMNativeAtom ignore_focus_events;
} wm;
/* GNUStep related */
struct {
Atom wm_attr;
Atom wm_miniaturize_window;
Atom wm_resizebar;
Atom titlebar_state;
WMNativeAtom wm_attr;
WMNativeAtom wm_miniaturize_window;
WMNativeAtom wm_resizebar;
WMNativeAtom titlebar_state;
} gnustep;
/* Destkop-environment related */
struct {
Atom gtk_object_path;
WMNativeAtom gtk_object_path;
} desktop;
/* WindowMaker specific */
struct {
Atom menu;
Atom wm_protocols;
Atom state;
WMNativeAtom menu;
WMNativeAtom wm_protocols;
WMNativeAtom state;
Atom wm_function;
Atom noticeboard;
Atom command;
WMNativeAtom wm_function;
WMNativeAtom noticeboard;
WMNativeAtom command;
Atom icon_size;
Atom icon_tile;
WMNativeAtom icon_size;
WMNativeAtom icon_tile;
} wmaker;
} atom;

View File

@ -1,10 +1,10 @@
/* action.c- misc. window commands (miniaturize, hide etc.)
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
*
* 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
@ -114,7 +114,7 @@ static inline void shade_animate(WWindow *wwin, Bool what)
* unfocused.
*
* Side effects:
* Window list may be reordered and the window focus is changed.
* WNativeWindow list may be reordered and the window focus is changed.
*
*----------------------------------------------------------------------
*/
@ -725,11 +725,11 @@ void handleMaximize(WWindow *wwin, int directions)
/* Moving window between heads
*
* Window is moved between all avaiable heads for current screen in
* WNativeWindow is moved between all avaiable heads for current screen in
* requested direction.
*
* If heads have different sizes, window position will be adjusted to be inside
* screen. Window will be unmaximized on move, so that it can be immediately be
* screen. WNativeWindow will be unmaximized on move, so that it can be immediately be
* maximixed by another shortcut.
*
*

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* appicon.c- icon for applications (not mini-window)
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
@ -64,7 +64,7 @@ static void wApplicationSaveIconPathFor(const char *iconPath, const char *wm_ins
static WAppIcon *wAppIconCreate(WWindow * leader_win);
static void add_to_appicon_list(WScreen *scr, WAppIcon *appicon);
static void remove_from_appicon_list(WScreen *scr, WAppIcon *appicon);
static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window);
static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, WNativeWindow main_window);
/* This function is used if the application is a .app. It checks if it has an icon in it
* like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff
@ -712,8 +712,8 @@ Bool wHandleAppIconMove(WAppIcon *aicon, WMEvent *event)
Bool showed_all_clips = False;
int clickButton = event->u.button.button;
Pixmap ghost = WM_NATIVE_NONE;
Window wins[2]; /* Managing shadow window */
WMNativePixmap ghost = WM_NATIVE_NONE;
WNativeWindow wins[2]; /* Managing shadow window */
WMEvent ev;
int x = aicon->x_pos, y = aicon->y_pos;
@ -1085,7 +1085,7 @@ static void wApplicationSaveIconPathFor(const char *iconPath, const char *wm_ins
UpdateDomainFile(w_global.domain.window_attr);
}
static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
static WAppIcon *findDockIconFor(WDock *dock, WNativeWindow main_window)
{
WAppIcon *aicon = NULL;
@ -1097,7 +1097,7 @@ static WAppIcon *findDockIconFor(WDock *dock, Window main_window)
return aicon;
}
static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window)
static void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, WNativeWindow main_window)
{
WScreen *scr = wwin->screen_ptr;
wapp->app_icon = NULL;
@ -1179,8 +1179,8 @@ static void remove_from_appicon_list(WScreen *scr, WAppIcon *appicon)
appicon->next = NULL;
}
/* Return the AppIcon associated with a given (Xlib) Window. */
WAppIcon *wAppIconFor(Window window)
/* Return the AppIcon associated with a given (Xlib) WNativeWindow. */
WAppIcon *wAppIconFor(WNativeWindow window)
{
WObjDescriptor *desc;

View File

@ -1,6 +1,6 @@
/* appicon.h- application icon
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -44,7 +44,7 @@ typedef struct WAppIcon {
char *wm_class;
char *wm_instance;
pid_t pid; /* for apps launched from the dock */
Window main_window;
WNativeWindow main_window;
struct WDock *dock; /* In which dock is docked. */
struct _AppSettingsPanel *panel; /* Settings Panel */
unsigned int docked:1;
@ -81,7 +81,7 @@ void paint_app_icon(WApplication *wapp);
void unpaint_app_icon(WApplication *wapp);
void wApplicationExtractDirPackIcon(const char *path, const char *wm_instance,
const char *wm_class);
WAppIcon *wAppIconFor(Window window);
WAppIcon *wAppIconFor(WNativeWindow window);
void appIconMouseDown(WObjDescriptor * desc, WBackendEvent * event);

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
@ -40,7 +40,7 @@
/******** Local variables ********/
static WWindow *makeMainWindow(WScreen * scr, Window window)
static WWindow *makeMainWindow(WScreen * scr, WNativeWindow window)
{
WWindow *wwin;
@ -67,7 +67,7 @@ static WWindow *makeMainWindow(WScreen * scr, Window window)
return wwin;
}
WApplication *wApplicationOf(Window window)
WApplication *wApplicationOf(WNativeWindow window)
{
WApplication *wapp;
@ -82,7 +82,7 @@ WApplication *wApplicationOf(Window window)
WApplication *wApplicationCreate(WWindow * wwin)
{
WScreen *scr = wwin->screen_ptr;
Window main_window = wwin->main_window;
WNativeWindow main_window = wwin->main_window;
WApplication *wapp;
WWindow *leader;

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -27,7 +27,7 @@ typedef struct WApplication {
struct WApplication *next;
struct WApplication *prev;
Window main_window; /* ID of the group leader */
WNativeWindow main_window; /* ID of the group leader */
struct WWindow *main_window_desc; /* main (leader) window descriptor */
WMenu *menu; /* application menu */
struct WAppIcon *app_icon;
@ -46,7 +46,7 @@ typedef struct WApplication {
WApplication *wApplicationCreate(struct WWindow *wwin);
WApplication *wApplicationOf(Window window);
WApplication *wApplicationOf(WNativeWindow window);
void wApplicationDestroy(WApplication *wapp);
void wAppBounce(WApplication *);

View File

@ -1,6 +1,6 @@
/* appmenu.c- application defined menu
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -36,7 +36,7 @@
typedef struct {
short code;
short tag;
Window window;
WNativeWindow window;
} WAppMenuData;
enum {
@ -51,7 +51,7 @@ enum {
wmSelectItem = 1
};
static void sendMessage(Window window, int what, int tag)
static void sendMessage(WNativeWindow window, int what, int tag)
{
wm_backend->appmenu_send((WNativeWindow)window, what, tag);
}
@ -66,7 +66,7 @@ static void notifyClient(WMenu * menu, WMenuEntry * entry)
sendMessage(data->window, wmSelectItem, data->tag);
}
static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int count, int *index)
static WMenu *parseMenuCommand(WScreen * scr, WNativeWindow win, char **slist, int count, int *index)
{
WMenu *menu;
int command;
@ -184,7 +184,7 @@ static WMenu *parseMenuCommand(WScreen * scr, Window win, char **slist, int coun
return menu;
}
WMenu *wAppMenuGet(WScreen * scr, Window window)
WMenu *wAppMenuGet(WScreen * scr, WNativeWindow window)
{
int count, i;
char **slist;

View File

@ -1,6 +1,6 @@
/* appmenu.h- application defined menu
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -22,7 +22,7 @@
#ifndef _WAPPMENU_H_
#define _WAPPMENU_H_
WMenu *wAppMenuGet(WScreen *scr, Window window);
WMenu *wAppMenuGet(WScreen *scr, WNativeWindow window);
void wAppMenuDestroy(WMenu *menu);
void wAppMenuMap(WMenu *menu, WWindow *wwin);

View File

@ -9,15 +9,15 @@
* Phase 2: generalized context table (all call sites), screen lifecycle
*
* NOTE: The function pointer parameters still use X11 types (Visual *,
* Colormap) because WScreen's visual fields have not been abstracted yet.
* WMNativeColormap) because WScreen's visual fields have not been abstracted yet.
* A later phase will replace them with WBackendScreen *.
*/
#ifndef WM_BACKEND_H_
#define WM_BACKEND_H_
/* <X11/Xlib.h> removed Phase 30: Visual,Colormap,XEvent confined to x11_backend.c.
* Vtable uses void* / unsigned long for Visual/Colormap/XEvent slots.
/* <X11/Xlib.h> removed Phase 30: Visual,WMNativeColormap,XEvent confined to x11_backend.c.
* Vtable uses void* / unsigned long for Visual/WMNativeColormap/XEvent slots.
* Policy files receive Xlib types transitively via WINGs.h (WindowMaker.h). */
/* <X11/Xatom.h> removed Phase 29: XA_* replaced by WA_* in backend_types.h. */
/* <X11/keysym.h> removed Phase 28: XK_* replaced by WM_KEY_* in backend_types.h;
@ -118,7 +118,7 @@ typedef struct WMBackend {
/*
* Intern an atom by name.
* X11: XInternAtom(dpy, name, False) -- returns Atom (unsigned long).
* X11: XInternAtom(dpy, name, False) -- returns WMNativeAtom (unsigned long).
* Wayland: returns 0 (atoms have no meaning in native Wayland).
* Called from StartUp() to populate w_global.atom.*.
*/
@ -214,7 +214,7 @@ typedef struct WMBackend {
int (*frame_paint)(struct WFrameWindow *fwin);
/* ------------------------------------------------------------------ */
/* Window context table (Phase 2) */
/* WNativeWindow context table (Phase 2) */
/* */
/* Three lookup tables keyed by WContextKey map a WNativeWindow to */
/* the owning policy object (WObjDescriptor *, WApplication *, or */
@ -343,7 +343,7 @@ typedef struct WMBackend {
/*
* Reorder the given windows to match the array order (front-to-back).
* Equivalent to XRestackWindows(dpy, (Window *)windows, count).
* Equivalent to XRestackWindows(dpy, (WNativeWindow *)windows, count).
*/
void (*stacking_restack)(WNativeWindow *windows, int count);
@ -402,7 +402,7 @@ typedef struct WMBackend {
int (*event_pending)(void);
/* ------------------------------------------------------------------ */
/* Window properties (Phase 5) */
/* WNativeWindow properties (Phase 5) */
/* ------------------------------------------------------------------ */
/*
@ -479,7 +479,7 @@ typedef struct WMBackend {
char ***list_out, int *count_out);
/* ------------------------------------------------------------------ */
/* Window visibility and geometry (Phase 10) */
/* WNativeWindow visibility and geometry (Phase 10) */
/* ------------------------------------------------------------------ */
/*
@ -615,7 +615,7 @@ typedef struct WMBackend {
void (*overlay_draw_rect)(WScreen *scr, int x, int y, int w, int h);
/* ------------------------------------------------------------------ */
/* Window attributes (Phase 11) */
/* WNativeWindow attributes (Phase 11) */
/* ------------------------------------------------------------------ */
/*
@ -657,7 +657,7 @@ typedef struct WMBackend {
void (*refresh_desktop)(WScreen *scr);
/* ------------------------------------------------------------------ */
/* Window event subscription (Phase 11) */
/* WNativeWindow event subscription (Phase 11) */
/* ------------------------------------------------------------------ */
/*
@ -669,7 +669,7 @@ typedef struct WMBackend {
void (*window_select_events)(WNativeWindow win, unsigned long mask);
/* ------------------------------------------------------------------ */
/* Window border (Phase 11) */
/* WNativeWindow border (Phase 11) */
/* ------------------------------------------------------------------ */
/*
@ -786,7 +786,7 @@ typedef struct WMBackend {
int src_x, int src_y, int *dst_x, int *dst_y);
/* ------------------------------------------------------------------ */
/* Window save-under attribute (Phase 12) */
/* WNativeWindow save-under attribute (Phase 12) */
/* ------------------------------------------------------------------ */
/*
@ -857,7 +857,7 @@ typedef struct WMBackend {
const char *str, int n);
/* ------------------------------------------------------------------ */
/* Window clear and repaint (Phase 13) */
/* WNativeWindow clear and repaint (Phase 13) */
/* ------------------------------------------------------------------ */
/*
@ -1279,7 +1279,7 @@ typedef struct WMBackend {
void (*extensions_init)(void);
/* ------------------------------------------------------------------ */
/* Cursor creation (Phase 24) */
/* WMNativeCursor creation (Phase 24) */
/* ------------------------------------------------------------------ */
/*
@ -1360,7 +1360,7 @@ typedef struct WMBackend {
/*
* Update X11 window backgrounds for frame sub-windows after a
* texture/state change. Clears and repaints titlebar + buttons.
* X11: XSetWindowBackground[Pixmap] + XClearWindow on sub-windows.
* X11: XSetWindowBackground[WMNativePixmap] + XClearWindow on sub-windows.
* Wayland: no-op (frame_paint renders the entire frame).
*/
void (*frame_update_texture)(struct WFrameWindow *fwin);
@ -1775,7 +1775,7 @@ typedef struct WMBackend {
void (*format_x_error)(void *error, char *buf, int size);
/* ------------------------------------------------------------------ */
/* Pixmap creation (Phase 80d) */
/* WMNativePixmap creation (Phase 80d) */
/* ------------------------------------------------------------------ */
WPixmap *(*pixmap_create_from_xbm)(WScreen *scr, char *data, char *mask,
@ -1803,9 +1803,9 @@ typedef struct WMBackend {
int (*parse_color)(WScreen *scr, const char *name, XColor *color_out);
int (*cursor_create_from_files)(WScreen *scr, const char *bitmap_path,
const char *mask_path, Cursor *cursor_out);
void (*cursor_free)(Cursor cursor);
void (*cursor_set)(WNativeWindow window, Cursor cursor);
const char *mask_path, WMNativeCursor *cursor_out);
void (*cursor_free)(WMNativeCursor cursor);
void (*cursor_set)(WNativeWindow window, WMNativeCursor cursor);
void (*pointer_change_cursor)(int cursor_id);
void (*appicon_paint_dock_dots)(struct WAppIcon *aicon, void *wapp);
int (*pixmap_get_size)(unsigned long drawable, unsigned int *w, unsigned int *h, unsigned int *depth);

View File

@ -3,10 +3,10 @@
*
* These types are visible to all WM policy code. They carry no
* display-system semantics; the backend is responsible for mapping them
* to the appropriate native types (X11 Window, Wayland object ID, etc.).
* to the appropriate native types (X11 WNativeWindow, Wayland object ID, etc.).
*
* Phase 0: WNativeWindow is typedef'd to unsigned long, which is identical
* to X11's Window / XID on Linux. No casts are required in existing code
* to X11's WNativeWindow / XID on Linux. No casts are required in existing code
* during the transition; the type name alone marks the semantic boundary.
*/
@ -19,7 +19,7 @@
*
* Policy code must not pass this directly to any display-system API.
* X11 backend code uses WNW_TO_XID() (defined in x11_compat.h) to
* recover the native Window value.
* recover the native WNativeWindow value.
*/
#ifndef WM_NATIVE_WINDOW_DEFINED
#define WM_NATIVE_WINDOW_DEFINED
@ -198,7 +198,7 @@ typedef struct {
/* ------------------------------------------------------------------ */
/* WNETWindowType -- _NET_WM_WINDOW_TYPE enum for policy layer */
/* */
/* The X11 backend maps Atom values to these IDs in x11_props.c */
/* The X11 backend maps WMNativeAtom values to these IDs in x11_props.c */
/* before storing them in WWindow.window_type. */
/* ------------------------------------------------------------------ */
typedef enum {
@ -382,12 +382,12 @@ typedef struct {
* Policy code passes this to wFrameWindowCreate so the frame window is
* created with a matching visual. 'visual' is an opaque pointer; the
* X11 backend fills it with Visual*, framewin.c casts it back.
* 'colormap' is an unsigned long; on X11 it holds the Colormap XID.
* 'colormap' is an unsigned long; on X11 it holds the WMNativeColormap XID.
*/
typedef struct {
int depth;
void *visual; /* X11: Visual * */
unsigned long colormap; /* X11: Colormap */
unsigned long colormap; /* X11: WMNativeColormap */
} WClientVisual;
/* map_state constants (matching X11 protocol values) */

View File

@ -1,5 +1,5 @@
/*
* wl_backend.c -- wlroots-based Wayland compositor backend for Window Maker
* wl_backend.c -- wlroots-based Wayland compositor backend for WNativeWindow Maker
*
* Phase 31: complete stub vtable. Every slot compiles and returns a safe
* zero/null/false value. Subsequent phases will replace stubs with real
@ -552,11 +552,11 @@ struct wl_compositor_state {
/* Focus sink: small off-screen InputOnly X window that receives focus
* when no application window is focused. Mirrors what x11_backend does
* for no_focus_win so that XSetInputFocus calls on this window succeed. */
Window no_focus_xwin; /* 0 until screen_create_internals */
WNativeWindow no_focus_xwin; /* 0 until screen_create_internals */
/* wrlib RContext drawable — an ordinary InputOutput window that XWM must
* not manage (no WM_CLASS, no backing wl_surface). Stored here so
* handle_xwayland_new_surface can filter it before allocating a view. */
Window rcontext_xwin; /* 0 until screen_alloc_gcs */
WNativeWindow rcontext_xwin; /* 0 until screen_alloc_gcs */
/* Deferred dock creation: set in screen_create_internals, consumed in
* wl_event_loop_run() after the startup pump thread stops (to avoid racing
* with the pump thread's frame-timer callback on the scene graph). */
@ -1701,7 +1701,7 @@ handle_xwayland_new_surface(struct wl_listener *listener, void *data)
if (wl_state.x_display) {
XSetWindowAttributes or_attr;
or_attr.override_redirect = True;
XChangeWindowAttributes(wl_state.x_display, (Window)xw->window_id,
XChangeWindowAttributes(wl_state.x_display, (WNativeWindow)xw->window_id,
CWOverrideRedirect, &or_attr);
XFlush(wl_state.x_display);
}
@ -2187,7 +2187,7 @@ handle_backend_new_output(struct wl_listener *listener, void *data)
/* Set window title when running as a nested compositor. */
if (wl_state.is_nested && wl_state.wl_backend_inner &&
wlr_backend_is_wl(wl_state.wl_backend_inner))
wlr_wl_output_set_title(output, "Window Maker");
wlr_wl_output_set_title(output, "WNativeWindow Maker");
/* Create scene output and wire the frame renderer. */
if (wl_state.scene) {
@ -3784,7 +3784,7 @@ wm_dock_load_icon(struct wl_toplevel_view *v, int *out_w, int *out_h)
if (!v->xw_surface || !wl_state.x_display)
return NULL; /* XDG native: no X11 icon path */
RImage *ri = get_window_image_from_x11(wl_state.x_display, (Window)v->id);
RImage *ri = get_window_image_from_x11(wl_state.x_display, (WNativeWindow)v->id);
if (!ri)
return NULL;
@ -6484,7 +6484,7 @@ wl_window_get_icon_image(WNativeWindow win)
* For native Wayland clients there is no equivalent (the upcoming
* xdg-toplevel-icon protocol is not yet wired). */
if (!wl_state.x_display) return NULL;
return get_window_image_from_x11(wl_state.x_display, (Window)win);
return get_window_image_from_x11(wl_state.x_display, (WNativeWindow)win);
}
static int
@ -6549,7 +6549,7 @@ wl_prop_get_wm_state(WNativeWindow win, long **data_out)
}
/* ------------------------------------------------------------------ */
/* Window map / unmap / geometry */
/* WNativeWindow map / unmap / geometry */
/* ------------------------------------------------------------------ */
static void
@ -7361,14 +7361,14 @@ wl_screen_alloc_gcs(WScreen *scr)
* prevents BadDrawable/RenderBadPicture cascade and the resulting broken
* pipe from the nested Wayland backend. */
if (scr->w_win) {
wl_state.rcontext_xwin = (Window)scr->w_win;
wl_state.rcontext_xwin = (WNativeWindow)scr->w_win;
XSetWindowAttributes or_attr;
or_attr.override_redirect = True;
XChangeWindowAttributes(wl_state.x_display, (Window)scr->w_win, CWOverrideRedirect, &or_attr);
XChangeWindowAttributes(wl_state.x_display, (WNativeWindow)scr->w_win, CWOverrideRedirect, &or_attr);
XFlush(wl_state.x_display);
}
scr->stipple_bitmap = XCreateBitmapFromData(wl_state.x_display, (Window)scr->w_win,
scr->stipple_bitmap = XCreateBitmapFromData(wl_state.x_display, (WNativeWindow)scr->w_win,
stipple_data, 2, 2);
gcv.stipple = scr->stipple_bitmap;
@ -7376,7 +7376,7 @@ wl_screen_alloc_gcs(WScreen *scr)
gcv.fill_style = FillStippled;
gcv.graphics_exposures = False;
gcm = GCForeground | GCStipple | GCFillStyle | GCGraphicsExposures;
scr->stipple_gc = XCreateGC(wl_state.x_display, (Window)scr->w_win, gcm, &gcv);
scr->stipple_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->w_win, gcm, &gcv);
gcv.function = GXcopy;
gcv.foreground = scr->white_pixel;
@ -7389,7 +7389,7 @@ wl_screen_alloc_gcs(WScreen *scr)
gcv.graphics_exposures = False;
gcm = GCFunction | GCGraphicsExposures | GCForeground | GCBackground
| GCLineWidth | GCLineStyle | GCFillStyle | GCDashOffset | GCDashList;
scr->icon_select_gc = XCreateGC(wl_state.x_display, (Window)scr->w_win, gcm, &gcv);
scr->icon_select_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->w_win, gcm, &gcv);
gcv.function = GXxor;
gcv.plane_mask = AllPlanes;
@ -7399,7 +7399,7 @@ wl_screen_alloc_gcs(WScreen *scr)
gcv.line_width = DEF_FRAME_THICKNESS;
gcv.subwindow_mode = IncludeInferiors;
gcv.graphics_exposures = False;
scr->frame_gc = XCreateGC(wl_state.x_display, (Window)scr->root_win,
scr->frame_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->root_win,
GCForeground | GCGraphicsExposures | GCFunction
| GCSubwindowMode | GCLineWidth | GCPlaneMask, &gcv);
@ -7413,17 +7413,17 @@ wl_screen_alloc_gcs(WScreen *scr)
gcv.graphics_exposures = False;
gcm = GCForeground | GCFunction | GCSubwindowMode | GCLineWidth
| GCCapStyle | GCGraphicsExposures;
scr->line_gc = XCreateGC(wl_state.x_display, (Window)scr->root_win, gcm, &gcv);
scr->line_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->root_win, gcm, &gcv);
scr->line_pixel = gcv.foreground;
gcv.foreground = scr->white_pixel;
gcv.background = scr->black_pixel;
gcv.graphics_exposures = False;
scr->copy_gc = XCreateGC(wl_state.x_display, (Window)scr->w_win,
scr->copy_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->w_win,
GCForeground | GCBackground | GCGraphicsExposures, &gcv);
gcv.graphics_exposures = False;
scr->draw_gc = XCreateGC(wl_state.x_display, (Window)scr->w_win, GCGraphicsExposures, &gcv);
scr->draw_gc = XCreateGC(wl_state.x_display, (WNativeWindow)scr->w_win, GCGraphicsExposures, &gcv);
scr->mono_gc = XCreateGC(wl_state.x_display, scr->stipple_bitmap, GCGraphicsExposures, &gcv);
}
@ -7439,7 +7439,7 @@ wl_screen_create_internals(WScreen *scr)
int vmask = CWEventMask | CWOverrideRedirect;
attribs.event_mask = WM_EVMASK_KEY_PRESS | WM_EVMASK_FOCUS_CHANGE;
attribs.override_redirect = True;
Window xwin = XCreateWindow(wl_state.x_display, DefaultRootWindow(wl_state.x_display),
WNativeWindow xwin = XCreateWindow(wl_state.x_display, DefaultRootWindow(wl_state.x_display),
-10, -10, 4, 4, 0,
0, InputOnly, CopyFromParent, vmask, &attribs);
if (xwin) {
@ -7469,7 +7469,7 @@ wl_screen_create_internals(WScreen *scr)
if (wl_state.x_display) {
XSetWindowAttributes iattr;
iattr.override_redirect = True;
Window xwin = XCreateWindow(wl_state.x_display, DefaultRootWindow(wl_state.x_display),
WNativeWindow xwin = XCreateWindow(wl_state.x_display, DefaultRootWindow(wl_state.x_display),
-2, -2, 1, 1, 0,
0, InputOutput, CopyFromParent,
CWOverrideRedirect, &iattr);
@ -8075,13 +8075,13 @@ static void wl_netwm_update_opacity(WWindow *wwin)
float alpha = 1.0f;
if (wl_state.x_display && wwin->client_win) {
Atom type;
WMNativeAtom type;
int format;
unsigned long items, rest;
unsigned char *prop = NULL;
Atom opacity_atom = XInternAtom(wl_state.x_display,
WMNativeAtom opacity_atom = XInternAtom(wl_state.x_display,
"_NET_WM_WINDOW_OPACITY", False);
if (XGetWindowProperty(wl_state.x_display, (Window)wwin->client_win,
if (XGetWindowProperty(wl_state.x_display, (WNativeWindow)wwin->client_win,
opacity_atom, 0L, 1L, False, AnyPropertyType,
&type, &format, &items, &rest, &prop) == Success
&& format == 32 && items == 1 && prop) {
@ -8656,7 +8656,7 @@ static void wl_balloon_init(WScreen *scr)
wl_list_insert(&wl_state.frame_list, &fb->link);
W_RegisterBacking(fb->id, fb->image);
scr->balloon->window = (Window)fb->id;
scr->balloon->window = (WNativeWindow)fb->id;
}
}
static void wl_noop_do_kaboom(WScreen *scr, WNativeWindow win, int x, int y)
@ -8890,10 +8890,10 @@ static WScreen *wl_noop_screen_for_window(WNativeWindow window)
static int wl_parse_color(WScreen *scr, const char *name, XColor *color_out)
{ (void)scr; return wl_get_color_for_colormap(0, name, color_out); }
static int wl_noop_cursor_create_from_files(WScreen *scr, const char *bitmap_path,
const char *mask_path, Cursor *cursor_out)
const char *mask_path, WMNativeCursor *cursor_out)
{ (void)scr; (void)bitmap_path; (void)mask_path; (void)cursor_out; return 0; }
static void wl_noop_cursor_free(Cursor cursor) { (void)cursor; }
static void wl_noop_cursor_set(WNativeWindow window, Cursor cursor) { (void)window; (void)cursor; }
static void wl_noop_cursor_free(WMNativeCursor cursor) { (void)cursor; }
static void wl_noop_cursor_set(WNativeWindow window, WMNativeCursor cursor) { (void)window; (void)cursor; }
static void wl_pointer_change_cursor(int cursor_id)
{
const char *name;
@ -9009,8 +9009,8 @@ static void wl_client_message_forward(WMEvent *event, WNativeWindow target_win)
if (!wl_state.x_display || !event) return;
XEvent *xev = (XEvent *)event->_x11_raw;
if (!xev) return;
xev->xclient.window = (Window)target_win;
XSendEvent(wl_state.x_display, (Window)target_win, False, 0L, xev);
xev->xclient.window = (WNativeWindow)target_win;
XSendEvent(wl_state.x_display, (WNativeWindow)target_win, False, 0L, xev);
}
static void wl_client_send_key(WNativeWindow win, unsigned int keycode,
unsigned int modifier_mask, int press)
@ -9023,14 +9023,14 @@ static void wl_client_send_key(WNativeWindow win, unsigned int keycode,
memset(&ev, 0, sizeof(ev));
ev.xkey.type = press ? KeyPress : KeyRelease;
ev.xkey.display = wl_state.x_display;
ev.xkey.window = (Window)win;
ev.xkey.window = (WNativeWindow)win;
ev.xkey.root = DefaultRootWindow(wl_state.x_display);
ev.xkey.subwindow = WM_NATIVE_NONE;
ev.xkey.same_screen = True;
ev.xkey.time = WM_CURRENT_TIME;
ev.xkey.keycode = keycode;
ev.xkey.state = modifier_mask;
XSendEvent(wl_state.x_display, (Window)win, press ? False : True,
XSendEvent(wl_state.x_display, (WNativeWindow)win, press ? False : True,
press ? WM_EVMASK_KEY_PRESS : WM_EVMASK_KEY_RELEASE, &ev);
}
static int wl_noop_window_exists(WNativeWindow win) { (void)win; return 1; }

View File

@ -1,5 +1,5 @@
/*
* wl_backend.h -- wlroots-based Wayland compositor backend for Window Maker
* wl_backend.h -- wlroots-based Wayland compositor backend for WNativeWindow Maker
*
* Declares the WMBackend vtable instance implemented in wl_backend.c.
* Include this only from files that need to reference wl_backend directly

View File

@ -1,8 +1,8 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
* Copyright (c) 2014-2016 Window Maker Team
* Copyright (c) 2014-2016 WNativeWindow Maker Team
*
* 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

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -22,17 +22,17 @@
#define _BALLOON_H_
typedef struct _WBalloon {
Window window;
WNativeWindow window;
#ifdef SHAPED_BALLOON
GC monoGC;
#endif
int prevType;
Window objectWindow;
WNativeWindow objectWindow;
char *text;
int h;
WMHandlerID timer;
Pixmap contents;
Pixmap mini_preview;
WMNativePixmap contents;
WMNativePixmap mini_preview;
char mapped;
char ignoreTimer;
} WBalloon;

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -62,7 +62,7 @@ void wClientRestore(WWindow * wwin)
* WWindow.state variable.
*----------------------------------------------------------------------
*/
void wClientSetState(WWindow * wwin, int state, Window icon_win)
void wClientSetState(WWindow * wwin, int state, WNativeWindow icon_win)
{
long data[2];
@ -211,7 +211,7 @@ void wClientConfigure(WWindow * wwin, WMEvent * event)
}
}
void wClientSendProtocol(WWindow * wwin, Atom protocol, Time time)
void wClientSendProtocol(WWindow * wwin, WMNativeAtom protocol, Time time)
{
wm_backend->client_send_protocol(wwin, (unsigned long)protocol, (unsigned long)time);
}
@ -437,10 +437,10 @@ void wClientCheckProperty(WWindow * wwin, WMEvent * event)
case WA_WM_TRANSIENT_FOR:
{
Window new_owner;
WNativeWindow new_owner;
WWindow *owner;
new_owner = (Window)wm_backend->prop_get_transient_for(wwin->client_win);
new_owner = (WNativeWindow)wm_backend->prop_get_transient_for(wwin->client_win);
if (new_owner == 0 || new_owner == wwin->client_win) {
new_owner = wwin->screen_ptr->root_win;
}

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -21,12 +21,12 @@
#ifndef WMCLIENT_H_
#define WMCLIENT_H_
void wClientSetState(WWindow *wwin, int state, Window icon_win);
void wClientSetState(WWindow *wwin, int state, WNativeWindow icon_win);
void wClientRestore(WWindow *wwin);
void wClientConfigure(WWindow *wwin, WMEvent *event);
void wClientGetGravityOffsets(WWindow *wwin, int *ofs_x, int *ofs_y);
void wClientSendProtocol(WWindow *wwin, Atom protocol, Time time);
void wClientSendProtocol(WWindow *wwin, WMNativeAtom protocol, Time time);
void wClientKill(WWindow *wwin);
void wClientCheckProperty(WWindow *wwin, WMEvent *event);

View File

@ -1,6 +1,6 @@
/* colormap.c - colormap handling code
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*

View File

@ -1,6 +1,6 @@
/* cycling.c- window cycling
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 2000-2003 Alfredo K. Kojima
*

View File

@ -1,8 +1,8 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2013 Window Maker Team
* Copyright (c) 2013 WNativeWindow Maker Team
*
* 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

View File

@ -1,10 +1,10 @@
/* defaults.c - manage configuration through defaults db
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
*
* This program is free software; you can redistribute it and/or modify
@ -2178,7 +2178,7 @@ static int getColor(WScreen * scr, WDefaultEntry * entry, WMPropList * value, vo
static int getKeybind(WScreen * scr, WDefaultEntry * entry, WMPropList * value, void *addr, void **ret)
{
static WShortKey shortcut;
KeySym ksym;
WMNativeKeysym ksym;
const char *val;
char *k;
char buf[MAX_SHORTCUT_LENGTH], *b;
@ -2218,7 +2218,7 @@ static int getKeybind(WScreen * scr, WDefaultEntry * entry, WMPropList * value,
}
/* get key */
ksym = (KeySym)wm_backend->keysym_from_name(b);
ksym = (WMNativeKeysym)wm_backend->keysym_from_name(b);
if (ksym == NoSymbol) {
wwarning(_("%s:invalid kbd shortcut specification \"%s\""), entry->key, val);
@ -2269,7 +2269,7 @@ static int getModMask(WScreen * scr, WDefaultEntry * entry, WMPropList * value,
/* cursor_table and XC_* constants moved to x11_backend.c (Phase 24) */
static void check_bitmap_status(int status, const char *filename, Pixmap bitmap)
static void check_bitmap_status(int status, const char *filename, WMNativePixmap bitmap)
{
switch (status) {
case BitmapOpenFailed:
@ -2292,7 +2292,7 @@ static void check_bitmap_status(int status, const char *filename, Pixmap bitmap)
* (builtin, <cursor_name>)
* (bitmap, <cursor_bitmap>, <cursor_mask>)
*/
static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
static int parse_cursor(WScreen * scr, WMPropList * pl, WMNativeCursor * cursor)
{
WMPropList *elem;
char *val;
@ -2334,8 +2334,8 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
char *mask_name;
int bitmap_status;
int mask_status;
Pixmap bitmap;
Pixmap mask;
WMNativePixmap bitmap;
WMNativePixmap mask;
unsigned int w, h;
int x, y;
XColor fg, bg;
@ -2377,7 +2377,7 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
static int getCursor(WScreen * scr, WDefaultEntry * entry, WMPropList * value, void *addr, void **ret)
{
static Cursor cursor;
static WMNativeCursor cursor;
int status;
int changed = 0;
@ -2408,7 +2408,7 @@ static int getCursor(WScreen * scr, WDefaultEntry * entry, WMPropList * value, v
*ret = &cursor;
}
if (addr) {
*(Cursor *) addr = cursor;
*(WMNativeCursor *) addr = cursor;
}
return (True);
}
@ -2506,7 +2506,7 @@ static int setStickyIcons(WScreen * scr, WDefaultEntry * entry, void *bar, void
static int setIconTile(WScreen * scr, WDefaultEntry * entry, void *tdata, void *foo)
{
Pixmap pixmap;
WMNativePixmap pixmap;
RImage *img;
WTexture ** texture = tdata;
int reset = 0;
@ -3418,7 +3418,7 @@ static int setDoubleClick(WScreen *scr, WDefaultEntry *entry, void *tdata, void
static int setCursor(WScreen * scr, WDefaultEntry * entry, void *tdata, void *extra_data)
{
Cursor *cursor = tdata;
WMNativeCursor *cursor = tdata;
long widx = (long) extra_data;
/* Parameter not used, but tell the compiler that it is ok */

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,10 +1,10 @@
/* dialog.c - dialog windows for internal use
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
*
* 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
@ -70,7 +70,7 @@ static WMPoint getCenter(WScreen * scr, int width, int height)
int wMessageDialog(WScreen *scr, const char *title, const char *message, const char *defBtn, const char *altBtn, const char *othBtn)
{
WMAlertPanel *panel;
Window parent;
WNativeWindow parent;
WWindow *wwin;
int result;
WMPoint center;
@ -80,7 +80,7 @@ int wMessageDialog(WScreen *scr, const char *title, const char *message, const c
pwidth = WMWidgetWidth(panel->win);
pheight = WMWidgetHeight(panel->win);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
@ -120,7 +120,7 @@ int wExitDialog(WScreen *scr, const char *title, const char *message, const char
{
WMAlertPanel *panel;
WMButton *saveSessionBtn;
Window parent;
WNativeWindow parent;
WWindow *wwin;
WMPoint center;
int result;
@ -139,7 +139,7 @@ int wExitDialog(WScreen *scr, const char *title, const char *message, const char
WMRealizeWidget(saveSessionBtn);
WMMapWidget(saveSessionBtn);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
@ -358,9 +358,9 @@ static void handleHistoryKeyPress(WMEvent * event, void *clientData)
char *text;
unsigned pos;
WMInputPanelWithHistory *p = (WMInputPanelWithHistory *) clientData;
KeySym ksym;
WMNativeKeysym ksym;
ksym = (KeySym)wm_backend->keysym_from_keycode(event->u.key.keycode, 0);
ksym = (WMNativeKeysym)wm_backend->keysym_from_keycode(event->u.key.keycode, 0);
switch (ksym) {
case WM_KEY_UP:
@ -428,7 +428,7 @@ static void handleHistoryKeyPress(WMEvent * event, void *clientData)
int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, const char *name, char **text)
{
WWindow *wwin;
Window parent;
WNativeWindow parent;
char *result;
WMPoint center;
WMInputPanelWithHistory *p;
@ -449,7 +449,7 @@ int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, c
pwidth = WMWidgetWidth(p->panel->win);
pheight = WMWidgetHeight(p->panel->win);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->window_select_events((WNativeWindow)parent, WM_EVMASK_KEY_PRESS | WM_EVMASK_KEY_RELEASE);
@ -496,7 +496,7 @@ int wAdvancedInputDialog(WScreen *scr, const char *title, const char *message, c
int wInputDialog(WScreen *scr, const char *title, const char *message, char **text)
{
WWindow *wwin;
Window parent;
WNativeWindow parent;
WMInputPanel *panel;
char *result;
WMPoint center;
@ -506,7 +506,7 @@ int wInputDialog(WScreen *scr, const char *title, const char *message, char **te
pwidth = WMWidgetWidth(panel->win);
pheight = WMWidgetHeight(panel->win);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->window_select_events((WNativeWindow)parent, WM_EVMASK_KEY_PRESS | WM_EVMASK_KEY_RELEASE);
@ -731,7 +731,7 @@ static void listIconPaths(WMList * lPtr)
wfree(paths);
}
static void drawIconProc(WMList * lPtr, int index, Drawable d, char *text, int state, WMRect * rect)
static void drawIconProc(WMList * lPtr, int index, WMDrawable d, char *text, int state, WMRect * rect)
{
IconPanel *panel = WMGetHangedData(lPtr);
WScreen *scr = panel->scr;
@ -844,7 +844,7 @@ static void keyPressHandler(WMEvent * event, void *data)
{
IconPanel *panel = (IconPanel *) data;
char buffer[32];
KeySym ksym;
WMNativeKeysym ksym;
int iidx;
int didx;
int item = 0;
@ -854,7 +854,7 @@ static void keyPressHandler(WMEvent * event, void *data)
return;
buffer[0] = 0;
ksym = (KeySym)wm_backend->keysym_from_keycode(event->u.key.keycode, 0);
ksym = (WMNativeKeysym)wm_backend->keysym_from_keycode(event->u.key.keycode, 0);
iidx = WMGetListSelectedItemRow(panel->iconList);
didx = WMGetListSelectedItemRow(panel->dirList);
@ -914,7 +914,7 @@ static void keyPressHandler(WMEvent * event, void *data)
Bool wIconChooserDialog(WScreen *scr, char **file, const char *instance, const char *class)
{
WWindow *wwin;
Window parent;
WNativeWindow parent;
IconPanel *panel;
WMColor *color;
WMFont *boldFont;
@ -1025,7 +1025,7 @@ Bool wIconChooserDialog(WScreen *scr, char **file, const char *instance, const c
WMRealizeWidget(panel->win);
WMMapSubwidgets(panel->win);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
@ -1147,7 +1147,7 @@ typedef struct {
#define COPYRIGHT_TEXT \
"Copyright \xc2\xa9 1997-2006 Alfredo K. Kojima\n"\
"Copyright \xc2\xa9 1998-2006 Dan Pascu\n"\
"Copyright \xc2\xa9 2013-%hu Window Maker Developers Team"
"Copyright \xc2\xa9 2013-%hu WNativeWindow Maker Developers Team"
static InfoPanel *infoPanel = NULL;
@ -1224,7 +1224,7 @@ void wShowInfoPanel(WScreen *scr)
char *strbuf = NULL;
const char *separator;
char buffer[256];
Window parent;
WNativeWindow parent;
WWindow *wwin;
WMPoint center;
char **strl;
@ -1296,7 +1296,7 @@ void wShowInfoPanel(WScreen *scr)
"Lucida Sans,Comic Sans MS,URW Gothic L,Trebuchet MS:italic:pixelsize=%d:antialias=true",
WMScaleY(24));
font = WMCreateFont(scr->wmscreen, buffer);
strbuf = "Window Maker";
strbuf = "WNativeWindow Maker";
if (font) {
width = WMWidthOfString(font, strbuf, strlen(strbuf));
WMSetLabelFont(panel->name1L, font);
@ -1322,7 +1322,7 @@ void wShowInfoPanel(WScreen *scr)
font = NULL;
}
WMSetLabelTextAlignment(panel->name2L, WACenter);
WMSetLabelText(panel->name2L, _("Window Manager for X"));
WMSetLabelText(panel->name2L, _("WNativeWindow Manager for X"));
snprintf(buffer, sizeof(buffer), _("Version %s"), VERSION);
panel->versionL = WMCreateLabel(panel->win);
@ -1479,7 +1479,7 @@ void wShowInfoPanel(WScreen *scr)
WMRealizeWidget(panel->win);
WMMapSubwidgets(panel->win);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
@ -1537,7 +1537,7 @@ static void destroyLegalPanel(WCoreWindow * foo, void *data, WMEvent * event)
void wShowLegalPanel(WScreen *scr)
{
LegalPanel *panel;
Window parent;
WNativeWindow parent;
WWindow *wwin;
WMPoint center;
int wmScaleWidth, wmScaleHeight;
@ -1570,11 +1570,11 @@ void wShowLegalPanel(WScreen *scr)
WMMoveWidget(panel->licenseL, WMScaleX(8), WMScaleY(8));
WMSetLabelTextAlignment(panel->licenseL, WALeft);
WMSetLabelText(panel->licenseL,
_(" Window Maker is free software; you can redistribute it and/or "
_(" WNativeWindow Maker 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.\n\n"
" Window Maker is distributed in the hope that it will be useful, "
" WNativeWindow Maker 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.\n\n"
@ -1587,7 +1587,7 @@ void wShowLegalPanel(WScreen *scr)
WMMapSubwidgets(panel->win);
WMMapSubwidgets(panel->frame);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->client_reparent((WNativeWindow)WMWidgetXID(panel->win), (WNativeWindow)parent, 0, 0);
center = getCenter(scr, pwidth, pheight);
@ -1745,7 +1745,7 @@ int wShowCrashingDialogPanel(int whatSig)
WMResizeWidget(panel->noteL, PWIDTH - 20, 40);
WMMoveWidget(panel->noteL, 10, 90);
WMSetLabelTextAlignment(panel->noteL, WAJustified);
snprintf(buf, sizeof(buf), _("Window Maker received signal %i."), whatSig);
snprintf(buf, sizeof(buf), _("WNativeWindow Maker received signal %i."), whatSig);
WMSetLabelText(panel->noteL, buf);
panel->note2L = WMCreateLabel(panel->win);
@ -1770,7 +1770,7 @@ int wShowCrashingDialogPanel(int whatSig)
WMSetPopUpButtonPullsDown(panel->whatP, False);
WMSetPopUpButtonText(panel->whatP, _("Select action"));
WMAddPopUpButtonItem(panel->whatP, _("Abort and leave a core file"));
WMAddPopUpButtonItem(panel->whatP, _("Restart Window Maker"));
WMAddPopUpButtonItem(panel->whatP, _("Restart WNativeWindow Maker"));
WMAddPopUpButtonItem(panel->whatP, _("Start alternate window manager"));
WMSetPopUpButtonAction(panel->whatP, setCrashAction, panel);
WMSetPopUpButtonSelectedItem(panel->whatP, WMRestart);

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*

View File

@ -1,10 +1,10 @@
/* dock.c- built-in Dock module for WindowMaker
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
* Copyright (c) 2009-2023 Window Maker Team
* Copyright (c) 2009-2023 WNativeWindow Maker Team
*
* 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
@ -195,7 +195,7 @@ static void toggleLoweredCallback(WMenu *menu, WMenuEntry *entry)
static int matchWindow(const void *item, const void *cdata)
{
return (((WFakeGroupLeader *) item)->leader == (Window) cdata);
return (((WFakeGroupLeader *) item)->leader == (WNativeWindow) cdata);
}
static void killCallback(WMenu *menu, WMenuEntry *entry)
@ -230,7 +230,7 @@ static void killCallback(WMenu *menu, WMenuEntry *entry)
fPtr = icon->icon->owner->fake_group;
} else {
/* is this really necessary? can we kill a non-running dock icon? */
Window win = icon->main_window;
WNativeWindow win = icon->main_window;
int index;
index = WMFindInArray(scr->fakeGroupLeaders, matchWindow, (void *)win);
@ -3104,7 +3104,7 @@ void wDockFinishLaunch(WAppIcon *icon)
dockIconPaint(icon);
}
WAppIcon *wDockFindIconForWindow(WDock *dock, Window window)
WAppIcon *wDockFindIconForWindow(WDock *dock, WNativeWindow window)
{
WAppIcon *icon;
int i;
@ -3117,7 +3117,7 @@ WAppIcon *wDockFindIconForWindow(WDock *dock, Window window)
return NULL;
}
void wDockTrackWindowLaunch(WDock *dock, Window window)
void wDockTrackWindowLaunch(WDock *dock, WNativeWindow window)
{
WAppIcon *icon;
char *wm_class, *wm_instance;
@ -3592,7 +3592,7 @@ static void handleDockMove(WDock *dock, WAppIcon *aicon, WMEvent *event)
int shad_x = x, shad_y = y;
WMEvent ev;
int grabbed = 0, done, previously_on_right, now_on_right, previous_x_pos, i;
Pixmap ghost = WM_NATIVE_NONE;
WMNativePixmap ghost = WM_NATIVE_NONE;
int superfluous = wPreferences.superfluous; /* we catch it to avoid problems */
if (!wm_backend->pointer_grab((WNativeWindow)aicon->icon->core->window, WNATIVE_NONE, WM_EVMASK_BUTTON_MOTION | WM_EVMASK_BUTTON_RELEASE | WM_EVMASK_BUTTON_PRESS, WCUR_NORMAL, True, 0))
@ -3602,7 +3602,7 @@ static void handleDockMove(WDock *dock, WAppIcon *aicon, WMEvent *event)
wwarning("pointer grab failed for dock move");
if (dock->type == WM_DRAWER) {
Window wins[2];
WNativeWindow wins[2];
wins[0] = icon->core->window;
wins[1] = scr->dock_shadow;
wm_backend->stacking_restack((WNativeWindow *)wins, 2);
@ -3755,7 +3755,7 @@ static void handleDockMove(WDock *dock, WAppIcon *aicon, WMEvent *event)
break;
wm_backend->pointer_ungrab(0);
if (dock->type == WM_DRAWER) {
Window wins[dock->icon_count];
WNativeWindow wins[dock->icon_count];
int offset_index;
/*
@ -4559,7 +4559,7 @@ void wSlideAppicons(WAppIcon **appicons, int n, int to_the_left)
{
int i;
int leftmost = -1, min_index = 9999, from_x = -1; // leftmost and from_x initialized to avoid warning
Window wins[n];
WNativeWindow wins[n];
WAppIcon *aicon;
if (n < 1)

View File

@ -1,6 +1,6 @@
/* dock.h- built-in Dock module for WindowMaker
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
@ -87,8 +87,8 @@ void wSlideAppicons(WAppIcon **appicons, int n, int to_the_left);
void wDrawerFillTheGap(WDock *drawer, WAppIcon *aicon, Bool redocking);
void wDockFinishLaunch(WAppIcon *icon);
void wDockTrackWindowLaunch(WDock *dock, Window window);
WAppIcon *wDockFindIconForWindow(WDock *dock, Window window);
void wDockTrackWindowLaunch(WDock *dock, WNativeWindow window);
WAppIcon *wDockFindIconForWindow(WDock *dock, WNativeWindow window);
void wDockDoAutoLaunch(WDock *dock, int workspace);
void wDockLaunchWithState(WAppIcon *btn, WSavedState *state);
void wDockSwap(WDock *dock);

View File

@ -1,6 +1,6 @@
/* dockedapp.c- docked application settings panel
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1998-2003 Alfredo K. Kojima
*
@ -215,7 +215,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
{
AppSettingsPanel *panel;
WScreen *scr = aicon->icon->core->screen_ptr;
Window parent;
WNativeWindow parent;
WMFont *font;
int x, y;
WMBox *vbox;
@ -274,7 +274,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
panel->autoLaunchBtn = WMCreateSwitchButton(vbox);
WMAddBoxSubview(vbox, WMWidgetView(panel->autoLaunchBtn), False, True, WMScaleY(20), WMScaleY(20), WMScaleY(2));
WMSetButtonText(panel->autoLaunchBtn, _("Start when Window Maker is started"));
WMSetButtonText(panel->autoLaunchBtn, _("Start when WNativeWindow Maker is started"));
WMSetButtonSelected(panel->autoLaunchBtn, aicon->auto_launch);
panel->lockBtn = WMCreateSwitchButton(vbox);
@ -366,7 +366,7 @@ void ShowDockAppSettingsPanel(WAppIcon * aicon)
updateSettingsPanelIcon(panel);
parent = (Window)wm_backend->fake_leader_create(scr);
parent = (WNativeWindow)wm_backend->fake_leader_create(scr);
wm_backend->window_resize((WNativeWindow)parent, pwidth, pheight);
wm_backend->window_select_events((WNativeWindow)parent, WM_EVMASK_KEY_PRESS | WM_EVMASK_KEY_RELEASE);

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 1998-2003 Dan Pascu
@ -53,7 +53,7 @@ typedef struct _AppSettingsPanel {
WMButton *okBtn;
WMButton *cancelBtn;
Window parent;
WNativeWindow parent;
/* kluge */
unsigned int destroyed:1;

View File

@ -1,9 +1,9 @@
/* event.c- event loop and handling
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2014-2023 Window Maker Team
* Copyright (c) 2014-2023 WNativeWindow Maker Team
*
* 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
@ -431,7 +431,7 @@ static void handleMapRequest(WMEvent * ev)
{
WWindow *wwin;
WScreen *scr = NULL;
Window window = ev->u.mapRequest.window;
WNativeWindow window = ev->u.mapRequest.window;
wwin = wWindowFor(window);
if (wwin != NULL) {
@ -505,7 +505,7 @@ static void handleDestroyNotify(WMEvent * event)
{
WWindow *wwin;
WApplication *app;
Window window = event->u.lifecycle.window;
WNativeWindow window = event->u.lifecycle.window;
WScreen *scr = wScreenForRootWindow(event->u.lifecycle.event);
int widx;
@ -815,7 +815,7 @@ static void handlePropertyNotify(WMEvent * event)
{
WWindow *wwin;
WApplication *wapp;
Window jr;
WNativeWindow jr;
int ji;
unsigned int ju;
wwin = wWindowFor(event->u.property.window);
@ -1150,9 +1150,9 @@ static WWindow *windowUnderPointer(WScreen * scr)
{
unsigned int mask;
int foo;
Window bar, win;
WNativeWindow bar, win;
win = (Window)wm_backend->pointer_query_window((WNativeWindow)scr->root_win); if (win)
win = (WNativeWindow)wm_backend->pointer_query_window((WNativeWindow)scr->root_win); if (win)
return wWindowFor(win);
return NULL;
}

View File

@ -1,8 +1,8 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
* Copyright (c) 2013 Window Maker Team
* Copyright (c) 2013 WNativeWindow Maker Team
*
* 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

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -55,9 +55,9 @@ static void paintButton(WCoreWindow * button, WTexture * texture,
static void updateTitlebar(WFrameWindow * fwin);
static void allocFrameBorderPixel(Colormap colormap, const char *color_name, unsigned long **pixel);
static void allocFrameBorderPixel(WMNativeColormap colormap, const char *color_name, unsigned long **pixel);
static void allocFrameBorderPixel(Colormap colormap, const char *color_name, unsigned long **pixel) {
static void allocFrameBorderPixel(WMNativeColormap colormap, const char *color_name, unsigned long **pixel) {
wm_backend->frame_alloc_border_pixel((unsigned long)colormap, color_name, pixel);
}
@ -66,7 +66,7 @@ WFrameWindow *wFrameWindowCreate(WScreen * scr, int wlevel, int x, int y,
int *title_min, int *title_max, int flags,
WTexture ** title_texture, WTexture ** resize_texture,
WMColor ** color, WMFont ** font,
int depth, Visual *visual, Colormap colormap)
int depth, Visual *visual, WMNativeColormap colormap)
{
WFrameWindow *fwin;
@ -620,10 +620,10 @@ static void
#ifdef XKB_BUTTON_HINT
renderTexture(WScreen * scr, WTexture * texture, int width, int height,
int bwidth, int bheight, int left, int language, int right,
Pixmap * title, Pixmap * lbutton, Pixmap * languagebutton, Pixmap * rbutton)
WMNativePixmap * title, WMNativePixmap * lbutton, WMNativePixmap * languagebutton, WMNativePixmap * rbutton)
#else
renderTexture(WScreen * scr, WTexture * texture, int width, int height,
int bwidth, int bheight, int left, int right, Pixmap * title, Pixmap * lbutton, Pixmap * rbutton)
int bwidth, int bheight, int left, int right, WMNativePixmap * title, WMNativePixmap * lbutton, WMNativePixmap * rbutton)
#endif
{
RImage *img;
@ -722,7 +722,7 @@ renderTexture(WScreen * scr, WTexture * texture, int width, int height,
}
static void
renderResizebarTexture(WScreen * scr, WTexture * texture, int width, int height, int cwidth, Pixmap * pmap)
renderResizebarTexture(WScreen * scr, WTexture * texture, int width, int height, int cwidth, WMNativePixmap * pmap)
{
RImage *img;
RColor light;
@ -772,9 +772,9 @@ static void updateTexture(WFrameWindow * fwin)
static void remakeTexture(WFrameWindow * fwin, int state)
{
Pixmap pmap, lpmap, rpmap;
WMNativePixmap pmap, lpmap, rpmap;
#ifdef XKB_BUTTON_HINT
Pixmap tpmap;
WMNativePixmap tpmap;
#endif
/* Phase 19: Wayland — no X11 rendering context; RConvertImage would crash */

View File

@ -1,5 +1,5 @@
/*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -69,12 +69,12 @@ typedef struct WFrameWindow {
WCoreWindow *resizebar; /* bottom resizebar */
Pixmap title_back[3]; /* focused, unfocused, pfocused */
Pixmap resizebar_back[3]; /* any, WM_NATIVE_NONE, WM_NATIVE_NONE */
Pixmap lbutton_back[3];
Pixmap rbutton_back[3];
WMNativePixmap title_back[3]; /* focused, unfocused, pfocused */
WMNativePixmap resizebar_back[3]; /* any, WM_NATIVE_NONE, WM_NATIVE_NONE */
WMNativePixmap lbutton_back[3];
WMNativePixmap rbutton_back[3];
#ifdef XKB_BUTTON_HINT
Pixmap languagebutton_back[3];
WMNativePixmap languagebutton_back[3];
#endif
WPixmap *lbutton_image;
@ -150,7 +150,7 @@ typedef struct WFrameWindow {
} flags;
int depth;
Visual *visual;
Colormap colormap;
WMNativeColormap colormap;
unsigned long *border_pixel;
unsigned long *focused_border_pixel;
unsigned long *selected_border_pixel;
@ -164,7 +164,7 @@ wFrameWindowCreate(WScreen *scr, int wlevel, int x, int y,
union WTexture **title_texture,
union WTexture **resize_texture,
WMColor **color, WMFont **font,
int depth, Visual *visual, Colormap colormap);
int depth, Visual *visual, WMNativeColormap colormap);
void wFrameWindowUpdateBorders(WFrameWindow *fwin, int flags);

View File

@ -1,6 +1,6 @@
/* icon.c - window icon and dock and appicon parent
*
* Window Maker window manager
* WNativeWindow Maker window manager
*
* Copyright (c) 1997-2003 Alfredo K. Kojima
*
@ -100,9 +100,9 @@ static void tileObserver(void *self, WMNotification *notif)
/************************************/
static int getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int *dep)
static int getSize(WMDrawable d, unsigned int *w, unsigned int *h, unsigned int *dep)
{
Window rjunk;
WNativeWindow rjunk;
int xjunk, yjunk;
unsigned int bjunk;
@ -231,7 +231,7 @@ void wIconDestroy(WIcon *icon)
wfree(icon);
}
static void drawIconTitleBackground(WScreen *scr, Pixmap pixmap, int height)
static void drawIconTitleBackground(WScreen *scr, WMNativePixmap pixmap, int height)
{
wm_backend->icon_paint_title_bg(scr, (unsigned long)pixmap, height);
}
@ -239,7 +239,7 @@ static void drawIconTitleBackground(WScreen *scr, Pixmap pixmap, int height)
static void icon_update_pixmap(WIcon *icon, RImage *image)
{
RImage *tile;
Pixmap pixmap;
WMNativePixmap pixmap;
int x, y, sx, sy;
unsigned w, h;
int theight = 0;
@ -446,9 +446,9 @@ static RImage *get_wwindow_image_from_wmhints(WWindow *wwin, WIcon *icon)
if (hints && (hints->flags & IconPixmapHint) && hints->icon_pixmap != WNATIVE_NONE)
image = RCreateImageFromDrawable(icon->core->screen_ptr->rcontext,
(Drawable)hints->icon_pixmap,
(WMDrawable)hints->icon_pixmap,
(hints->flags & IconMaskHint)
? (Drawable)hints->icon_mask : WM_NATIVE_NONE);
? (WMDrawable)hints->icon_mask : WM_NATIVE_NONE);
return image;
}
@ -608,7 +608,7 @@ void set_icon_image_from_image(WIcon *icon, RImage *image)
void set_icon_minipreview(WIcon *icon, RImage *image)
{
Pixmap tmp;
WMNativePixmap tmp;
RImage *scaled_mini_preview;
WScreen *scr = icon->core->screen_ptr;
@ -634,19 +634,19 @@ void wIconUpdate(WIcon *icon)
/* Forced use user_icon */
get_rimage_icon_from_user_icon(icon);
} else if (icon->icon_win != WM_NATIVE_NONE) {
/* Get the Pixmap from the WIcon */
/* Get the WMNativePixmap from the WIcon */
get_rimage_icon_from_icon_win(icon);
} else if (wwin && wwin->net_icon_image) {
/* Use _NET_WM_ICON icon */
get_rimage_icon_from_x11(icon);
} else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) {
/* Get the Pixmap from the wm_hints, else, from the user */
/* Get the WMNativePixmap from the wm_hints, else, from the user */
unset_icon_image(icon);
icon->file_image = get_rimage_icon_from_wm_hints(icon);
if (!icon->file_image)
get_rimage_icon_from_user_icon(icon);
} else {
/* Get the Pixmap from the user */
/* Get the WMNativePixmap from the user */
get_rimage_icon_from_user_icon(icon);
}
@ -776,7 +776,7 @@ RImage *get_rimage_icon_from_wm_hints(WIcon *icon)
wwin = icon->owner;
if (!getSize((Drawable)wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
if (!getSize((WMDrawable)wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
icon->owner->wm_hints->flags &= ~IconPixmapHint;
return NULL;
}

Some files were not shown because too many files have changed in this diff Show More