~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to Xw/Field.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2004-08-29 10:53:42 UTC
  • Revision ID: james.westby@ubuntu.com-20040829105342-qgmnry37eadfkoxx
Tags: upstream-1.1.3
ImportĀ upstreamĀ versionĀ 1.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Field.h, a single line text entry widget, based on Rob's TextField Widget
 
3
 *
 
4
 * Copyright (c) 1997 Rasca M. Gmelch
 
5
 * Copyright (c) 1995 Robert W. McMullen
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Library General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Library General Public
 
18
 * License along with this library; if not, write to the Free
 
19
 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
20
 *
 
21
 *
 
22
 * Author: Rob McMullen <rwmcm@orion.ae.utexas.edu>
 
23
 *         http://www.ae.utexas.edu/~rwmcm
 
24
 */
 
25
 
 
26
#ifndef __Field_H__
 
27
#define __Field_H__
 
28
 
 
29
#include <Xw/Base.h>
 
30
 
 
31
#define _TextField_WIDGET_VERSION       1.2
 
32
 
 
33
#ifndef XtIsTextField
 
34
#define XtIsTextField(w) XtIsSubclass((Widget)w, xwFieldWidgetClass)
 
35
#endif 
 
36
 
 
37
/* Athena style resource names */
 
38
/* class record constants */
 
39
 
 
40
#ifndef XtNecho
 
41
#define XtNecho                 "echo"
 
42
#endif
 
43
#ifndef XtNpendingDelete
 
44
#define XtNpendingDelete        "pendingDelete"
 
45
#endif
 
46
#ifndef XtNlength
 
47
#define XtNlength               "length"
 
48
#endif
 
49
#ifndef XtNstring
 
50
#define XtNstring               "string"
 
51
#endif
 
52
#ifndef XtNinsertPosition
 
53
#define XtNinsertPosition       "insertPosition"
 
54
#endif
 
55
#ifndef XtNdisplayCaret
 
56
#define XtNdisplayCaret         "displayCaret"
 
57
#endif
 
58
#ifndef XtNeditable
 
59
#define XtNeditable             "editable"
 
60
#endif
 
61
#define XtNmargin               "margin"
 
62
#define XtNcursorWidth          "cursorWidth"
 
63
#define XtNallowSelection       "allowSelection"
 
64
#define XtNactivateCallback     "activateCallback"
 
65
#define XtNactiveBg                     "activeBackground"
 
66
#define XtCActiveBg                     "ActiveBackground"
 
67
#define XtNonlyNumber           "onlyNumber"
 
68
#define XtCOnlyNumber           "OnlyNumber"
 
69
 
 
70
extern WidgetClass xwFieldWidgetClass;
 
71
 
 
72
typedef struct _FieldClassRec *FieldWidgetClass;
 
73
typedef struct _FieldRec      *FieldWidget, *XwFieldWidget;
 
74
 
 
75
typedef struct _TextFieldReturnStruct {
 
76
        int     reason;         /* Motif compatibility */
 
77
        XEvent  *event;
 
78
        char    *string;
 
79
} FieldReturnStruct;
 
80
 
 
81
/*
 
82
** Public function declarations
 
83
*/
 
84
#if __STDC__ || defined(__cplusplus)
 
85
#define P_(s) s
 
86
#else
 
87
#define P_(s) ()
 
88
#endif
 
89
 
 
90
/* TextField.c */
 
91
Boolean FieldGetEditable P_((Widget aw));
 
92
int FieldGetInsertionPosition P_((Widget aw));
 
93
char *XwFieldGetString P_((Widget aw));
 
94
void XwFieldInsert P_((Widget aw, int pos, char *str));
 
95
void XwFieldReplace P_((Widget aw, int first, int last, char *str));
 
96
void XwFieldSetEditable P_((Widget aw, Boolean editable));
 
97
void XwFieldSetInsertionPosition P_((Widget aw, int pos));
 
98
void XwFieldSetSelection P_((Widget aw, int start, int end, Time time));
 
99
void XwFieldSetString P_((Widget aw, char *str));
 
100
#undef P_
 
101
#endif /* _Field_H */
 
102