Blame lib/Xm/TextInP.h

Packit b099d7
/* 
Packit b099d7
 * Motif
Packit b099d7
 *
Packit b099d7
 * Copyright (c) 1987-2012, The Open Group. All rights reserved.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are free software; you can
Packit b099d7
 * redistribute them and/or modify them under the terms of the GNU
Packit b099d7
 * Lesser General Public License as published by the Free Software
Packit b099d7
 * Foundation; either version 2 of the License, or (at your option)
Packit b099d7
 * any later version.
Packit b099d7
 *
Packit b099d7
 * These libraries and programs are distributed in the hope that
Packit b099d7
 * they will be useful, but WITHOUT ANY WARRANTY; without even the
Packit b099d7
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
Packit b099d7
 * PURPOSE. See the GNU Lesser General Public License for more
Packit b099d7
 * details.
Packit b099d7
 *
Packit b099d7
 * You should have received a copy of the GNU Lesser General Public
Packit b099d7
 * License along with these librararies and programs; if not, write
Packit b099d7
 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
Packit b099d7
 * Floor, Boston, MA 02110-1301 USA
Packit b099d7
*/ 
Packit b099d7
/* 
Packit b099d7
 * HISTORY
Packit b099d7
*/ 
Packit b099d7
/* $XConsortium: TextInP.h /main/13 1995/07/13 18:07:54 drk $ */
Packit b099d7
/* (c) Copyright 1989, DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. */
Packit b099d7
/* (c) Copyright 1987, 1988, 1989, 1990, 1991, 1992 HEWLETT-PACKARD COMPANY */
Packit b099d7
#ifndef _XmTextInP_h
Packit b099d7
#define _XmTextInP_h
Packit b099d7
Packit b099d7
#include <Xm/Text.h>
Packit b099d7
#include <Xm/TextStrSoP.h>
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
extern "C" {
Packit b099d7
#endif
Packit b099d7
Packit b099d7
/****************************************************************
Packit b099d7
 *
Packit b099d7
 * Definitions for modules implementing text input modules.
Packit b099d7
 *
Packit b099d7
 ****************************************************************/
Packit b099d7
Packit b099d7
typedef struct {
Packit b099d7
    int x;
Packit b099d7
    int y;
Packit b099d7
} SelectionHint;
Packit b099d7
Packit b099d7
typedef struct _InputDataRec {
Packit b099d7
    XmTextWidget widget;		/* Back-pointer to widget record. */
Packit b099d7
    XmTextScanType *sarray;	/* Description of what to cycle through on */
Packit b099d7
				/* selections. */
Packit b099d7
    int sarraycount;		/* Number of elements in above. */
Packit b099d7
    int new_sel_length;		/* New selection length for selection moves. */
Packit b099d7
    int threshold;		/* number of pixels crossed -> drag */
Packit b099d7
    SelectionHint selectionHint; /* saved coords of button down */
Packit b099d7
    SelectionHint Sel2Hint;	/* saved the coords of button down */
Packit b099d7
    XtIntervalId select_id;
Packit b099d7
    XmTextScanType stype;	/* Current selection type. */
Packit b099d7
    XmTextScanDirection extendDir;
Packit b099d7
    XmTextScanDirection Sel2ExtendDir;
Packit b099d7
    XmTextPosition origLeft, origRight;
Packit b099d7
    XmTextPosition Sel2OrigLeft, Sel2OrigRight;
Packit b099d7
    XmTextPosition stuffpos;
Packit b099d7
    XmTextPosition sel2Left, sel2Right; /* secondary selection */
Packit b099d7
    XmTextPosition anchor;	/* anchor point of the primary selection */
Packit b099d7
    Position select_pos_x;	/* x position for timer-based scrolling */
Packit b099d7
    Position select_pos_y;	/* y position for timer-based scrolling */
Packit b099d7
    Boolean pendingdelete;	/* TRUE if we're implementing pending delete */
Packit b099d7
    Boolean syncing;		/* If TRUE, then we've multiple keystrokes */
Packit b099d7
    Boolean extending;      /* true if we are extending */
Packit b099d7
    Boolean Sel2Extending;	/* true if we are extending */
Packit b099d7
    Boolean hasSel2;   		/* has secondary selection */
Packit b099d7
    Boolean has_destination;  	/* has destination selection */
Packit b099d7
    Boolean selectionMove;	/* delete selection after stuff */
Packit b099d7
    Boolean cancel;		/* indicates that cancel was pressed */
Packit b099d7
    Boolean overstrike;     	/* overstrike */
Packit b099d7
    Boolean sel_start;		/* indicates that a btn2 was pressed */
Packit b099d7
    Time dest_time;		/* time of destination selection ownership */
Packit b099d7
    Time sec_time;		/* time of secondary selection ownership */
Packit b099d7
    Time lasttime;		/* Time of last event. */
Packit b099d7
    Boolean selectionLink;	/* This is a link vs. a copy operation */
Packit b099d7
    XtIntervalId drag_id;       /* timer to start btn1 drag */
Packit b099d7
    _XmTextActionRec *transfer_action;  /* to keep track of delayed action */
Packit b099d7
} InputDataRec, *InputData;
Packit b099d7
Packit b099d7
Packit b099d7
/* 
Packit b099d7
 * Create a new instance of an input object.  By the time this is called,
Packit b099d7
 * the widget context has been saved.
Packit b099d7
 */
Packit b099d7
Packit b099d7
typedef void (*InputCreateProc)(
Packit b099d7
			Widget,
Packit b099d7
			ArgList,
Packit b099d7
			Cardinal) ;
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Get values out of the input object.
Packit b099d7
 */
Packit b099d7
typedef void (*InputGetValuesProc)(
Packit b099d7
			Widget,
Packit b099d7
			ArgList,
Packit b099d7
			Cardinal) ;
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Set values in the input object.
Packit b099d7
 */
Packit b099d7
Packit b099d7
typedef void (*InputSetValuesProc)(
Packit b099d7
			Widget,
Packit b099d7
			Widget,
Packit b099d7
			Widget,
Packit b099d7
			ArgList,
Packit b099d7
			Cardinal *) ;
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Inform input of invalidated positions.
Packit b099d7
 */
Packit b099d7
typedef void (*InputInvalidateProc)(
Packit b099d7
			XmTextWidget,
Packit b099d7
			XmTextPosition,
Packit b099d7
			XmTextPosition,
Packit b099d7
			long) ;
Packit b099d7
Packit b099d7
/*
Packit b099d7
 * Get secondary resources.
Packit b099d7
 */
Packit b099d7
typedef void (*InputGetSecResProc)(
Packit b099d7
			XmSecondaryResourceData *) ;
Packit b099d7
Packit b099d7
Packit b099d7
typedef struct _InputRec {
Packit b099d7
    struct _InputDataRec *data;	/* Input-specific data; opaque type. */
Packit b099d7
    InputInvalidateProc Invalidate;
Packit b099d7
    InputGetValuesProc  GetValues;
Packit b099d7
    InputSetValuesProc	SetValues;
Packit b099d7
    XtWidgetProc	destroy;
Packit b099d7
    InputGetSecResProc  GetSecResData;
Packit b099d7
} InputRec;
Packit b099d7
Packit b099d7
Packit b099d7
externalref XtPointer _XmdefaultTextActionsTable;
Packit b099d7
externalref Cardinal  _XmdefaultTextActionsTableSize;
Packit b099d7
Packit b099d7
Packit b099d7
#ifdef __cplusplus
Packit b099d7
}  /* Close scope of 'extern "C"' declaration which encloses file. */
Packit b099d7
#endif
Packit b099d7
Packit b099d7
#endif /* _XmTextInP_h */
Packit b099d7
/*DON'T ADD ANYTHING AFTER THIS #endif */