home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-386-Vol-2of3.iso
/
c
/
cwikwidg.zip
/
cwikwidget
/
Image
/
Image.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-04-01
|
3KB
|
89 lines
/*
* Copyright 1992 John L. Cwikla
*
* Permission to use, copy, modify, distribute, and sell this software
* and its documentation for any purpose is hereby granted without fee,
* provided that the above copyright notice appears in all copies and that
* both that copyright notice and this permission notice appear in
* supporting documentation, and that the name of John L. Cwikla or
* University of Illinois not be used in advertising or publicity
* pertaining to distribution of the software without specific, written
* prior permission. John L. Cwikla and University of Illinois make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*
* John L. Cwikla and University of Illinois disclaim all warranties with
* regard to this software, including all implied warranties of
* merchantability and fitness, in no event shall John L. Cwikla or
* University of Illinois 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.
*
* Author:
* John L. Cwikla
* Materials Research Laboratory Center for Computation
* University Of Illinois at Urbana-Champaign
* 104 S. Goodwin
* Urbana, IL 61801
*
* cwikla@uimrl7.mrl.uiuc.edu
*/
#ifndef IMAGE__H
#define IMAGE__H
/*
** Image Widget
*/
extern WidgetClass imageWidgetClass;
typedef struct _ImageClassRec *ImageWidgetClass;
typedef struct _ImageRec *ImageWidget;
#ifndef XtIsImage
#define XtIsImage(w) XtIsSubclass((w), imageWidgetClass)
#endif
#define XtNselectCallback "selectCallback"
#define XtNdata "data"
#define XtNdataWidth "dataWidth"
#define XtNdataHeight "dataHeight"
#define XtNgravity "gravity"
#define XtCData "Data"
#define XtCDataWidth "DataWidth"
#define XtCDataHeight "DataHeight"
#define XtCGravity "Gravity"
#define XtRGravity "Gravity"
/* Reasons */
#define IMAGE_SELECT 1
typedef struct _ImageCallbackStruct
{
int reason;
XEvent *event;
Pixel pixel;
} ImageCallbackStruct, *ImageCallbackPtr;
typedef struct _ImageErrorStruct
{
int reason;
} ImageErrorStruct, *ImageErrorPtr;
extern void ImageAddPixel(Widget _w, int _value);
extern XImage *ImageGetImage(Widget _w, int _xcoord, int _ycoord, unsigned int _width,
unsigned int _height, long _planeMask, int imageFormat);
extern Pixel ImageGetPixel(Widget _w, int _x, int _y);
extern XImage *ImageGetSubImage(Drawable _d, Widget _dest, int _srcX, int _srcY,
long planeMask, int _destX, int _destY);
extern void ImagePutImage(Widget _w, Drawable _d, GC _gc, int _srcX, int _srcY,
int _destX, int _destY, unsigned int _width, unsigned int _height);
extern void ImagePutPixel(Widget _w, int _x, int _y, Pixel _pixel);
extern XImage *ImageSubImage(Widget _w, int _x, int _y, unsigned int _width, unsigned int _height);
#endif /* IMAGE__H */