windowmaker-wl/WINGs/wstubs_no_x11.c

194 lines
7.1 KiB
C

/*
* wstubs_no_x11.c — empty implementations of WINGs public-API symbols
* that normally live in WINGs/*_x11.c files.
*
* Compiled only when --disable-x11-backend is configured. The X11
* backend files are excluded from the build in that case; this file
* provides the symbols they would otherwise export, so that consumer
* code that calls them (DnD setup, selection, balloons, color/font
* panels, app-icon hints, IM context) links cleanly.
*
* Behaviour: every stub returns success-neutral values (no-op for void,
* False for Bool, NULL for pointer, 0 for integer). Calling them in
* Wayland mode is a quiet no-op rather than an error — the
* corresponding feature simply isn't available until an equivalent
* Wayland implementation is added (wl_data_device for DnD, wlr-foreign-
* toplevel for app icons, etc.).
*/
#define WRASTER_NO_XLIB
#include "wconfig.h"
#include "WINGsP.h"
/* ------------------------------------------------------------------ */
/* Drag-and-drop (dragsource_x11.c / dragdestination_x11.c) */
/* ------------------------------------------------------------------ */
void WMSetViewDragSourceProcs(WMView *view, WMDragSourceProcs *procs)
{ (void)view; (void)procs; }
Bool WMIsDraggingFromView(WMView *view)
{ (void)view; return False; }
void WMDragImageFromView(WMView *view, WMEvent *event)
{ (void)view; (void)event; }
void WMSetViewDragImage(WMView *view, WMPixmap *dragImage)
{ (void)view; (void)dragImage; }
void WMReleaseViewDragImage(WMView *view)
{ (void)view; }
void WMCreateDragHandler(WMView *view, WMEventProc *dragEventProc, void *clientData)
{ (void)view; (void)dragEventProc; (void)clientData; }
void WMDeleteDragHandler(WMView *view, WMEventProc *dragEventProc, void *clientData)
{ (void)view; (void)dragEventProc; (void)clientData; }
void WMSetViewDraggable(WMView *view, WMDragSourceProcs *procs, WMPixmap *image)
{ (void)view; (void)procs; (void)image; }
void WMUnsetViewDraggable(WMView *view)
{ (void)view; }
void WMRegisterViewForDraggedTypes(WMView *view, WMArray *acceptedTypes)
{ (void)view; (void)acceptedTypes; }
void WMUnregisterViewDraggedTypes(WMView *view)
{ (void)view; }
void WMSetViewDragDestinationProcs(WMView *view, WMDragDestinationProcs *procs)
{ (void)view; (void)procs; }
WMNativeAtom W_OperationToAction(WMScreen *scr, WMDragOperationType operation)
{ (void)scr; (void)operation; return WM_NATIVE_NONE; }
WMDragOperationType W_ActionToOperation(WMScreen *scr, WMNativeAtom action)
{ (void)scr; (void)action; return WDOperationNone; }
void W_DragSourceStartTimer(WMDraggingInfo *info) { (void)info; }
void W_DragSourceStopTimer(void) { }
void W_DragDestinationStartTimer(WMDraggingInfo *info) { (void)info; }
void W_DragDestinationStopTimer(void) { }
void W_DragDestinationCancelDropOnEnter(WMView *toplevel, WMDraggingInfo *info)
{ (void)toplevel; (void)info; }
void W_DragDestinationInfoClear(WMDraggingInfo *info) { (void)info; }
/* W_FreeViewXdndPart lives in shared dragcommon.c — not stubbed here. */
Bool W_SendDnDClientMessage(Display *dpy, WNativeWindow win, WMNativeAtom message,
unsigned long d1, unsigned long d2, unsigned long d3,
unsigned long d4, unsigned long d5)
{
(void)dpy; (void)win; (void)message;
(void)d1; (void)d2; (void)d3; (void)d4; (void)d5;
return False;
}
/* ------------------------------------------------------------------ */
/* Selection (selection_x11.c) */
/* ------------------------------------------------------------------ */
Bool WMCreateSelectionHandler(WMView *view, WMNativeAtom selection,
WMNativeTime timestamp,
WMSelectionProcs *procs, void *cdata)
{
(void)view; (void)selection; (void)timestamp; (void)procs; (void)cdata;
return False;
}
void WMDeleteSelectionHandler(WMView *view, WMNativeAtom selection,
WMNativeTime timestamp)
{ (void)view; (void)selection; (void)timestamp; }
Bool WMRequestSelection(WMView *view, WMNativeAtom selection, WMNativeAtom target,
WMNativeTime timestamp, WMSelectionCallback *callback,
void *cdata)
{
(void)view; (void)selection; (void)target; (void)timestamp;
(void)callback; (void)cdata;
return False;
}
/* ------------------------------------------------------------------ */
/* Input methods (winputmethod_x11.c) */
/* ------------------------------------------------------------------ */
void W_InitIM(WMScreen *scr) { (void)scr; }
void W_CreateIC(WMView *view) { (void)view; }
void W_DestroyIC(WMView *view) { (void)view; }
void W_FocusIC(WMView *view) { (void)view; }
void W_UnFocusIC(WMView *view) { (void)view; }
void W_SetPreeditPositon(W_View *view, int x, int y)
{ (void)view; (void)x; (void)y; }
/* ------------------------------------------------------------------ */
/* Balloons (wballoon_x11.c) */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/* Application resources (wappresource_x11.c) */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/* Color panel (wcolorpanel_x11.c) */
/* ------------------------------------------------------------------ */
/* ------------------------------------------------------------------ */
/* Color helpers (wcolor_x11.c) */
/* ------------------------------------------------------------------ */
void WMSetColorInGC(WMColor *color, GC gc) { (void)color; (void)gc; }
/* ------------------------------------------------------------------ */
/* Font / atom helpers (widgets_x11.c) */
/* ------------------------------------------------------------------ */
WMNativeAtom W_NativeInternAtom(W_Screen *scr, const char *name)
{ (void)scr; (void)name; return WM_NATIVE_NONE; }
void W_X11PlatformInit(W_Screen *scrPtr) { (void)scrPtr; }
WMScreen *W_X11OpenDisplay(const char *display)
{
(void)display;
wwarning(_("WINGs built without X11 backend; cannot open X11 display"));
return NULL;
}
WMScreen *WMCreateScreen(Display *display, int screen)
{
(void)display; (void)screen;
wwarning(_("WINGs built without X11 backend; WMCreateScreen unavailable"));
return NULL;
}
WMScreen *WMCreateSimpleApplicationScreen(Display *display)
{
(void)display;
wwarning(_("WINGs built without X11 backend; "
"WMCreateSimpleApplicationScreen unavailable"));
return NULL;
}
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChangeNotification";
#include "WINGsP.h"
GC WMColorGC(WMColor *color)
{
(void)color;
return NULL;
}
WMNativeKeysym W_KeycodeToKeysym(Display *display, unsigned int keycode, int index) { (void)display; (void)keycode; (void)index; return 0; }
W_View *W_GetViewForXWindow(Display *display, WNativeWindow window) { (void)display; (void)window; return NULL; }