File indexing completed on 2025-01-18 10:15:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmTextFP_h
0024 #define _XmTextFP_h
0025
0026 #include <Xm/PrimitiveP.h>
0027 #include <Xm/TextF.h>
0028 #ifdef USE_XFT
0029 #include <X11/Xft/Xft.h>
0030 #endif
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036
0037
0038
0039
0040 #define IBEAM_WIDTH 3
0041 #define CARET_WIDTH 9
0042 #define CARET_HEIGHT 5
0043
0044
0045
0046
0047
0048 typedef struct _XmTextFieldClassPart {
0049 XtPointer extension;
0050 } XmTextFieldClassPart;
0051
0052 typedef struct _XmTextFieldClassRec {
0053 CoreClassPart core_class;
0054
0055 XmPrimitiveClassPart primitive_class;
0056 XmTextFieldClassPart text_class;
0057 } XmTextFieldClassRec;
0058
0059 externalref XmTextFieldClassRec xmTextFieldClassRec;
0060
0061
0062
0063
0064 typedef struct _OnTheSpotData {
0065 XmTextPosition start;
0066 XmTextPosition end;
0067 XmTextPosition cursor;
0068 int over_len;
0069 int over_maxlen;
0070 char *over_str;
0071 int under_preedit;
0072 Boolean under_verify_preedit;
0073 Boolean verify_commit;
0074 int pad;
0075 } OnTheSpotDataRec, *OnTheSpotData;
0076
0077
0078
0079
0080
0081 typedef struct _XmTextFieldPart {
0082 XtCallbackList activate_callback;
0083 XtCallbackList focus_callback;
0084 XtCallbackList losing_focus_callback;
0085
0086 XtCallbackList modify_verify_callback;
0087
0088 XtCallbackList wcs_modify_verify_callback;
0089
0090 XtCallbackList motion_verify_callback;
0091
0092 XtCallbackList gain_primary_callback;
0093
0094 XtCallbackList lose_primary_callback;
0095
0096 XtCallbackList value_changed_callback;
0097
0098 char * value;
0099 wchar_t * wc_value;
0100
0101
0102 XmFontList font_list;
0103 #if USE_XFT
0104 XtPointer font;
0105 #else
0106 XFontStruct *font;
0107 #endif
0108 XmTextScanType *selection_array;
0109
0110 _XmHighlightData highlight;
0111
0112 GC gc;
0113 GC image_gc;
0114 GC save_gc;
0115
0116 Pixmap ibeam_off;
0117 Pixmap add_mode_cursor;
0118 Pixmap cursor;
0119 Pixmap putback;
0120 Pixmap stipple_tile;
0121 Pixmap image_clip;
0122
0123 XmTextPosition cursor_position;
0124
0125 XmTextPosition new_h_offset;
0126 XmTextPosition h_offset;
0127
0128 XmTextPosition orig_left;
0129
0130 XmTextPosition orig_right;
0131
0132 XmTextPosition prim_pos_left;
0133 XmTextPosition prim_pos_right;
0134 XmTextPosition prim_anchor;
0135
0136 XmTextPosition sec_pos_left;
0137 XmTextPosition sec_pos_right;
0138 XmTextPosition sec_anchor;
0139
0140 XmTextPosition stuff_pos;
0141
0142 Position select_pos_x;
0143
0144 Time prim_time;
0145 Time dest_time;
0146 Time sec_time;
0147 Time last_time;
0148
0149 XtIntervalId timer_id;
0150 XtIntervalId select_id;
0151
0152 int blink_rate;
0153 int selection_array_count;
0154 int threshold;
0155 int size_allocd;
0156 int string_length;
0157
0158 int cursor_height;
0159 int cursor_width;
0160 int sarray_index;
0161 int max_length;
0162
0163
0164 int max_char_size;
0165 short columns;
0166
0167 Dimension margin_width;
0168 Dimension margin_height;
0169 Dimension average_char_width;
0170 Dimension margin_top;
0171
0172 Dimension margin_bottom;
0173
0174 Dimension font_ascent;
0175 Dimension font_descent;
0176
0177 Boolean resize_width;
0178
0179 Boolean pending_delete;
0180
0181 Boolean editable;
0182 Boolean verify_bell;
0183
0184 Boolean cursor_position_visible;
0185
0186 Boolean traversed;
0187
0188 Boolean add_mode;
0189 Boolean has_focus;
0190
0191 Boolean blink_on;
0192 short int cursor_on;
0193 Boolean refresh_ibeam_off;
0194
0195 Boolean have_inverted_image_gc;
0196 Boolean has_primary;
0197
0198 Boolean has_secondary;
0199
0200 Boolean has_destination;
0201
0202 Boolean sec_drag;
0203 Boolean selection_move;
0204
0205 Boolean pending_off;
0206 Boolean fontlist_created;
0207
0208 Boolean has_rect;
0209 Boolean do_drop;
0210
0211
0212
0213 Boolean cancel;
0214 Boolean extending;
0215 Boolean sec_extending;
0216 Boolean changed_visible;
0217
0218 Boolean have_fontset;
0219
0220 Boolean in_setvalues;
0221 Boolean do_resize;
0222 Boolean redisplay;
0223 Boolean overstrike;
0224 Boolean sel_start;
0225 XtPointer extension;
0226
0227 XtCallbackList destination_callback;
0228 Boolean selection_link;
0229
0230
0231 Boolean take_primary;
0232
0233 GC cursor_gc;
0234
0235 XtIntervalId drag_id;
0236 _XmTextActionRec *transfer_action;
0237
0238 OnTheSpotData onthespot;
0239
0240 Boolean check_set_render_table;
0241 Boolean programmatic_highlights;
0242 #ifdef USE_XFT
0243 Boolean use_xft;
0244 #endif
0245 } XmTextFieldPart;
0246
0247 typedef struct _XmTextFieldRec {
0248 CorePart core;
0249 XmPrimitivePart primitive;
0250 XmTextFieldPart text;
0251 } XmTextFieldRec;
0252
0253
0254
0255
0256
0257
0258
0259
0260 #define TextF_ActivateCallback(tfg) \
0261 (((XmTextFieldWidget)(tfg)) -> text.activate_callback)
0262 #define TextF_LosingFocusCallback(tfg) \
0263 (((XmTextFieldWidget)(tfg)) -> text.losing_focus_callback)
0264 #define TextF_FocusCallback(tfg) \
0265 (((XmTextFieldWidget)(tfg)) -> text.focus_callback)
0266 #define TextF_ModifyVerifyCallback(tfg) \
0267 (((XmTextFieldWidget)(tfg)) -> text.modify_verify_callback)
0268 #define TextF_ModifyVerifyCallbackWcs(tfg) \
0269 (((XmTextFieldWidget)(tfg)) -> text.wcs_modify_verify_callback)
0270 #define TextF_MotionVerifyCallback(tfg) \
0271 (((XmTextFieldWidget)(tfg)) -> text.motion_verify_callback)
0272 #define TextF_ValueChangedCallback(tfg) \
0273 (((XmTextFieldWidget)(tfg)) -> text.value_changed_callback)
0274 #define TextF_Value(tfg) \
0275 (((XmTextFieldWidget)(tfg)) -> text.value)
0276 #define TextF_WcValue(tfg) \
0277 (((XmTextFieldWidget)(tfg)) -> text.wc_value)
0278 #define TextF_MarginHeight(tfg) \
0279 (((XmTextFieldWidget)(tfg)) -> text.margin_height)
0280 #define TextF_MarginWidth(tfg) \
0281 (((XmTextFieldWidget)(tfg)) -> text.margin_width)
0282 #define TextF_CursorPosition(tfg) \
0283 (((XmTextFieldWidget)(tfg)) -> text.cursor_position)
0284 #define TextF_Columns(tfg) \
0285 (((XmTextFieldWidget)(tfg)) -> text.columns)
0286 #define TextF_MaxLength(tfg) \
0287 (((XmTextFieldWidget)(tfg)) -> text.max_length)
0288 #define TextF_BlinkRate(tfg) \
0289 (((XmTextFieldWidget)(tfg)) -> text.blink_rate)
0290 #define TextF_FontList(tfg) \
0291 (((XmTextFieldWidget)(tfg)) -> text.font_list)
0292 #define TextF_Font(tfg) \
0293 ((XFontStruct*)(((XmTextFieldWidget)(tfg)) -> text.font))
0294 #define TextF_FontAscent(tfg) \
0295 (((XmTextFieldWidget)(tfg)) -> text.font_ascent)
0296 #define TextF_FontDescent(tfg) \
0297 (((XmTextFieldWidget)(tfg)) -> text.font_descent)
0298 #define TextF_SelectionArray(tfg) \
0299 (((XmTextFieldWidget)(tfg)) -> text.selection_array)
0300 #define TextF_SelectionArrayCount(tfg) \
0301 (((XmTextFieldWidget)(tfg)) -> text.selection_array_count)
0302 #define TextF_ResizeWidth(tfg) \
0303 (((XmTextFieldWidget)(tfg)) -> text.resize_width)
0304 #define TextF_PendingDelete(tfg) \
0305 (((XmTextFieldWidget)(tfg)) -> text.pending_delete)
0306 #define TextF_Editable(tfg) \
0307 (((XmTextFieldWidget)(tfg)) -> text.editable)
0308 #define TextF_CursorPositionVisible(tfg) \
0309 (((XmTextFieldWidget)(tfg)) -> text.cursor_position_visible)
0310 #define TextF_Threshold(tfg) \
0311 (((XmTextFieldWidget)(tfg)) -> text.threshold)
0312 #define TextF_UseFontSet(tfg) \
0313 (((XmTextFieldWidget)(tfg)) -> text.have_fontset)
0314 #ifdef USE_XFT
0315 #define TextF_UseXft(tfg) \
0316 (((XmTextFieldWidget)(tfg)) -> text.use_xft)
0317 #define TextF_XftFont(tfg) \
0318 ((XftFont*)(((XmTextFieldWidget)(tfg)) -> text.font))
0319 #endif
0320
0321
0322
0323
0324 #define PreStart(tfg) (((XmTextFieldWidget)(tfg)) -> \
0325 text.onthespot->start)
0326 #define PreEnd(tfg) (((XmTextFieldWidget)(tfg)) -> \
0327 text.onthespot->end)
0328 #define PreCursor(tfg) (((XmTextFieldWidget)(tfg)) -> \
0329 text.onthespot->cursor)
0330 #define FUnderVerifyPreedit(tfg) (((XmTextFieldWidget)(tfg)) -> \
0331 text.onthespot->under_verify_preedit)
0332 #define FVerifyCommitNeeded(tfg) (((XmTextFieldWidget)(tfg)) -> \
0333 text.onthespot->verify_commit)
0334
0335 #ifdef __cplusplus
0336 }
0337 #endif
0338
0339 #endif