1 /* $Id: ConvCtrl.h,v 1.20 1998/10/15 09:11:11 ishisone Exp $ */ 2 /* 3 * Copyright (c) 1990 Software Research Associates, Inc. 4 * 5 * Permission to use, copy, modify, and distribute this software and its 6 * documentation for any purpose and without fee is hereby granted, provided 7 * that the above copyright notice appear in all copies and that both that 8 * copyright notice and this permission notice appear in supporting 9 * documentation, and that the name of Software Research Associates not be 10 * used in advertising or publicity pertaining to distribution of the 11 * software without specific, written prior permission. Software Research 12 * Associates makes no representations about the suitability of this software 13 * for any purpose. It is provided "as is" without express or implied 14 * warranty. 15 * 16 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan 17 */ 18 19 #ifndef _ConversionControl_h 20 #define _ConversionControl_h 21 22 /* ConversionControl widget public header file */ 23 24 #include <X11/Shell.h> 25 26 #define XtNinputObject "inputObject" 27 #define XtCInputObject "InputObject" 28 #define XtNinputObjectClass "inputObjectClass" 29 #define XtCInputObjectClass "InputObjectClass" 30 #define XtNdisplayObjectClass "displayObjectClass" 31 #define XtCDisplayObjectClass "DisplayObjectClass" 32 #define XtNselectionWidgetClass "selectionWidgetClass" 33 #define XtCSelectionWidgetClass "SelectionWidgetClass" 34 #define XtNauxWidgetClass "auxWidgetClass" 35 #define XtCAuxWidgetClass "AuxWidgetClass" 36 37 #define XtNclientWindow "clientWindow" 38 #define XtNfocusWindow "focusWindow" 39 40 #define XtNcursor "cursor" 41 42 #define XtNeventSelectMethod "eventSelectMethod" 43 #define XtCEventSelectMethod "EventSelectMethod" 44 45 #define XtNtextEncoding "textEncoding" 46 #define XtCTextEncoding "TextEncoding" 47 48 #define XtNtextCallback "textCallback" 49 #define XtNnewTextCallback "newTextCallback" 50 #define XtNendCallback "endCallback" 51 #define XtNunusedEventCallback "unusedEventCallback" 52 53 #define XtNsendbackKeyPress "sendbackKeyPress" 54 #define XtCSendbackEvent "SendbackEvent" 55 56 #define XtNtitlebarHeight "titlebarHeight" 57 #define XtCTitlebarHeight "TitlebarHeight" 58 59 typedef enum { 60 ESMethodNone, /* do nothing */ 61 ESMethodInputOnly, /* creates a Input-Only window on clientwindow 62 * and select event on it 63 */ 64 ESMethodSelectFocus /* selects event on fucuswindow */ 65 } EventSelectMethod; 66 67 typedef struct { 68 Atom encoding; /* text encoding e.g. COMPOUND_TEXT */ 69 int format; /* text format (8/16/32) */ 70 int length; /* text length */ 71 XtPointer text; /* text data */ 72 } CCTextCallbackArg; 73 74 typedef struct _ConversionControlClassRec* ConversionControlWidgetClass; 75 typedef struct _ConversionControlRec* ConversionControlWidget; 76 77 extern WidgetClass conversionControlWidgetClass; 78 79 80 /* 81 * public functions (and their argument type) 82 */ 83 84 #define CASpotLocation 0x1L 85 #define CAFocusWindow 0x2L 86 #define CAClientArea 0x4L 87 #define CAStatusArea 0x8L 88 #define CAColormap 0x10L 89 #define CAColor 0x20L 90 #define CABackgroundPixmap 0x40L 91 #define CALineSpacing 0x80L 92 #define CAFonts 0x100L 93 #define CACursor 0x200L 94 #define CAStatusFonts 0x400L 95 96 typedef struct { 97 Position spotx, spoty; 98 Window focuswindow; 99 XRectangle clientarea; 100 XRectangle statusarea; 101 Colormap colormap; 102 Pixel foreground, background; 103 Pixmap background_pixmap; 104 Dimension linespacing; 105 XFontStruct **fonts; /* an array of pointers to (XFontStruct), 106 * NOT a pointer to an array of (XFontStruct) 107 */ 108 Cardinal num_fonts; 109 XFontStruct **status_fonts; /* ditto */ 110 Cardinal num_status_fonts; 111 Cursor cursor; 112 } ConversionAttributes; 113 114 extern void CControlStartConversion( 115 #if NeedFunctionPrototypes 116 Widget /* w */, 117 Window /* clientwindow */, 118 unsigned long /* valuemask */, 119 ConversionAttributes * /* value */ 120 #endif 121 ); 122 123 extern void CControlChangeAttributes( 124 #if NeedFunctionPrototypes 125 Widget /* w */, 126 unsigned long /* valuemask */, 127 ConversionAttributes * /* value */ 128 #endif 129 ); 130 131 extern void CControlChangeFocus( 132 #if NeedFunctionPrototypes 133 Widget /* w */, 134 int /* set (non-zero: set, zero: unset) */ 135 #endif 136 ); 137 138 extern void CControlEndConversion( 139 #if NeedFunctionPrototypes 140 Widget /* w */ 141 #endif 142 ); 143 144 #endif 145