1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 #ifndef XNE_TEXTFIELDP_H
24 #define XNE_TEXTFIELDP_H
25
26 #include <Xm/XmP.h>
27 #include <Xm/PrimitiveP.h>
28 #include <X11/CoreP.h>
29
30 #include "../source/textDisp.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 typedef struct TextFieldClassPart {
37 int unused;
38 } TextFieldClassPart;
39
40 typedef struct TextFieldClassRec {
41 CoreClassPart core_class;
42 XmPrimitiveClassPart primitive_class;
43 TextFieldClassPart textfield_class;
44 } TextFieldClassRec;
45
46 extern TextFieldClassRec nTextFieldClassRec;
47
48 typedef struct TextFieldPart {
49 XtCallbackList valueChangedCB;
50 XtCallbackList focusCB;
51 XtCallbackList losingFocusCB;
52 XtCallbackList activateCB;
53
54 int hasFocus;
55
56 char *renderTable;
57 NFont *font;
58 XIM xim;
59 XIC xic;
60 GC gc;
61 GC gcInv;
62 GC highlightBackground;
63
64 XftColor foregroundColor;
65 XftColor backgroundColor;
66 XftDraw *d;
67
68 char *buffer;
69 size_t alloc;
70 size_t length;
71 size_t pos;
72
73 int posCalc;
74 int posX;
75
76 int scrollX;
77
78 int textarea_xoff;
79 int textarea_yoff;
80
81 int hasSelection;
82 int selStart;
83 int selEnd;
84
85 int selStartX;
86 int selEndX;
87
88 Time btn1ClickPrev;
89 Time btn1ClickPrev2;
90 int dontAdjustSel;
91
92 int blinkrate;
93 int cursorOn;
94 XtIntervalId blinkProcId;
95 } TextFieldPart;
96
97 typedef struct TextFieldRec {
98 CorePart core;
99 XmPrimitivePart primitive;
100 TextFieldPart textfield;
101 } TextFieldRec;
102
103
104 #ifdef __cplusplus
105 }
106 #endif
107
108 #endif
109
110