/*
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/************************************************************************/
/* */
/* Copyright 1987, 1988, 1989, 1990, 1991, 1992, 1993 */
/* by Digital Equipment Corp., Maynard, MA */
/* */
/* Permission to use, copy, modify, and distribute this software */
/* and its documentation for any purpose and without fee is hereby */
/* granted, provided that the above copyright notice appear in all */
/* copies and that both that copyright notice and this permission */
/* notice appear in supporting documentation, and that the name of */
/* Digital not be used in advertising or publicity pertaining to */
/* distribution of the software without specific, written prior */
/* permission. */
/* */
/* DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, */
/* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND */
/* FITNESS, IN NO EVENT SHALL DIGITAL BE LIABLE FOR ANY SPECIAL, */
/* INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER */
/* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN */
/* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, */
/* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE */
/* OF THIS SOFTWARE. */
/* */
/************************************************************************/
/************************************************************************/
/* */
/* AccessX */
/* */
/* This module provides the client library functions necessary for */
/* an AccessX client to communicate with the AccessX server */
/* extension. */
/* */
/* Revision History: */
/* */
/* 11-Jun-1993 WDW & MEN */
/* Develop sample implementation. */
/* */
/************************************************************************/
#include <stdio.h>
#define NEED_EVENTS
#define NEED_REPLIES
#include <X11/Intrinsic.h>
#include "AccessXproto.h"
#include "AccessXlibint.h"
#ifndef WORD64
#endif
{
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
XAccessXCloseDisplay, /* close_display */
XAccessXWireToEvent, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
NULL /* error_string */
};
NULL)
/************************************************************************/
/* */
/* XAccessXWireToEvent - takes a raw event off the wire an converts it */
/* into an Xlib event structure. */
/* */
/************************************************************************/
#else
#endif
{
return True;
} /* XAccessXWireToEvent */
/************************************************************************/
/* */
/* XAccessXQueryExtension */
/* */
/* DESCRIPTION: */
/* */
/* This routine returns TRUE if the AccessX extension is */
/* available on the given display. */
/* */
/************************************************************************/
#else
#endif
{
if (XextHasExtension(info))
{
return True;
}
else
return False;
} /* XAccessXQueryExtension */
/************************************************************************/
/* */
/* XAccessXQueryVersion */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXQueryVersion request to the */
/* AccessX extension on the server, and then waits for a reply. */
/* */
/************************************************************************/
#else
#endif
{
/* Send the request and wait for the reply.
*/
SyncHandle();
return(status);
} /* XAccessXQueryVersion */
/************************************************************************/
/* */
/* XAccessXSelectInput */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXSelectInput request to the */
/* AccessX extension on the server. */
/* */
/************************************************************************/
#else
#endif
{
SyncHandle();
return;
} /* XAccessXSelectInput */
/************************************************************************/
/* */
/* XAccessXQueryState */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXQueryState request to the */
/* AccessX extension on the server, and then waits for a reply. */
/* */
/************************************************************************/
#else
#endif
{
/* Send the request and wait for the reply.
*/
SyncHandle();
return(status);
} /* XAccessXQueryState */
/************************************************************************/
/* */
/* XAccessXConfigure */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXConfigure request to the */
/* AccessX extension on the server. */
/* */
/************************************************************************/
#else
#endif
{
SyncHandle();
return(status);
} /* XAccessXConfigure */
#if 0
/************************************************************************/
/* */
/* XAccessXGetMouseKeys */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXGetMouseKeys request to the */
/* AccessX extension on the server, and then waits for a reply. */
/* */
/************************************************************************/
int *numKeys)
#else
int *numKeys;
#endif
{
int numBytes;
*numKeys = 0;
/* Send the request and wait for the reply.
*/
return; /* NOthing for now */
{
SyncHandle();
return (AccessXMouseKeysRec *) NULL;
}
if (!mouseKeys)
else
SyncHandle();
return(mouseKeys);
} /* XAccessXGetMouseKeys */
/************************************************************************/
/* */
/* XAccessXSetMouseKey */
/* */
/* DESCRIPTION: */
/* */
/* This routine sends an X_AccessXSetMouseKey request to the */
/* AccessX extension in the server. */
/* */
/************************************************************************/
#else
#endif
{
return; /* Nothing for now */
SyncHandle();
return;
} /* XAccessXSetMouseKey */
#endif
/************************************************************************/
/* */
/* XAccessXInit */
/* */
/* DESCRIPTION: */
/* */
/* Initialize the connection with the AccessX server extension. */
/* */
/************************************************************************/
#else
#endif
{
/* Find the AccessX extension
*/
{
exit(1L);
}
} /* XAccessXInit */
/************************************************************************/
/* */
/* XAccessXMainLoop */
/* */
/************************************************************************/
#else
#endif
{
for (;;)
{
/* The AccessX extension will spit out only one event type,
* and this the type accessXEventBase. The intrinsics do not
* have a graceful way to allow extensions to add events to
* XtAppMainLoop, so it is necessary to write our own which
* checks for accessXEventBase.
*/
else
}
} /* XAccessXAppMainLoop */