Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:15:29

0001 /* 
0002  * Motif
0003  *
0004  * Copyright (c) 1987-2012, The Open Group. All rights reserved.
0005  *
0006  * These libraries and programs are free software; you can
0007  * redistribute them and/or modify them under the terms of the GNU
0008  * Lesser General Public License as published by the Free Software
0009  * Foundation; either version 2 of the License, or (at your option)
0010  * any later version.
0011  *
0012  * These libraries and programs are distributed in the hope that
0013  * they will be useful, but WITHOUT ANY WARRANTY; without even the
0014  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
0015  * PURPOSE. See the GNU Lesser General Public License for more
0016  * details.
0017  *
0018  * You should have received a copy of the GNU Lesser General Public
0019  * License along with these librararies and programs; if not, write
0020  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
0021  * Floor, Boston, MA 02110-1301 USA
0022 */ 
0023 #ifndef _XmTextInP_h
0024 #define _XmTextInP_h
0025 
0026 #include <Xm/Text.h>
0027 #include <Xm/TextStrSoP.h>
0028 
0029 #ifdef __cplusplus
0030 extern "C" {
0031 #endif
0032 
0033 /****************************************************************
0034  *
0035  * Definitions for modules implementing text input modules.
0036  *
0037  ****************************************************************/
0038 
0039 typedef struct {
0040     int x;
0041     int y;
0042 } SelectionHint;
0043 
0044 typedef struct _InputDataRec {
0045     XmTextWidget widget;        /* Back-pointer to widget record. */
0046     XmTextScanType *sarray; /* Description of what to cycle through on */
0047                 /* selections. */
0048     int sarraycount;        /* Number of elements in above. */
0049     int new_sel_length;     /* New selection length for selection moves. */
0050     int threshold;      /* number of pixels crossed -> drag */
0051     SelectionHint selectionHint; /* saved coords of button down */
0052     SelectionHint Sel2Hint; /* saved the coords of button down */
0053     XtIntervalId select_id;
0054     XmTextScanType stype;   /* Current selection type. */
0055     XmTextScanDirection extendDir;
0056     XmTextScanDirection Sel2ExtendDir;
0057     XmTextPosition origLeft, origRight;
0058     XmTextPosition Sel2OrigLeft, Sel2OrigRight;
0059     XmTextPosition stuffpos;
0060     XmTextPosition sel2Left, sel2Right; /* secondary selection */
0061     XmTextPosition anchor;  /* anchor point of the primary selection */
0062     Position select_pos_x;  /* x position for timer-based scrolling */
0063     Position select_pos_y;  /* y position for timer-based scrolling */
0064     Boolean pendingdelete;  /* TRUE if we're implementing pending delete */
0065     Boolean syncing;        /* If TRUE, then we've multiple keystrokes */
0066     Boolean extending;      /* true if we are extending */
0067     Boolean Sel2Extending;  /* true if we are extending */
0068     Boolean hasSel2;        /* has secondary selection */
0069     Boolean has_destination;    /* has destination selection */
0070     Boolean selectionMove;  /* delete selection after stuff */
0071     Boolean cancel;     /* indicates that cancel was pressed */
0072     Boolean overstrike;         /* overstrike */
0073     Boolean sel_start;      /* indicates that a btn2 was pressed */
0074     Time dest_time;     /* time of destination selection ownership */
0075     Time sec_time;      /* time of secondary selection ownership */
0076     Time lasttime;      /* Time of last event. */
0077     Boolean selectionLink;  /* This is a link vs. a copy operation */
0078     XtIntervalId drag_id;       /* timer to start btn1 drag */
0079     _XmTextActionRec *transfer_action;  /* to keep track of delayed action */
0080 } InputDataRec, *InputData;
0081 
0082 
0083 /* 
0084  * Create a new instance of an input object.  By the time this is called,
0085  * the widget context has been saved.
0086  */
0087 
0088 typedef void (*InputCreateProc)(
0089             Widget,
0090             ArgList,
0091             Cardinal) ;
0092 
0093 /*
0094  * Get values out of the input object.
0095  */
0096 typedef void (*InputGetValuesProc)(
0097             Widget,
0098             ArgList,
0099             Cardinal) ;
0100 
0101 /*
0102  * Set values in the input object.
0103  */
0104 
0105 typedef void (*InputSetValuesProc)(
0106             Widget,
0107             Widget,
0108             Widget,
0109             ArgList,
0110             Cardinal *) ;
0111 
0112 /*
0113  * Inform input of invalidated positions.
0114  */
0115 typedef void (*InputInvalidateProc)(
0116             XmTextWidget,
0117             XmTextPosition,
0118             XmTextPosition,
0119             long) ;
0120 
0121 /*
0122  * Get secondary resources.
0123  */
0124 typedef void (*InputGetSecResProc)(
0125             XmSecondaryResourceData *) ;
0126 
0127 
0128 typedef struct _InputRec {
0129     struct _InputDataRec *data; /* Input-specific data; opaque type. */
0130     InputInvalidateProc Invalidate;
0131     InputGetValuesProc  GetValues;
0132     InputSetValuesProc  SetValues;
0133     XtWidgetProc    destroy;
0134     InputGetSecResProc  GetSecResData;
0135 } InputRec;
0136 
0137 
0138 externalref XtPointer _XmdefaultTextActionsTable;
0139 externalref Cardinal  _XmdefaultTextActionsTableSize;
0140 
0141 
0142 #ifdef __cplusplus
0143 }  /* Close scope of 'extern "C"' declaration which encloses file. */
0144 #endif
0145 
0146 #endif /* _XmTextInP_h */
0147 /*DON'T ADD ANYTHING AFTER THIS #endif */