ColorEdit.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * CDE - Common Desktop Environment
  3. *
  4. * Copyright (c) 1993-2012, The Open Group. All rights reserved.
  5. *
  6. * These libraries and programs are free software; you can
  7. * redistribute them and/or modify them under the terms of the GNU
  8. * Lesser General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option)
  10. * any later version.
  11. *
  12. * These libraries and programs are distributed in the hope that
  13. * they will be useful, but WITHOUT ANY WARRANTY; without even the
  14. * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  15. * PURPOSE. See the GNU Lesser General Public License for more
  16. * details.
  17. *
  18. * You should have received a copy of the GNU Lesser General Public
  19. * License along with these libraries and programs; if not, write
  20. * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
  21. * Floor, Boston, MA 02110-1301 USA
  22. */
  23. /* $XConsortium: ColorEdit.h /main/4 1995/10/30 13:08:12 rswiston $ */
  24. /************************************<+>*************************************
  25. ****************************************************************************
  26. **
  27. ** File: ColorEdit.h
  28. **
  29. ** Project: DT 3.0
  30. **
  31. ** This file contains function definitions for the corresponding .c
  32. ** file
  33. **
  34. **
  35. ** (c) Copyright Hewlett-Packard Company, 1990.
  36. **
  37. **
  38. **
  39. ****************************************************************************
  40. ************************************<+>*************************************/
  41. #ifndef _coloredit_h
  42. #define _coloredit_h
  43. /* Global structure for Color Editor */
  44. typedef struct _EditData {
  45. Widget DialogShell;
  46. Widget main_form;
  47. Widget sliderForm;
  48. Widget oldButton;
  49. Widget newButton;
  50. Widget grabColor;
  51. Widget redLabel;
  52. Widget greenLabel;
  53. Widget blueLabel;
  54. Widget hueLabel;
  55. Widget satLabel;
  56. Widget valLabel;
  57. Widget redScale;
  58. Widget greenScale;
  59. Widget blueScale;
  60. Widget hueScale;
  61. Widget satScale;
  62. Widget valScale;
  63. int current_scale;
  64. ColorSet *color_set;
  65. ColorSet oldButtonColor;
  66. XmColorProc calcRGB;
  67. Pixmap pixmap25;
  68. Pixmap pixmap75;
  69. } EditData;
  70. extern EditData edit;
  71. /* External Interface */
  72. extern void ColorEditor(
  73. Widget parent,
  74. ColorSet *color_set) ;
  75. extern void RGBtoHSV(
  76. #if NeedWidePrototypes
  77. unsigned int r,
  78. unsigned int g,
  79. unsigned int b,
  80. #else
  81. unsigned short r,
  82. unsigned short g,
  83. unsigned short b,
  84. #endif
  85. int *h,
  86. int *s,
  87. int *v) ;
  88. extern void restoreColorEdit(
  89. Widget shell,
  90. XrmDatabase db) ;
  91. extern void saveColorEdit(
  92. int fd) ;
  93. #endif /* _coloredit_h */
  94. /* DON'T ADD ANYTHING AFTER THIS #endif */