/*
*
* 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.
*/
#include "libvtsSUNWmga.h" /* VTS library definitions for mga device */
/* Declarations needed for get_tests() */
static unsigned int mga_mask_list[] = {
};
static unsigned int mga_mesg_list[] = {
};
};
/* *** PUBLIC *** */
/* These library functions are public and are expected to exist */
int
register gfxtest_info *const tests)
{
/*
* Set the gfx_vts_debug_mask bits according to environment variables
*/
/*
* Construct the list of tests to be performed
*/
return (GRAPHICS_ERR_MALLOC_FAIL);
}
sizeof (mga_test_list));
tests_info = tests;
return (0);
} /* get_tests() */
int
register gfxtest_info *const tests)
{
"call cleanup_tests\n");
return (0);
} /* cleanup_tests() */
void
void)
{
}
void
void)
{
}
int
void)
{
if (gfx_vts_debug_mask & GRAPHICS_VTS_SLOCK_OFF) {
"mga_lock_display() DISABLED\n");
return (0);
}
if (!mga_open_display()) {
return (0);
}
/* Disable server from handling any requests */
/* Gain control of keyboard */
/* Gain control of pointer */
"XMapRaised(display, 0x%lx)\n",
return (1);
} /* mga_lock_display() */
int
void)
{
return (0);
"XUnmapWindow(display, 0x%lx)\n",
return (1);
}
int
void)
{
"XOpenDisplay(\"%s\") = NULL\n"
"Assuming no window system.\n",
return (0);
}
"XOpenDisplay(\"%s\") = 0x%p\n"
"Assuming a window system.\n",
}
/* Tell server to report events as they occur */
"XSynchronize(display, True).\n");
return (1);
}
int
void)
{
return (0);
"XCreatePixmapCursor(display, 0x%lx, 0x%lx, &dummy_color, "
"&dummy_color, 0, 0) = 0x%lx\n",
(unsigned long) emptypixmap, (unsigned long) emptypixmap,
return (1);
}
int
void)
{
return (0);
"XCreateWindow(display, 0x%lx, %d, %d, %d, %d, "
"%d, %d, %d, %d, 0x%lx, &xswa) = 0x%lx\n",
(unsigned long) (CWBackPixmap | CWOverrideRedirect |
return (1);
}
int
void)
{
return (0);
"XGrabServer(display)\n");
return (1);
}
int
void)
{
return (0);
"XUngrabServer(display)\n");
return (1);
}
int
void)
{
register int status;
return (0);
"XGrabKeyboard(display, 0x%lx, %d, %d, %d, %ld) = %d\n",
status);
if (status != GrabSuccess) {
"Cannot gain control of keyboard\n");
return (-1);
} else {
return (1);
}
}
int
void)
{
register int status;
return (0);
"XGrabKeyboard(display, %ld) = %d\n",
return (1);
}
int
void)
{
register int status;
return (0);
"XGrabPointer(display, 0x%lx, %d, 0x%lx, %d, %d, "
"%d, %d, %ld) = %d\n",
status);
if (status != GrabSuccess) {
"Cannot gain control of pointer\n");
return (-1);
} else {
return (1);
}
}
int
void)
{
register int status;
return (0);
"XGrabPointer(display, %ld) = %d\n",
return (1);
}
int
void)
{
"XGetScreenSaver(display) = %d, %d, %d, %d\n",
/* Reset the screen saver to reset its time. */
"XSetScreenSaver(display, %d, %d, %d, %d)\n",
return (1);
}
int
void)
{
return (0);
} else {
"XSetScreenSaver(display, %d, %d, %d, %d)\n",
return (1);
}
}
int
void)
{
/* Disable the X Display Power Management Signaling. */
int status;
int dpms_error = 0;
int dpms_event = 0;
&dpms_event, &dpms_error);
"DPMSQueryExtension(display) = %d, %d, %d\n",
return (-1);
"DPMSInfo(display) = %d, %d, %d\n",
return (0);
else {
"DPMSDisable(display)\n");
return (1);
}
}
int
void)
{
/* Restore the X Display Power Management Signaling. */
return (0);
} else {
"DPMSEnable(display)\n");
return (1);
}
}
int
unsigned int const seconds)
{
register int signo;
/*
* Allow a SIGHUP, SIGINT, SIGALRM, or SIGTERM to interrupt our
* sleep. These signals should already be masked from a
* call to mga_block_signals.
*/
/* Save the current signals. */
/* Setup up new signal action. */
if (!signo) {
/* First time goes here. */
/* Set signal routines. */
/* Unmask SIGHUP, SIGINT, SIGALRM, SIGTERM. */
/* Mask SIGHUP, SIGINT, SIGALRM, SIGTERM. */
/* Restore the signals. */
}
else {
/* We come here from the siglongjmp in mga_signal_routine. */
/* Mask SIGHUP, SIGINT, SIGALRM, SIGTERM. */
/* Restore the signals. */
/* Cause us to get the signal, when we unmask the signals. */
}
return (signo);
}
void
register int const signo)
{
}
void
register int const flag)
{
"call graphicstest_finish\n");
exit(0);
}