Annotation of rpl/modules/motif/XtPopup.rplc, revision 1.3
1.1 bertrand 1: #include "src/rplexternals.h"
2: #include "motif.h"
3:
4: declareExternalFunction(XtPopup)
5: declareObject(grab);
6: declareObject(widget);
7:
1.2 bertrand 8: integer8 gv;
1.1 bertrand 9:
10: XtGrabKind xt_gv;
11:
12: HEADER
13: declareHelpString("Popup a widget\n"
14: " 2: widget\n"
15: " 1: flag (XtGrabNonexclusive/XtGrabExclusive)\n");
16: numberOfArguments(2);
17: FUNCTION
18: if (initializationDone eq true) then
1.2 bertrand 19: pullFromStack(grab, integer);
1.1 bertrand 20: returnOnError(freeObject(grab));
21:
22: pullFromStack(widget, external);
23: returnOnError(freeObject(grab); freeObject(widget));
24:
1.2 bertrand 25: getInteger(grab, gv);
1.1 bertrand 26:
1.2 bertrand 27: if (gv eq XtGrabNonexclusive) then
1.1 bertrand 28: xt_gv = XtGrabNonexclusive;
1.2 bertrand 29: elseIf (gv eq XtGrabExclusive) then
1.1 bertrand 30: xt_gv = XtGrabExclusive;
31: orElse
32: executionError("Unknown grab value");
33: returnOnError(freeObject(grab); freeObject(widget));
34: endIf
35:
36: ifIsExternal(widget, WIDGET) then
37: orElse
38: executionError("Type mismath error");
39: returnOnError(freeObject(grab); freeObject(widget));
40: endIf
41:
1.3 ! bertrand 42: XtPopup(target(objectContainer(Widget, widget)), xt_gv);
1.1 bertrand 43:
44: freeObject(widget);
45: freeObject(grab);
46: orElse
47: executionError("Application not initialized");
48: returnOnError();
49: endIf
50: END
51: endExternalFunction
52:
53: // vim: ts=4
CVSweb interface <joel.bertrand@systella.fr>