ScaleP.h 2.6 KB

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