home *** CD-ROM | disk | FTP | other *** search
/ IRIS Development Option 6.2 / IRIS_Development_Option_6.2_814-0478-001.iso / dist / dev.idb / usr / include / abi / Xm / TextInP.h.z / TextInP.h
C/C++ Source or Header  |  1996-03-14  |  6KB  |  205 lines

  1. /* 
  2.  * (c) Copyright 1989, 1990, 1991, 1992, 1993 OPEN SOFTWARE FOUNDATION, INC. 
  3.  * ALL RIGHTS RESERVED 
  4. */ 
  5. /* 
  6.  * Motif Release 1.2.3
  7. */ 
  8. /*   $RCSfile: TextInP.h,v $ $Revision: 1.2 $ $Date: 1994/04/20 01:40:11 $ */
  9. /*
  10. *  (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
  11. /*
  12. *  (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
  13. #ifndef _XmTextInP_h
  14. #define _XmTextInP_h
  15.  
  16. #include <Xm/Text.h>
  17. #include <Xm/TextStrSoP.h>
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /****************************************************************
  24.  *
  25.  * Definitions for modules implementing text input modules.
  26.  *
  27.  ****************************************************************/
  28.  
  29. typedef struct {
  30.     int x;
  31.     int y;
  32. } SelectionHint;
  33.  
  34. typedef struct _InputDataRec {
  35.     XmTextWidget widget;        /* Back-pointer to widget record. */
  36.     XmTextScanType *sarray;    /* Description of what to cycle through on */
  37.                 /* selections. */
  38.     int sarraycount;        /* Number of elements in above. */
  39.     int new_sel_length;        /* New selection length for selection moves. */
  40.     int threshold;        /* number of pixels crossed -> drag */
  41.     SelectionHint selectionHint; /* saved coords of button down */
  42.     SelectionHint Sel2Hint;    /* saved the coords of button down */
  43.     XtIntervalId select_id;
  44.     XmTextScanType stype;    /* Current selection type. */
  45.     XmTextScanDirection extendDir;
  46.     XmTextScanDirection Sel2ExtendDir;
  47.     XmTextPosition origLeft, origRight;
  48.     XmTextPosition Sel2OrigLeft, Sel2OrigRight;
  49.     XmTextPosition stuffpos;
  50.     XmTextPosition sel2Left, sel2Right; /* secondary selection */
  51.     XmTextPosition anchor;    /* anchor point of the primary selection */
  52.     Position select_pos_x;    /* x position for timer-based scrolling */
  53.     Position select_pos_y;    /* y position for timer-based scrolling */
  54.     Boolean pendingdelete;    /* TRUE if we're implementing pending delete */
  55.     Boolean syncing;        /* If TRUE, then we've multiple keystrokes */
  56.     Boolean extending;      /* true if we are extending */
  57.     Boolean Sel2Extending;    /* true if we are extending */
  58.     Boolean hasSel2;           /* has secondary selection */
  59.     Boolean has_destination;      /* has destination selection */
  60.     Boolean selectionMove;    /* delete selection after stuff */
  61.     Boolean cancel;        /* indicates that cancel was pressed */
  62.     Boolean overstrike;         /* overstrike */
  63.     Boolean sel_start;        /* indicates that a btn2 was pressed */
  64.     Time dest_time;        /* time of destination selection ownership */
  65.     Time sec_time;        /* time of secondary selection ownership */
  66.     Time lasttime;        /* Time of last event. */
  67. } InputDataRec, *InputData;
  68.  
  69.  
  70. /* 
  71.  * Create a new instance of an input object.  By the time this is called,
  72.  * the widget context has been saved.
  73.  */
  74.  
  75. #ifdef _NO_PROTO
  76. typedef void (*InputCreateProc)(); /* widget, args, num_args */
  77. #else
  78. typedef void (*InputCreateProc)(
  79.             Widget,
  80.             ArgList,
  81.             Cardinal) ;
  82. #endif
  83.  
  84. /*
  85.  * Get values out of the input object.
  86.  */
  87. #ifdef _NO_PROTO
  88. typedef void (*InputGetValuesProc)(); /* widget, args, num_args */
  89. #else
  90. typedef void (*InputGetValuesProc)(
  91.             Widget,
  92.             ArgList,
  93.             Cardinal) ;
  94. #endif
  95.  
  96. /*
  97.  * Set values in the input object.
  98.  */
  99.  
  100. #ifdef _NO_PROTO
  101. typedef void (*InputSetValuesProc)(); /* oldw, reqw, new_w, args, num_args */
  102. #else
  103. typedef void (*InputSetValuesProc)(
  104.             Widget,
  105.             Widget,
  106.             Widget,
  107.             ArgList,
  108.             Cardinal *) ;
  109. #endif
  110.  
  111. /*
  112.  * Inform input of invalidated positions.
  113.  */
  114. #ifdef _NO_PROTO
  115. typedef void (*InputInvalidateProc)(); /* ctx, position, topos, delta */
  116. #else
  117. typedef void (*InputInvalidateProc)(
  118.             XmTextWidget,
  119.             XmTextPosition,
  120.             XmTextPosition,
  121.             long) ;
  122. #endif
  123.  
  124. /*
  125.  * Get secondary resources.
  126.  */
  127. #ifdef _NO_PROTO
  128. typedef void (*InputGetSecResProc)(); /* secResDataRtn */
  129. #else
  130. typedef void (*InputGetSecResProc)(
  131.             XmSecondaryResourceData *) ;
  132. #endif
  133.  
  134.  
  135. typedef struct _InputRec {
  136.     struct _InputDataRec *data;    /* Input-specific data; opaque type. */
  137.     InputInvalidateProc Invalidate;
  138.     InputGetValuesProc  GetValues;
  139.     InputSetValuesProc    SetValues;
  140.     XtWidgetProc    destroy;
  141.     InputGetSecResProc  GetSecResData;
  142. } InputRec;
  143.  
  144.  
  145. externalref XtPointer _XmdefaultTextActionsTable;
  146. externalref Cardinal  _XmdefaultTextActionsTableSize;
  147.  
  148.  
  149.  
  150. /********    Private Function Declarations    ********/
  151. #ifdef _NO_PROTO
  152.  
  153. extern Widget _XmTextGetDropReciever() ;
  154. extern Boolean _XmTextHasDestination() ;
  155. extern Boolean _XmTextSetDestinationSelection() ;
  156. extern Boolean _XmTextSetSel2() ;
  157. extern Boolean _XmTextGetSel2() ;
  158. extern void _XmTextInputGetSecResData() ;
  159. extern XmTextPosition _XmTextGetAnchor() ;
  160. extern void _XmTextInputCreate() ;
  161.  
  162. #else
  163.  
  164. extern Widget _XmTextGetDropReciever( 
  165.                         Widget w) ;
  166. extern Boolean _XmTextHasDestination( 
  167.                         Widget w) ;
  168. extern Boolean _XmTextSetDestinationSelection( 
  169.                         Widget w,
  170.                         XmTextPosition position,
  171. #if NeedWidePrototypes
  172.                         int disown,
  173. #else
  174.                         Boolean disown,
  175. #endif /* NeedWidePrototypes */
  176.                         Time set_time) ;
  177. extern Boolean _XmTextSetSel2( 
  178.                         XmTextWidget tw,
  179.                         XmTextPosition left,
  180.                         XmTextPosition right,
  181.                         Time set_time) ;
  182. extern Boolean _XmTextGetSel2( 
  183.                         XmTextWidget tw,
  184.                         XmTextPosition *left,
  185.                         XmTextPosition *right) ;
  186. extern void _XmTextInputGetSecResData( 
  187.                         XmSecondaryResourceData *secResDataRtn) ;
  188. extern XmTextPosition _XmTextGetAnchor( 
  189.                         XmTextWidget tw) ;
  190. extern void _XmTextInputCreate( 
  191.                         Widget wid,
  192.                         ArgList args,
  193.                         Cardinal num_args) ;
  194.  
  195. #endif /* _NO_PROTO */
  196. /********    End Private Function Declarations    ********/
  197.  
  198.  
  199. #ifdef __cplusplus
  200. }  /* Close scope of 'extern "C"' declaration which encloses file. */
  201. #endif
  202.  
  203. #endif /* _XmTextInP_h */
  204. /*DON'T ADD ANYTHING AFTER THIS #endif */
  205.