1/* 2 * Author: William Chia-Wei Cheng (bill.cheng@acm.org) 3 * 4 * Copyright (C) 2001-2009, William Chia-Wei Cheng. 5 * 6 * This file may be distributed under the terms of the Q Public License 7 * as defined by Trolltech AS of Norway and appearing in the file 8 * LICENSE.QPL included in the packaging of this file. 9 * 10 * THIS FILE IS PROVIDED AS IS WITH NO WARRANTY OF ANY KIND, INCLUDING 11 * THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 12 * PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, 13 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING 14 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 15 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 16 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 * 18 * @(#)$Header: /mm2/home/cvs/bc-src/tgif/tgcwdl.e,v 1.7 2011/05/16 16:22:00 william Exp $ 19 */ 20 21#ifndef _TGCWDL_E_ 22#define _TGCWDL_E_ 23 24#include "tidget.h" 25 26#define HS_WIDTH 181 27#define HS_HEIGHT 181 28#define V_WIDTH 14 29#define V_HEIGHT 181 30 31#define ID_CWHEEL_DIALOG 101 32#define ID_CWHEEL_HS_AREA 102 33#define ID_CWHEEL_V_AREA 103 34#define ID_CWHEEL_EDIT_R 104 35#define ID_CWHEEL_EDIT_G 105 36#define ID_CWHEEL_EDIT_B 106 37#define ID_CWHEEL_EDIT_H 107 38#define ID_CWHEEL_EDIT_S 108 39#define ID_CWHEEL_EDIT_V 109 40#define ID_CWHEEL_EDIT_CNAME 110 41#define ID_CWHEEL_SELCOLOR 111 42#define ID_CWHEEL_BTN_ADD 112 43#define ID_CWHEEL_BTN_OK 113 44#define ID_CWHEEL_BTN_CANCEL 114 45 46typedef struct tagColorWheelInfo { 47 int initialized; 48 int mapped; 49 50 unsigned int r, g, b, h, s, v; 51 char color_str[40]; /* input and output */ 52 int hs_x, hs_y, v_y; 53 Pixmap hs_pixmap; 54 Pixmap v_pixmap; 55 56 TidgetInfo *dialogbox_tidgetinfo; 57} ColorWheelInfo; 58 59extern ColorWheelInfo gColorWheelInfo; 60 61#ifdef _INCLUDE_FROM_TGCWDL_C_ 62#undef extern 63#define extern 64#endif /*_INCLUDE_FROM_TGCWDL_C_*/ 65 66extern void ShowTdgtColorWheelDialogBox ARGS_DECL((void)); 67extern void HideTdgtColorWheelDialogBox ARGS_DECL((void)); 68 69extern TidgetInfo *CreateTdgtColorWheelDialogBox ARGS_DECL((Display*, 70 Window)); 71extern void DestroyTdgtColorWheelDialogBox ARGS_DECL((Display*, 72 TidgetInfo*)); 73extern int TdgtColorWheelDlgLoop ARGS_DECL((TidgetInfo*)); 74 75extern int InitTdgtColorWheelDlg ARGS_DECL((void)); 76extern void CleanUpTdgtColorWheelDlg ARGS_DECL((void)); 77 78#ifdef _INCLUDE_FROM_TGCWDL_C_ 79#undef extern 80#ifndef _NO_RECURSIVE_EXTERN 81#define extern extern 82#endif /* ~_NO_RECURSIVE_EXTERN */ 83#endif /*_INCLUDE_FROM_TGCWDL_C_*/ 84 85#endif /*_TGCWDL_E_*/ 86