cleanup Xt usage
This commit is contained in:
parent
a05b05aad5
commit
e973fb3e97
|
|
@ -1,3 +1,7 @@
|
|||
2011-05-08 Robert Larice
|
||||
* src/frontend/help/x11disp.c :
|
||||
cleanup Xt usage
|
||||
|
||||
2011-05-08 Robert Larice
|
||||
* xgraph/alloc.c :
|
||||
rename macros public and private --> PUBLIC and PRIVATE
|
||||
|
|
|
|||
|
|
@ -23,7 +23,9 @@ $Id$
|
|||
|
||||
static bool started = FALSE;
|
||||
static topic *topics = NULL;
|
||||
void newtopic(Widget w, caddr_t client_data, caddr_t call_data), delete_w(Widget w, caddr_t client_data, caddr_t call_data), quit(Widget w, caddr_t client_data, caddr_t call_data);
|
||||
static void newtopic(Widget w, XtPointer client_data, XtPointer call_data);
|
||||
static void delete_w(Widget w, XtPointer client_data, XtPointer call_data);
|
||||
static void quit(Widget w, XtPointer client_data, XtPointer call_data);
|
||||
static void sputline(char *buf, char *s);
|
||||
/* atoms for catching window delet by WM x-button */
|
||||
static Atom atom_wm_delete_window;
|
||||
|
|
@ -120,11 +122,11 @@ hlp_xdisplay(topic *top)
|
|||
XtSetArg(buttonargs[0], XtNlabel, "quit help");
|
||||
buttonwidget = XtCreateManagedWidget("quit", commandWidgetClass,
|
||||
top->titlewidget, buttonargs, 1);
|
||||
XtAddCallback(buttonwidget, XtNcallback, (XtCallbackProc) quit, top);
|
||||
XtAddCallback(buttonwidget, XtNcallback, quit, top);
|
||||
XtSetArg(buttonargs[0], XtNlabel, "delete window");
|
||||
buttonwidget = XtCreateManagedWidget("delete", commandWidgetClass,
|
||||
top->titlewidget, buttonargs, XtNumber(buttonargs));
|
||||
XtAddCallback(buttonwidget, XtNcallback, (XtCallbackProc) delete_w, top);
|
||||
XtAddCallback(buttonwidget, XtNcallback, delete_w, top);
|
||||
|
||||
buf = TMALLOC(char, 80 * top->numlines + 100);
|
||||
buf[0] = '\0';
|
||||
|
|
@ -170,7 +172,7 @@ hlp_xdisplay(topic *top)
|
|||
hand = TMALLOC(handle, 1);
|
||||
hand->result = tl;
|
||||
hand->parent = top;
|
||||
XtAddCallback(buttonwidget, XtNcallback, (XtCallbackProc) newtopic, hand);
|
||||
XtAddCallback(buttonwidget, XtNcallback, newtopic, hand);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -203,7 +205,7 @@ hlp_xdisplay(topic *top)
|
|||
/* core leak XXX */
|
||||
hand->result = tl;
|
||||
hand->parent = top;
|
||||
XtAddCallback(buttonwidget, XtNcallback, (XtCallbackProc) newtopic, hand);
|
||||
XtAddCallback(buttonwidget, XtNcallback, newtopic, hand);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,8 +226,8 @@ hlp_xdisplay(topic *top)
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
newtopic(Widget w, caddr_t client_data, caddr_t call_data)
|
||||
static void
|
||||
newtopic(Widget w, XtPointer client_data, XtPointer call_data)
|
||||
{
|
||||
topic *parent = ((handle *) client_data)->parent;
|
||||
toplink *result = ((handle *) client_data)->result;
|
||||
|
|
@ -249,8 +251,8 @@ newtopic(Widget w, caddr_t client_data, caddr_t call_data)
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
delete_w(Widget w, caddr_t client_data, caddr_t call_data)
|
||||
static void
|
||||
delete_w(Widget w, XtPointer client_data, XtPointer call_data)
|
||||
{
|
||||
|
||||
topic *top = (topic *) client_data;
|
||||
|
|
@ -262,8 +264,8 @@ delete_w(Widget w, caddr_t client_data, caddr_t call_data)
|
|||
hlp_fixchildren(top);
|
||||
}
|
||||
|
||||
void
|
||||
quit(Widget w, caddr_t client_data, caddr_t call_data)
|
||||
static void
|
||||
quit(Widget w, XtPointer client_data, XtPointer call_data)
|
||||
{
|
||||
|
||||
topic *top = (topic *) client_data, *parent = top->parent;
|
||||
|
|
|
|||
Loading…
Reference in New Issue