1 /* 2 3 Copyright 1989, 1998 The Open Group 4 5 Permission to use, copy, modify, distribute, and sell this software and its 6 documentation for any purpose is hereby granted without fee, provided that 7 the above copyright notice appear in all copies and that both that 8 copyright notice and this permission notice appear in supporting 9 documentation. 10 11 The above copyright notice and this permission notice shall be included 12 in all copies or substantial portions of the Software. 13 14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 17 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20 OTHER DEALINGS IN THE SOFTWARE. 21 22 Except as contained in this notice, the name of The Open Group shall 23 not be used in advertising or otherwise to promote the sale, use or 24 other dealings in this Software without prior written authorization 25 from The Open Group. 26 27 */ 28 29 /* 30 * Author: Davor Matic, MIT X Consortium 31 */ 32 33 #ifndef _ScaleP_h 34 #define _ScaleP_h 35 36 #include "Scale.h" 37 #include <X11/Xaw/SimpleP.h> 38 39 typedef struct { 40 int foo; 41 } ScaleClassPart; 42 43 /* Full class record declaration */ 44 typedef struct _ScaleClassRec { 45 CoreClassPart core_class; 46 SimpleClassPart simple_class; 47 ScaleClassPart scale_class; 48 } ScaleClassRec; 49 50 extern ScaleClassRec scaleClassRec; 51 52 typedef struct { 53 Position *x, *y; 54 Dimension *width, *height; 55 } Table; 56 57 /* New fields for the Scale widget record */ 58 59 #ifndef XtGravity 60 #define XtGravity int 61 #endif 62 63 typedef struct { 64 /* resources */ 65 Pixel foreground_pixel; 66 Dimension internal_width; 67 Dimension internal_height; 68 XtGravity gravity; 69 String scale_x_str, scale_y_str; 70 String aspect_ratio_str; 71 String precision_str; 72 XImage *image; 73 Boolean resize; 74 Boolean autoscale; 75 Boolean proportional; 76 Boolean paste_buffer; 77 Cardinal buffer_size; 78 XtPointer userData; 79 Visual *visual; 80 /* private */ 81 double scale_x, scale_y; 82 double aspect_ratio; 83 double precision; 84 GC gc; 85 Position x, y; 86 Dimension width, height; 87 Table table; 88 XRectangle *rectangles; 89 Cardinal nrectangles; 90 } ScalePart; 91 92 /* Full instance record declaration */ 93 typedef struct _ScaleRec { 94 CorePart core; 95 SimplePart simple; 96 ScalePart scale; 97 } ScaleRec; 98 99 #endif /* _ScaleP_h */ 100 101 102 103 104