1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
/* $Id: ConvCtrlP.h,v 1.20 1999/05/06 09:07:53 ishisone Exp $ */
/*
* Copyright (c) 1990 Software Research Associates, Inc.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
* that the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Software Research Associates not be
* used in advertising or publicity pertaining to distribution of the
* software without specific, written prior permission. Software Research
* Associates makes no representations about the suitability of this software
* for any purpose. It is provided "as is" without express or implied
* warranty.
*
* Author: Makoto Ishisone, Software Research Associates, Inc., Japan
*/
#ifndef _ConversionControlP_h
#define _ConversionControlP_h
#include <X11/ShellP.h>
#include "ConvCtrl.h"
#include "ICtypes.h"
#define XtREventSelectMethod "EventSelectMethod"
/*
* generic conversion control widget data structure
*/
typedef struct {
void (*Startup)();
void (*Finish)();
void (*ChangeAttributes)();
void (*ChangeFocus)();
void (*TextChange)();
void (*Fix)();
void (*ModeChange)();
void (*SelectionControl)();
void (*AuxControl)();
} ConversionControlClassPart;
typedef struct _ConversionControlClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
ShellClassPart shell_class;
WMShellClassPart wm_shell_class;
VendorShellClassPart vendor_shell_class;
TransientShellClassPart transient_shell_class;
ConversionControlClassPart conversionControl_class;
} ConversionControlClassRec;
extern ConversionControlClassRec conversionControlClassRec;
typedef struct {
/* resources */
Widget inputobj;
WidgetClass inputobjclass;
WidgetClass displayobjclass;
WidgetClass selectionwidgetclass;
Window clientwindow; /* READ ONLY RESOURCE */
Window focuswindow; /* READ ONLY RESOURCE */
Cursor cursor;
EventSelectMethod eventselectmethod;
Atom textencoding;
XtCallbackList textcallback;
XtCallbackList newtextcallback;
XtCallbackList endcallback;
XtCallbackList unusedeventcallback;
Boolean sendbackKeyPress; /* whether unused keypress events are
* sent back to the focus window or not
*/
Dimension titlebarheight; /* height of a titlebar attached to
* popup shells (mode/selection/aux)
*/
/* private state */
Boolean active; /* Am I active (i.e. doing conversion) now? */
Boolean notext; /* true iff there is no convertion text */
Window oldclientwindow; /* the last client window */
Position client_rootx; /* client window position */
Position client_rooty;
XWindowAttributes client_attr; /* client window attributes */
XWindowAttributes focus_attr; /* focus window attributes */
Window probewindow; /* window for event interception */
Boolean createinputobj;
Boolean eventused;
Boolean endnotify; /* endNotify callback is called */
} ConversionControlPart;
typedef struct _ConversionControlRec {
CorePart core;
CompositePart composite;
ShellPart shell;
WMShellPart wm;
VendorShellPart vendor;
TransientShellPart transient;
ConversionControlPart ccontrol;
} ConversionControlRec;
#define XtInheritStartup (void(*)())_XtInherit
#define XtInheritFinish (void(*)())_XtInherit
#define XtInheritChangeAttributes (void(*)())_XtInherit
#define XtInheritChangeFocus (void(*)())_XtInherit
#define XtInheritTextChange (void(*)())_XtInherit
#define XtInheritFix (void(*)())_XtInherit
#define XtInheritModeChange (void(*)())_XtInherit
#define XtInheritSelectionControl (void(*)())_XtInherit
#define XtInheritAuxControl (void(*)())_XtInherit
/*
* ConversionControlClass methods:
*
* void (*Startup)(Widget w, unsigned long mask, ConversionAttributes *attrs)
* called from CControlStartCoversion() at conversion startup.
* all the attributes specified in attrs and client window ID are
* guaranteed to be valid (ie you don't have to check their validity).
*
* void (*Finish)(Widget w)
* called from CControlEndConversion() at conversion finish.
* also called when the client window is destroyed, so take care
* of XErrors, namely BadWindow.
*
* void (*ChangeAttributes)(Widget w, unsigned long mask,
* ConversionAttributes *attrs)
* called from CControlChangeAttributes when conversion attributes
* are changed. like Startup, all the attributes are guaranteed to
* be valid.
*
* void (*ChangeFocus)(Widget w, int set)
* called from CControlChangeFocus at focus change. argument 'set'
* indicates the new focus state. if it is non-zero, focus is set,
* if it is zero, focus is unset.
*
* void (*TextChange)(Widget w)
* called when converting text has changed.
*
* void (*Fix)(Widget w, CCTextCallbackArg *arg)
* called when the text has been fixed.
*
* void (*ModeChange)(Widget w)
* called when input mode has changed.
*
* void (*SelectionControl)(Widget w, ICSelectionControlArg *arg)
* called to control candidate slection.
* see InputConv.h for type ICSelectionControlArg.
*
* void (*AuxControl)(Widget w, ICAuxControlArg *arg)
* called to control auxiliary area.
* see InputConv.h for type ICAuxControlArg.
*/
#endif
|