1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 #ifndef NEDIT_MISC_H_INCLUDED
28 #define NEDIT_MISC_H_INCLUDED
29
30 #include <X11/Intrinsic.h>
31 #include <Xm/Xm.h>
32 #include <Xm/CutPaste.h>
33
34 #define TEXT_READ_OK 0
35 #define TEXT_IS_BLANK 1
36 #define TEXT_NOT_NUMBER 2
37
38
39 #define MAX_GEOM_STRING_LEN 24
40
41
42
43
44 #define MAX_ACCEL_LEN 100
45
46
47 #define BUTTON_WIDTH_MARGIN 12
48
49
50 void AddMotifCloseCallback(Widget shell, XtCallbackProc closeCB,
void *arg);
51 void SuppressPassiveGrabWarnings(
void);
52 void PopDownBugPatch(Widget w);
53 void RemapDeleteKey(Widget w);
54 void SetDeleteRemap(
int state);
55 void RealizeWithoutForcingPosition(Widget shell);
56 void RemovePPositionHint(Widget shell);
57 void ManageDialogCenteredOnPointer(Widget dialogChild);
58 void SetPointerCenteredDialogs(
int state);
59 void RaiseDialogWindow(Widget shell);
60 void RaiseShellWindow(Widget shell, Boolean focus);
61 void RaiseWindow(Display *display, Window w, Boolean focus);
62 void AddDialogMnemonicHandler(Widget dialog,
int unmodifiedToo);
63 void RemoveDialogMnemonicHandler(Widget dialog);
64 void AccelLockBugPatch(Widget topWidget, Widget topMenuContainer);
65 void UpdateAccelLockPatch(Widget topWidget, Widget newButton);
66 char *GetXmStringText(XmString fromString);
67 XFontStruct *GetDefaultFontStruct(Display *d, XmFontList font);
68 XmString* StringTable(
int count, ...);
69 void FreeStringTable(XmString *table);
70 void SimulateButtonPress(Widget widget);
71 Widget AddMenuItem(Widget parent,
char *name,
char *label,
char mnemonic,
72 char *acc,
char *accText, XtCallbackProc callback,
void *cbArg);
73 Widget AddMenuToggle(Widget parent,
char *name,
char *label,
char mnemonic,
74 char *acc,
char *accText, XtCallbackProc callback,
void *cbArg,
int set);
75 Widget AddSubMenu(Widget parent,
char *name,
char *label,
char mnemonic);
76 void SetIntText(Widget text,
int value);
77 int GetFloatText(Widget text,
double *value);
78 int GetIntText(Widget text,
int *value);
79 int GetFloatTextWarn(Widget text,
double *value,
const char *fieldName,
int warnBlank);
80 int GetIntTextWarn(Widget text,
int *value,
const char *fieldName,
int warnBlank);
81 char* TextGetStringUtf8(Widget text);
82 int TextWidgetIsBlank(Widget textW);
83 void MakeSingleLineTextW(Widget textW);
84 void BeginWait(Widget topCursorWidget);
85 void BusyWait(Widget anyWidget);
86 void EndWait(Widget topCursorWidget);
87 void PasswordText(Widget w,
char *passTxt);
88 void AddHistoryToTextWidget(Widget textW,
char ***historyList,
int *nItems);
89 void AddToHistoryList(
char *newItem,
char ***historyList,
int *nItems);
90 void CreateGeometryString(
char *string,
int x,
int y,
91 int width,
int height,
int bitmask);
92 Boolean FindBestVisual(Display *display,
const char *appName,
const char *appClass,
93 Visual **visual,
int *depth, Colormap *colormap);
94 Widget CreateDialogShell(Widget parent,
char *name, ArgList arglist,
95 Cardinal argcount);
96 Widget CreatePopupMenu(Widget parent,
char *name, ArgList arglist,
97 Cardinal argcount);
98 Widget CreatePulldownMenu(Widget parent,
char *name, ArgList arglist,
99 Cardinal argcount);
100 Widget CreatePromptDialog(Widget parent,
char *name, ArgList arglist,
101 Cardinal argcount);
102 Widget CreateSelectionDialog(Widget parent,
char *name, ArgList arglist,
103 Cardinal argcount);
104 Widget CreateFormDialog(Widget parent,
char *name, ArgList arglist,
105 Cardinal argcount);
106 Widget CreateFileSelectionDialog(Widget parent,
char *name, ArgList arglist,
107 Cardinal argcount);
108 Widget CreateQuestionDialog(Widget parent,
char *name, ArgList arglist,
109 Cardinal argcount);
110 Widget CreateMessageDialog(Widget parent,
char *name, ArgList arglist,
111 Cardinal argcount);
112 Widget CreateErrorDialog(Widget parent,
char *name, ArgList arglist,
113 Cardinal argcount);
114 Widget CreateShellWithBestVis(String appName, String appClass,
115 WidgetClass class, Display *display, ArgList args, Cardinal nArgs);
116 Widget CreatePopupShellWithBestVis(String shellName, WidgetClass class,
117 Widget parent, ArgList arglist, Cardinal argcount);
118 Widget CreateWidget(Widget parent,
const char *name, WidgetClass class,
119 ArgList arglist, Cardinal argcount);
120 Modifiers GetNumLockModMask(Display *display);
121 void InstallMouseWheelActions(XtAppContext context);
122 void AddMouseWheelSupport(Widget w);
123 void XmContainerAddMouseWheelSupport(Widget w);
124 void RadioButtonChangeState(Widget widget, Boolean state, Boolean notify);
125 void CloseAllPopupsFor(Widget shell);
126 long QueryCurrentDesktop(Display *display, Window rootWindow);
127 long QueryDesktop(Display *display, Widget shell);
128 int SpinClipboardStartCopy(Display *display, Window window,
129 XmString clip_label, Time timestamp, Widget widget,
130 XmCutPasteProc callback,
long *item_id);
131 int SpinClipboardCopy(Display *display, Window window,
long item_id,
132 char *format_name, XtPointer buffer,
unsigned long length,
133 long private_id,
long *data_id);
134 int SpinClipboardEndCopy(Display *display, Window window,
long item_id);
135 int SpinClipboardInquireLength(Display *display, Window window,
136 char *format_name,
unsigned long *length);
137 int SpinClipboardRetrieve(Display *display, Window window,
char *format_name,
138 XtPointer buffer,
unsigned long length,
unsigned long *num_bytes,
139 long *private_id);
140 int SpinClipboardLock(Display *display, Window window);
141 int SpinClipboardUnlock(Display *display, Window window);
142 void WmClientMsg(Display *disp, Window win,
const char *msg,
143 unsigned long data0,
unsigned long data1,
144 unsigned long data2,
unsigned long data3,
145 unsigned long data4);
146 char* ConvertEncoding(
const char *string,
const char *to,
const char *from);
147 char* ConvertEncodingLen(
const char *string,
size_t len,
const char *to,
const char *from);
148 char* GetLocaleEncoding(
void);
149 int IsUtf8Locale(
void);
150 void SetWindowGtkThemeVariant(Display *dp, Window window,
int theme);
151
152 #endif
153