AllPlanes.c revision 366
/* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
*
* 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,
* to whom the Software is furnished to do so, provided that the above
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
* 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
* OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR 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.
*
* Except as contained in this notice, the name of a copyright holder
* shall not be used in advertising or otherwise to promote the sale, use
* or other dealings in this Software without prior written authorization
* of the copyright holder.
*/
#pragma ident "@(#)AllPlanes.c 35.6 08/03/12 SMI"
/*
* AllPlanes.c - the client side interface to the SUN_ALLPLANES extension.
*/
#define NEED_EVENTS
#define NEED_REPLIES
#include <stdio.h>
static int close_display();
static XExtensionInfo *ext_info;
static char *ext_name = ALLPLANESNAME;
static XExtensionHooks ext_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
close_display, /* close_display */
NULL, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
NULL, /* error_string */
};
static
static
#define AllPlanesSimpleCheckExtension(dpy,i) \
/**********************************************************************/
int *event_basep,
{
if (XextHasExtension(info)) {
return True;
} else {
return False;
}
}
int *major_versionp,
{
SyncHandle();
return 0;
}
SyncHandle();
return 1;
}
void
Drawable d;
int n_points;
int mode; /* CoordMode */
{
long nbytes;
int n;
int xoff,
yoff;
while (n_points) {
n = n_points;
nbytes = ((long) n) << 2;
if (nbytes > 4) {
}
} else {
}
n_points -= n;
points += n;
pptr++;
}
} else
points += n;
}
SyncHandle();
}
void
Drawable d;
int npoints;
int mode;
{
long len;
/* each point is 2 16-bit integers */
SyncHandle();
}
void
Drawable d;
int nsegments;
{
long len;
int n;
while (nsegments) {
n = nsegments;
len = ((long) n) << 1;
len = ((long) n) << 1;
}
len <<= 2;
nsegments -= n;
segments += n;
}
SyncHandle();
}
void
Drawable d;
int n_rects;
{
long len;
int n;
while (n_rects) {
n = n_rects;
len = ((long) n) << 1;
len = ((long) n) << 1;
}
len <<= 2;
n_rects -= n;
rects += n;
}
SyncHandle();
}
void
Drawable d;
int n_rects;
{
long len;
int n;
while (n_rects) {
n = n_rects;
len = ((long) n) << 1;
len = ((long) n) << 1;
}
len <<= 2;
n_rects -= n;
rectangles += n;
}
SyncHandle();
}