Scale.h revision 9aa228fd
1/* $Xorg: Scale.h,v 1.4 2001/02/09 02:05:55 xorgcvs Exp $ */ 2/* 3 4Copyright 1993, 1998 The Open Group 5 6Permission to use, copy, modify, distribute, and sell this software and its 7documentation for any purpose is hereby granted without fee, provided that 8the above copyright notice appear in all copies and that both that 9copyright notice and this permission notice appear in supporting 10documentation. 11 12The above copyright notice and this permission notice shall be included 13in all copies or substantial portions of the Software. 14 15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 18IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 19OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 20ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 21OTHER DEALINGS IN THE SOFTWARE. 22 23Except as contained in this notice, the name of The Open Group shall 24not be used in advertising or otherwise to promote the sale, use or 25other dealings in this Software without prior written authorization 26from The Open Group. 27 28*/ 29/* $XFree86: xc/programs/xmag/Scale.h,v 1.4 2001/01/17 23:46:20 dawes Exp $ */ 30 31#ifndef _XawScale_h 32#define _XawScale_h 33 34/*********************************************************************** 35 * 36 * Scale Widget 37 * 38 ***********************************************************************/ 39 40#include <X11/Xaw/Simple.h> 41#include <X11/Xmu/Converters.h> 42 43/* Resources: 44 45 All the SimpleWidget resources plus... 46 Name Class RepType Default Value 47 ---- ----- ------- ------------- 48 aspectRatio AspectRatio Float 1.0 49 autoscale Autoscale Boolean True 50 bufferSize BufferSize Cardinal 1024 51 foreground Foreground Pixel XtDefaultForeground 52 gravity Gravity XtGravity ForgetGravity 53 image Image XImage* NULL 54 internalHeight Height Dimension 2 55 internalWidth Width Dimension 2 56 pasteBuffer PasteBuffer Boolean False 57 precision Precision Float 0.001 58 proportional Proportional Boolean False 59 resize Resize Boolean True 60 scaleX ScaleValue Float 1.0 61 scaleY ScaleValue Float 1.0 62 userData UserData XtPointer NULL 63 visual Visual Visual* CopyFromParent 64*/ 65 66#ifndef _XtStringDefs_h_ 67#define XtNforeground "foreground" 68#define XtNinternalWidth "internalWidth" 69#define XtNinternalHeight "internalHeight" 70#define XtNresize "resize" 71#define XtCResize "Resize" 72#endif 73 74#define XtNaspectRatio "aspectRatio" 75#define XtCAspectRatio "AspectRatio" 76#define XtNbufferSize "bufferSize" 77#define XtCBufferSize "BufferSize" 78#define XtNscaleX "scaleX" 79#define XtNscaleY "scaleY" 80#define XtCScaleFactor "ScaleFactor" 81#define XtNautoscale "autoscale" 82#define XtCAutoscale "Autoscale" 83#define XtNproportional "proportional" 84#define XtCProportional "Proportional" 85#define XtNprecision "precision" 86#define XtCPrecision "Precision" 87#define XtNgravity "gravity" 88#define XtCGravity "Gravity" 89#define XtNpasteBuffer "pasteBuffer" 90#define XtCPasteBuffer "PasteBuffer" 91#define XtNimage "image" 92#define XtCImage "image" 93#define XtNexponent "exponent" 94#define XtCExponent "Exponent" 95#define XtNuserData "userData" 96#define XtCuserData "UserData" 97#define XtRuserData "UserData" 98#define XtRImage "Image" 99#ifndef XtNvisual 100#define XtNvisual "visual" 101#endif 102#define XtCvisual "Visual" 103#define XtRvisual "Visual" 104 105 106/* Class record constants */ 107 108extern WidgetClass scaleWidgetClass; 109 110typedef struct _ScaleClassRec *ScaleWidgetClass; 111typedef struct _ScaleRec *ScaleWidget; 112 113extern int SWGetImagePixel ( Widget w, Position x, Position y, 114 Position *img_x, Position *img_y, 115 Pixel *img_pixel ); 116extern void SWUnscale ( Widget w, XEvent *event, String *params, 117 Cardinal *num_params ); 118extern void SWAutoscale ( Widget w, XEvent *event, String *params, 119 Cardinal *num_params ); 120extern void SWInitialSize ( Widget w, XEvent *event, String *params, 121 Cardinal *num_params ); 122extern void SWSetImage ( Widget w, XImage *image ); 123extern void RequestSelection ( Widget w, XEvent *event, String *params, 124 Cardinal *num_params ); 125extern void GrabSelection ( Widget w, XEvent *event, String *params, 126 Cardinal *num_params ); 127extern Pixmap SWGetPixmap ( Widget w ); 128 129#endif /* _XawScale_h */ 130 131