24 #define stdin_fileno fileno(stdin)
65 PointerMotionMask | PointerMotionHintMask | ButtonMotionMask |
66 Button1MotionMask | Button2MotionMask | Button3MotionMask |
67 Button4MotionMask | Button5MotionMask,
78 SubstructureNotifyMask,
79 SubstructureNotifyMask,
82 SubstructureRedirectMask,
83 SubstructureNotifyMask,
85 SubstructureRedirectMask,
89 SubstructureRedirectMask,
145 #define DrawableGC(w)(GC)GetIntAttr(GetPsiAttr(w,"graphic_context"),"id")
146 #define WindowDisplayList(w) GetIntAttr(GetPsiAttr(w,"display_list"),"id")
149 #define DISP(X)(Display *)val[X]
150 #define DRAW(X)(Drawable)val[X]
151 #define WIND(X)(Window)val[X]
152 #define GCVAL(X)(GC)val[X]
153 #define FONT(X)(Font)val[X]
154 #define CMAP(X)(Colormap)val[X]
155 #define STRG(X) ((char *)val[X])
173 XGetErrorText(display,x_error->error_code,msg,128);
342 Errorline(
"in GetIntAttr: didn't find %s on %P\n",
375 Errorline(
"in GetPsiAttr: no attribute name on psi-term ?\n");
381 Errorline(
"in GetPsiAttr: no value on psi-term ?\n");
406 XWindowAttributes attr;
414 if((pixmap =
GetIntAttr(psiPixmap,
"id")) != 0)
417 XFreePixmap(display,pixmap);
420 psiPixmapGC =
GetPsiAttr(psiPixmap,
"graphic_context");
425 XFreeGC(display,pixmapGC);
432 XGetWindowAttributes(display,window,&attr);
433 if((pixmap = XCreatePixmap(display,window,
434 attr.width+1,attr.height+1,
438 gcvalues.cap_style = CapRound;
439 gcvalues.join_style = JoinRound;
440 pixmapGC = XCreateGC(display,pixmap,
441 GCJoinStyle|GCCapStyle,&gcvalues);
447 psiPixmapGC=
NewPsi(xgc,
"id",(
long)pixmapGC);
473 XFreePixmap(display,
GetIntAttr(psiPixmap,
"id"));
490 Display * connection;
500 if(strcmp(
STRG(0),
""))
505 if(connection = XOpenDisplay(display))
507 psiConnection =
NewPsi(xdisplay,
"id",(
long)connection);
514 Errorline(
"could not open connection in %P.\n",g);
543 psiRoot =
NewPsi(xwindow,
"id",(
long)DefaultRootWindow(display));
565 *attribute =(
unsigned long) ConnectionNumber(display);
569 *attribute = display->proto_major_version;
574 *attribute =(
unsigned long)(display->proto_minor_version);
578 *attribute =(
unsigned long) ServerVendor(display);
581 *attribute =(
unsigned long) ImageByteOrder(display);
584 *attribute =(
unsigned long) BitmapUnit(display);
587 *attribute =(
unsigned long) BitmapPad(display);
590 *attribute =(
unsigned long) BitmapBitOrder(display);
593 *attribute =(
unsigned long) VendorRelease(display);
597 *attribute =(
unsigned long)(display->qlen);
601 *attribute =(
unsigned long) LastKnownRequestProcessed(display);
605 *attribute =(
unsigned long)(display->request);
609 *attribute =(
unsigned long) DisplayString(display);
612 *attribute =(
unsigned long) DefaultScreen(display);
616 *attribute =(
unsigned long)(display->min_keycode);
621 *attribute =(
unsigned long)(display->max_keycode);
660 Errorline(
"could not get connection attribute in %P.\n",g);
682 s = ScreenOfDisplay(display,screen);
686 *attribute =(
unsigned long) DisplayOfScreen(s);
689 *attribute =(
unsigned long) RootWindowOfScreen(s);
692 *attribute =(
unsigned long) WidthOfScreen(s);
695 *attribute =(
unsigned long) HeightOfScreen(s);
698 *attribute =(
unsigned long) WidthMMOfScreen(s);
701 *attribute =(
unsigned long) HeightMMOfScreen(s);
704 *attribute =(
unsigned long) DefaultDepthOfScreen(s);
707 *attribute =(
unsigned long) DefaultVisualOfScreen(s);
710 *attribute =(
unsigned long) DefaultGCOfScreen(s);
713 *attribute =(
unsigned long) DefaultColormapOfScreen(s);
716 *attribute =(
unsigned long) WhitePixelOfScreen(s);
719 *attribute =(
unsigned long) BlackPixelOfScreen(s);
722 *attribute =(
unsigned long) MaxCmapsOfScreen(s);
725 *attribute =(
unsigned long) MinCmapsOfScreen(s);
728 *attribute =(
unsigned long) DoesBackingStore(s);
731 *attribute =(
unsigned long) DoesSaveUnders(s);
734 *attribute =(
unsigned long) EventMaskOfScreen(s);
772 Errorline(
"could not get screen attribute in %P.\n",g);
797 XCloseDisplay(
DISP(0));
823 XWindowChanges changes;
824 unsigned long changesMask;
825 XSetWindowAttributes attributes;
826 unsigned long attributesMask;
834 for(j = 0; j < 14; j++)
846 if(window = XCreateSimpleWindow(
DISP(0),
WIND(1),
857 life_icon = XCreateBitmapFromData(
DISP(0),window,life_icon_bits,
858 life_icon_width,life_icon_height);
863 hints.width =val[4] ;
864 hints.height = val[5];
865 hints.flags = PPosition | PSize;
868 XSetStandardProperties(
DISP(0),window,
875 changes.width =val[4] ;
876 changes.height = val[5];
877 changesMask = CWX | CWY | CWWidth | CWHeight;
879 XReconfigureWMWindow(
DISP(0),window,DefaultScreen(display),
880 changesMask,&changes);
883 XSetWindowBackground(
DISP(0),window,val[6]);
886 XMoveResizeWindow(
DISP(0),window,
887 val[2],val[3],val[4],val[5]);
890 attributes.background_pixel = val[6];
891 attributes.backing_pixel = val[6];
892 attributesMask = CWBackingPixel|CWBackPixel;
893 XChangeWindowAttributes(
DISP(0),window,
894 attributesMask,&attributes);
913 gcvalues.cap_style = CapRound;
914 gcvalues.join_style = JoinRound;
915 gc = XCreateGC(
DISP(0),window,GCJoinStyle|GCCapStyle,&gcvalues);
917 NewPsi(xgc,
"id",(
long)gc));
933 Errorline(
"could not create a simple window in %P.\n",g);
957 long xcCreateWindow()
962 XWindowChanges changes;
963 unsigned long changesMask;
965 long j,permanent,
show;
969 for(j = 0; j < 13; j++)
977 if(window = XCreateWindow(
DISP(0),
WIND(1),
982 0,(XSetWindowAttributes *)
NULL))
988 changes.width =val[4] ;
989 changes.height = val[5];
990 changesMask = CWX | CWY | CWWidth | CWHeight;
991 XConfigureWindow(
DISP(0),window,changesMask,&changes);
995 hints.width =val[4] ;
996 hints.height = val[5];
997 hints.flags = PPosition | PSize;
998 XSetNormalHints(
DISP(0),window,&hints);
1013 gcvalues.cap_style = CapRound;
1014 gcvalues.join_style = JoinRound;
1015 gc = XCreateGC(
DISP(0),window,GCJoinStyle|GCCapStyle,&gcvalues);
1025 Errorline(
"could not create window in %P.\n",g);
1061 hints.width = val[6] ;
1062 hints.height = val[7];
1063 hints.flags = PPosition | PSize;
1065 XSetStandardProperties(
DISP(0),
WIND(1),
1066 (
char*)val[2],(
char*)val[3],
1071 ResizePixmap(args[1],(Display *)val[0],val[1],val[6],val[7]);
1092 unsigned int w,h,bw,d;
1102 &r,&x,&y,&w,&h,&bw,&d))
1112 Errorline(
"could not get the geometry in %P.\n",g);
1131 XWindowAttributes windowAttributes;
1134 XGetWindowAttributes(display,window,&windowAttributes);
1138 *attribute = windowAttributes.x;
1141 *attribute = windowAttributes.y;
1144 *attribute = windowAttributes.width;
1147 *attribute = windowAttributes.height;
1150 *attribute = windowAttributes.border_width;
1153 *attribute = windowAttributes.depth;
1156 *attribute = windowAttributes.root;
1159 *attribute =(
unsigned long)windowAttributes.screen;
1162 *attribute =(
unsigned long)windowAttributes.visual;
1165 *attribute = windowAttributes.class;
1168 *attribute = windowAttributes.all_event_masks;
1171 *attribute = windowAttributes.bit_gravity;
1174 *attribute = windowAttributes.win_gravity;
1177 *attribute = windowAttributes.backing_store;
1180 *attribute = windowAttributes.backing_planes;
1183 *attribute = windowAttributes.backing_pixel;
1186 *attribute = windowAttributes.override_redirect;
1189 *attribute = windowAttributes.save_under;
1192 *attribute = windowAttributes.your_event_mask;
1195 *attribute = windowAttributes.do_not_propagate_mask;
1198 *attribute = windowAttributes.colormap;
1201 *attribute = windowAttributes.map_installed;
1204 *attribute = windowAttributes.map_state;
1242 Errorline(
"could not get a window attribute in %P.\n",g);
1270 val[2],val[3],val[4],val[5]);
1273 ResizePixmap(args[1],(Display *)val[0],val[1],val[4],val[5]);
1300 XMoveWindow(
DISP(0),
DRAW(1), val[2],val[3]);
1320 XSetWindowAttributes attributes;
1321 XWindowChanges changes;
1322 unsigned long attributesMask = 0;
1323 unsigned long changesMask = 0;
1324 long backgroundChange =
FALSE;
1325 long sizeChange =
FALSE;
1326 unsigned int width,height;
1334 changes.x = attribute;
1338 changes.y = attribute;
1342 changes.width = attribute;
1343 changesMask |= CWWidth;
1344 XGetGeometry(display,window,&r,&x,&y,&width,&height,&bw,&d);
1349 changes.height = attribute;
1350 changesMask |= CWHeight;
1351 XGetGeometry(display,window,&r,&x,&y,&width,&height,&bw,&d);
1356 changes.border_width = attribute;
1357 changesMask |= CWBorderWidth;
1360 attributes.bit_gravity = attribute;
1361 attributesMask |= CWBitGravity;
1364 attributes.win_gravity = attribute;
1365 attributesMask |= CWWinGravity;
1368 attributes.backing_store = attribute;
1369 attributesMask |= CWBackingStore;
1372 attributes.backing_planes = attribute;
1373 attributesMask |= CWBackingPlanes;
1376 attributes.backing_pixel = attribute;
1377 attributesMask |= CWBackingPixel;
1380 attributes.override_redirect = attribute;
1381 attributesMask |= CWOverrideRedirect;
1384 attributes.save_under = attribute;
1385 attributesMask |= CWSaveUnder;
1388 attributes.event_mask = attribute;
1389 attributesMask |= CWEventMask;
1392 attributes.do_not_propagate_mask = attribute;
1393 attributesMask |= CWDontPropagate;
1396 attributes.colormap = attribute;
1397 attributesMask |= CWColormap;
1400 changes.sibling = attribute;
1401 changesMask |= CWSibling;
1404 changes.stack_mode = attribute;
1405 changesMask |= CWStackMode;
1408 attributes.background_pixmap = attribute;
1409 attributesMask |= CWBackPixmap;
1412 attributes.background_pixel = attribute;
1413 attributesMask |= CWBackPixel;
1414 backgroundChange =
TRUE;
1417 attributes.backing_pixel = attribute;
1418 attributesMask |= CWBackingPixel;
1421 attributes.border_pixmap = attribute;
1422 attributesMask |= CWBorderPixmap;
1425 attributes.border_pixel = attribute;
1426 attributesMask |= CWBorderPixel;
1429 attributes.cursor = attribute;
1430 attributesMask |= CWCursor;
1438 XConfigureWindow(display,window,changesMask,&changes);
1441 XChangeWindowAttributes(display,window,attributesMask,&attributes);
1443 if(backgroundChange)
1444 XClearArea(display,window,0,0,0,0,True);
1479 Errorline(
"could not set window attribute in %P.\n",g);
1674 ResizePixmap(args[1],(Display *)val[0],val[1],val[2],val[3]);
1700 XSelectInput(
DISP(0),
WIND(1),val[2]);
1727 if((pixmap =(Pixmap)
GetIntAttr(psiPixmap,
"id")) != 0)
1787 Errorline(
"cannot destroy a permanent window.\n");
1823 if(gc = XCreateGC(
DISP(0),
WIND(1),0,&GCvalues))
1830 Errorline(
"could not create gc in %P.\n",g);
1852 *attribute = gc->values.function;
1855 *attribute = gc->values.plane_mask;
1858 *attribute = gc->values.foreground;
1861 *attribute = gc->values.background;
1864 *attribute = gc->values.line_width;
1867 *attribute = gc->values.line_style;
1870 *attribute = gc->values.cap_style;
1873 *attribute = gc->values.join_style;
1876 *attribute = gc->values.fill_style;
1879 *attribute = gc->values.fill_rule;
1882 *attribute = gc->values.tile;
1885 *attribute = gc->values.stipple;
1888 *attribute = gc->values.ts_x_origin;
1891 *attribute = gc->values.ts_y_origin;
1894 *attribute = gc->values.font;
1897 *attribute = gc->values.subwindow_mode;
1900 *attribute = gc->values.graphics_exposures;
1903 *attribute = gc->values.clip_x_origin;
1906 *attribute = gc->values.clip_y_origin;
1909 *attribute = gc->values.clip_mask;
1912 *attribute = gc->values.dash_offset;
1915 *attribute =(
unsigned char)(gc->values.dashes);
1918 *attribute = gc->values.arc_mode;
1921 *attribute = gc->rects;
1924 *attribute = gc->dashes;
1961 Errorline(
"could not get gc attribute in %P.\n",g);
1980 XGCValues attributes;
1981 unsigned long attributesMask = 0;
1986 attributes.function = attribute;
1987 attributesMask |= GCFunction;
1990 attributes.plane_mask = attribute;
1991 attributesMask |= GCPlaneMask;
1994 attributes.foreground = attribute;
1995 attributesMask |= GCForeground;
1998 attributes.background = attribute;
1999 attributesMask |= GCBackground;
2002 attributes.line_width = attribute;
2003 attributesMask |= GCLineWidth;
2006 attributes.line_style = attribute;
2007 attributesMask |= GCLineStyle;
2010 attributes.cap_style = attribute;
2011 attributesMask |= GCCapStyle;
2014 attributes.join_style = attribute;
2015 attributesMask |= GCJoinStyle;
2018 attributes.fill_style = attribute;
2019 attributesMask |= GCFillStyle;
2022 attributes.fill_rule = attribute;
2023 attributesMask |= GCFillRule;
2026 attributes.tile = attribute;
2027 attributesMask |= GCTile;
2030 attributes.stipple = attribute;
2031 attributesMask |= GCStipple;
2034 attributes.ts_x_origin = attribute;
2035 attributesMask |= GCTileStipXOrigin;
2038 attributes.ts_y_origin = attribute;
2039 attributesMask |= GCTileStipYOrigin;
2042 attributes.font = attribute;
2043 attributesMask |= GCFont;
2046 attributes.subwindow_mode = attribute;
2047 attributesMask |= GCSubwindowMode;
2050 attributes.graphics_exposures = attribute;
2051 attributesMask |= GCGraphicsExposures;
2054 attributes.clip_x_origin = attribute;
2055 attributesMask |= GCClipXOrigin;
2058 attributes.clip_y_origin = attribute;
2059 attributesMask |= GCClipYOrigin;
2062 attributes.clip_mask = attribute;
2063 attributesMask |= GCClipMask;
2066 attributes.dash_offset = attribute;
2067 attributesMask |= GCDashOffset;
2070 attributes.dashes =(char)(0xFF & attribute);
2071 attributesMask |= GCDashList;
2074 attributes.arc_mode = attribute;
2075 attributesMask |= GCArcMode;
2082 XChangeGC(display,gc,attributesMask,&attributes);
2111 Errorline(
"could not set gc attribute in %P.\n",g);
2162 color.red =(val[2]) << 8;
2163 color.green =(val[3]) << 8;
2164 color.blue =(val[4]) << 8;
2165 color.flags = DoRed|DoGreen|DoBlue;
2167 if(XAllocColor(
DISP(0),
CMAP(1),&color))
2174 Errorline(
"could not request a color in %P.\n",g);
2203 if(XAllocNamedColor(
DISP(0),
CMAP(1),
STRG(2),&cell,&rgb))
2210 Errorline(
"could not request a named color in %P.\n",g);
2230 unsigned long pixel;
2238 XFreeColors(
DISP(0),
CMAP(1),&pixel,1,0);
2260 for(j = 0; j < 9; j++)
2269 XDrawLine(
DISP(0),(Window) val[1],gc,
2270 val[2],val[3],val[4],val[5]);
2273 val[2],val[3],val[4],val[5],
2274 val[6],val[7],val[8]);
2298 for(j = 0; j < 11; j++)
2307 XDrawArc(
DISP(0),(Window) val[1],gc,
2308 val[2],val[3],val[4],val[5],
2312 val[2],val[3],val[4],val[5],
2313 val[6],val[7],val[8],val[9],val[10]);
2337 for(j = 0; j < 9; j++)
2346 XDrawRectangle(
DISP(0),(Window) val[1],gc,
2347 val[2],val[3],val[4],val[5]);
2350 val[2],val[3],val[4],val[5],
2351 val[6],val[7],val[8]);
2375 for(j = 0; j < 8; j++)
2384 XFillRectangle(
DISP(0),(Window) val[1],gc,
2385 val[2],val[3],val[4],val[5]);
2388 val[2],val[3],val[4],val[5],
2414 for(j = 0; j < 10; j++)
2423 XFillArc(
DISP(0),(Window) val[1],gc,
2424 val[2],val[3],val[4],val[5],
2428 val[2],val[3],val[4],val[5],
2429 val[6],val[7],val[8],val[9],
2455 Points =(long) malloc((val [0]) * 2 *
sizeof(short));
2483 Points =(
short *) val [0];
2508 free((
void *)val [0]);
2530 for(j = 0; j < 7; j++)
2539 XDrawLines(
DISP(0),(Window) val[1],gc,
2540 (XPoint *)val[2],val[3],CoordModeOrigin);
2543 (XPoint *)val[2],val[3],val[4],val[5],val[6]);
2565 for(j = 0; j < 6; j++)
2574 XFillPolygon(
DISP(0),(Window) val[1],gc,
2575 (XPoint *)val[2],val[3],
2576 Complex,CoordModeOrigin);
2579 (XPoint *)val[2],val[3],val[4],val[5],
2608 if(font=XLoadFont(
DISP(0),
STRG(1)))
2616 Errorline(
"could not load a font in %P.\n",g);
2664 for(j = 0; j < 8; j++)
2674 XDrawString(
DISP(0),(Window) val[1],gc,
2675 val[2],val[3],
STRG(4),
2706 for(j = 0; j < 8; j++)
2716 XDrawImageString(
DISP(0),
WIND(1),gc,
2745 int direction,ascent,descent;
2746 XCharStruct overall;
2755 if(XQueryTextExtents(
DISP(0),
FONT(1),
2757 &direction,&ascent,&descent,&overall))
2789 XSync(
DISP(0),val[1]);
2816 switch(event->type) {
2826 XLookupString((XKeyEvent*)event,buffer,
sizeof(buffer),&keysym,
NULL);
2828 if(keysym==XK_Return || keysym==XK_KP_Enter || keysym==XK_Linefeed)
2831 if(keysym == XK_BackSpace || keysym == XK_Delete)
2834 if(isascii(buffer[0]))
2871 case ConfigureNotify:
2878 (
long)event->xconfigure.border_width);
2886 goto LeaveEnterCommon;
2950 Errorline(
"X event handling error in CDR(%P)\n",lst);
2977 Errorline(
"X event handling error in CAR(%P)\n",lst);
3058 long notInterrupted=
TRUE;
3061 notInterrupted =(*proc)(lst,closure);
3065 return notInterrupted;
3081 int notInterrupted =
TRUE;
3088 notInterrupted=(*proc)(
list_car(lst),closure);
3092 return notInterrupted;
3106 long still_there=
TRUE;
3164 if(!xevent_existing) {
3169 eventClosure.
mask = val[2];
3171 warningline(
"you have coinciding event handlers on the same window");
3193 psiEvent =
GetPsiAttr(xevent_existing,
"event");
3195 xevent_existing =
NULL;
3255 eventClosure.
window = val[1];
3256 eventClosure.
mask = val[2];
3289 if(xcPsiEventToEvent(val[2],&event))
3296 Errorline(
"%P is not an event in %P.\n",val[2],g);
3326 Window root_return,child_return;
3327 int root_x_return,root_y_return;
3328 int win_x_return,win_y_return;
3329 unsigned int mask_return;
3341 same_screen=XQueryPointer(
DISP(0),
3343 &root_return, &child_return,
3344 &root_x_return,&root_y_return,
3345 &win_x_return, &win_y_return,
3499 fd_set readfd,writefd,exceptfd;
3500 struct timeval timeout;
3501 long charflag =
FALSE,nbchar;
3504 *ptreventflag =
FALSE;
3513 timeout.tv_usec = 100000;
3515 nfds = select(32,&readfd,&writefd,&exceptfd,&timeout);
3525 Errorline(
"in select: interruption error.\n");
3538 *ptreventflag =
TRUE;
3550 Errorline(
"in select: keyboard error.\n");
3567 }
while(!(charflag || *ptreventflag));
3582 *ptreventflag =
FALSE;
3607 if(
verbose) printf(
"<X event>");
3635 if(!em ||(em & mask))
3655 if(beginSpan == endSpan)
3692 warningline(
"xevent_existing is non-null in x_build_existing_event");
3694 xevent_existing = psiEvent;
3723 display =(Display *)
GetIntAttr(psiEvent,
"display");
3724 window =(Window)
GetIntAttr(psiEvent,
"window");
3729 eventClosure->
display = display;
3730 eventClosure->
window = window;
3731 eventClosure->
mask = mask;
3736 if(eventClosure->
display == display && eventClosure->
window == window) {
3738 eventClosure->
mask |= mask;
3744 if(XCheckWindowEvent(eventClosure->
display,eventClosure->
window,
3745 eventClosure->
mask,&event)
3752 if((event.type==Expose || event.type==GraphicsExpose)
3753 && event.xexpose.count!=0) {
3764 eventElt,event.
type);
3771 eventClosure->
display = display;
3772 eventClosure->
window = window;
3773 eventClosure->
mask = mask;
3789 XEvent event,exposeEvent;
3816 if(XCheckWindowEvent(eventClosure.
display,
3823 if(event.xany.window==eventClosure.
window) {
3824 if(event.type == Expose)
3825 while(XCheckWindowEvent(eventClosure.
display,
3859 XDestroyWindow(display,window);
3873 XMapWindow(display,window);
3887 XUnmapWindow(display,window);
3903 XMapSubwindows(display,window);
3917 XUnmapSubwindows(display,window);
3940 int direction,ascent,descent;
3959 XQueryTextExtents(
DISP(0),
3972 val[6] =over.lbearing;
3973 val[7] =over.rbearing;
3975 val[9] =over.ascent;
3976 val[10]=over.descent;
3999 Errorline(
"X error in GoalFromPsiTerm: psiTerm is null\n");
4005 Errorline(
"X error in GoalFromPsiTerm: psiTerm has no residuating functions\n");
4011 Errorline(
"X error in GoalFromPsiTerm: psiTerm has more than one residuating function\n");
4017 Errorline(
"X error in GoalFromPsiTerm: psiTerm has no goal\n");
ptr_goal GoalFromPsiTerm(ptr_psi_term psiTerm)
GoalFromPsiTerm.
#define show_subwindow
To backtrack on show sub windows RM 8/12/92.
long xcPointsAlloc()
xcPointsAlloc
long x_exist_event()
x_exist_event
void new_built_in(ptr_module m, char *s, def_type t, long(*r)())
new_built_in
struct wl_EventClosure EventClosure
#define xDefaultLineWidth
ptr_definition alist
symbol in bi module
#define hide_subwindow
To backtrack on hide sub windows RM 8/12/92.
#define function_it
was enum (def_type) in extern.h now there is typedef ptr_definition
void get_two_args(ptr_node t, ptr_psi_term *a, ptr_psi_term *b)
get_two_args
void push_ptr_value(type_ptr t, GENERIC *p)
push_ptr_value
long xcCreateSimpleWindow()
xcCreateSimpleWindow
long xcGetWindowGeometry()
xcGetWindowGeometry
ptr_psi_term list_car(ptr_psi_term lst)
list_car
void interrupt()
INTERRUPT()
#define FEATCMP
indicates to use featcmp for comparison (in trees.c)
ptr_definition xdisplaylist
void show(long limit)
show
long xcDrawString()
xcDrawString
ptr_psi_term stack_cons(ptr_psi_term head, ptr_psi_term tail)
stack_cons
void residuate(ptr_psi_term t)
residuate
void exit_life(long nl_flag)
exit_life
long xcRefreshWindow()
xcRefreshWindow
ptr_definition integer
symbol in bi module
long xcMoveWindow()
xcMoveWindow
static long x_flush_event(ptr_psi_term eventElt, EventClosure *closure)
x_flush_event
static ptr_psi_term x_what_psi_event(ptr_psi_term beginSpan, ptr_psi_term endSpan, long eventType)
x_what_psi_event
void x_record_arc(ListHeader *displaylist, Action action, long x, long y, long width, long height, long startangle, long arcangle, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_arc
ptr_psi_term list_last_cdr(ptr_psi_term lst)
list_last_cdr
#define show_window
To backtrack on show window.
void x_show_subwindow(Display *display, long window)
x_show_subwindow
static long SetGCAttribute(Display *display, GC gc, long attributeId, long attribute)
SetGCAttribute.
long xcDrawArc()
xcDrawArc
void push_goal(goals t, ptr_psi_term a, ptr_psi_term b, GENERIC c)
push_goal
ptr_definition xmisc_event
#define def_ptr
values of type_ptr
ptr_node bk_stack_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
bk_stack_insert
long xcRequestNamedColor()
xcRequestNamedColor
long xcGetEvent()
xcGetEvent
long xcLoadFont()
xcLoadFont
long xcSelectInput()
xcSelectInput
void x_hide_subwindow(Display *display, long window)
x_hide_subwindow
static long mask_match_type(long mask, long type)
mask_match_type
static void x_build_existing_event(XEvent *event, ptr_psi_term beginSpan, ptr_psi_term endSpan, long eventType)
x_build_existing_event
long xcStringWidth()
xcStringWidth
static long SetWindowAttribute(ptr_psi_term psi_window, Display *display, Drawable window, unsigned long attributeId, unsigned long attribute)
SetWindowAttribute.
long xcDrawRectangle()
xcDrawRectangle
void push_ptr_value_global(type_ptr t, GENERIC *p)
push_ptr_value_global
long xcCoordPut()
xcCoordPut
void x_show_window(Display *display, long window)
x_show_window
long xcDrawLine()
xcDrawLine
#define predicate_it
was enum (def_type) in extern.h now there is typedef ptr_definition
static long x_union_event(ptr_psi_term psiEvent, EventClosure *closure)
x_union_event
void x_record_rectangle(ListHeader *displaylist, Action action, long x, long y, long width, long height, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_rectangle
void list_set_car(ptr_psi_term lst, ptr_psi_term value)
list_set_car
long xcPointsFree()
xcPointsFree
long matches(ptr_definition t1, ptr_definition t2, long *smaller)
matches
#define destroy_window
To backtrack on window creation.
long xcDefaultRootWindow()
xcDefaultRootWindow
long x_postscript_window(Display *display, Window window, ListHeader *displaylist, char *filename)
x_postscript_window
#define WindowDisplayList(w)
long unify_int_result(ptr_psi_term t, long v)
unify_int_result
long xcGetScreenAttribute()
xcGetScreenAttribute
long xcUnmapWindow()
xcUnmapWindow
struct wl_psi_term * ptr_psi_term
quotedStackCopy
#define REAL
Which C type to use to represent reals and integers in Wild_Life.
ptr_psi_term GetPsiAttr(ptr_psi_term psiTerm, char *attributeName)
GetPsiAttr.
long xcFillArc()
xcFillArc
ptr_psi_term append_to_list(ptr_psi_term lst, ptr_psi_term value)
append_to_list
ptr_definition xexpose_event
static void FreeWindow(Display *display, ptr_psi_term psi_window)
FreeWindow.
ptr_definition boolean
symbol in bi module
long xcQueryPointer()
xcQueryPointer
long xcRequestColor()
xcRequestColor
long xcDestroyWindow()
xcDestroyWindow
ptr_definition update_symbol(ptr_module module, char *symbol)
update_symbol
static long GetWindowAttribute(Display *display, long window, long attributeId, long *attribute)
GetWindowAttribute.
static long GetGCAttribute(GC gc, long attributeId, long *attribute)
GetGCAttribute.
#define begin_builtin(FUNCNAME, NBARGS, NBARGSIN, TYPES)
static long GetScreenAttribute(Display *display, long screen, long attributeId, long *attribute)
GetScreenAttribute.
long xcDrawPolygon()
xcDrawPolygon
void release_resid(ptr_psi_term t)
release_resid
ptr_definition real
symbol in bi module
void x_record_polygon(ListHeader *displaylist, Action action, XPoint *points, long npoints, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_polygon
long xcMapWindow()
xcMapWindow
static char * xevent_name[]
#define hide_window
To backtrack on hide window.
void Errorline(char *format,...)
Errorline.
unsigned long * GENERIC
unsigned long *GENERIC
long xcDestroyGC()
xcDestroyGC
char * buffer
buffer used only in print.c - there is local with same name in xpred.c
long xcFreeColor()
xcFreeColor
long x_read_stdin_or_event(long *ptreventflag)
x_read_stdin_or_event
ptr_node stack_insert(long comp, char *keystr, ptr_node *tree, GENERIC info)
stack_insert
void infoline(char *format,...)
infoline
static int x_handle_fatal_error(Display *display)
x_handle_fatal_error
void x_set_gc(Display *display, GC gc, long function, unsigned long color, long linewidth, Font font)
x_set_gc
char * heap_copy_string(char *s)
heap_copy_string
static long WaitNextEvent(long *ptreventflag)
WaitNextEvent.
long xcSetGCAttribute()
xcSetGCAttribute
long xcGetWindowAttribute()
xcGetWindowAttribute
int arg_c
set from argc in either life.c or lib.c
#define TRUE
Standard boolean.
long xcSetWindowGeometry()
xcSetWindowGeometry
#define FALSE
Standard boolean.
long xcCreateGC()
xcCreateGC
void list_set_cdr(ptr_psi_term lst, ptr_psi_term value)
list_set_cdr
long map_funct_over_list(ptr_psi_term lst, long(*proc)(), long *closure)
map_funct_over_list
ptr_definition xconfigure_event
static long x_next_event_span(ptr_psi_term eventElt, EventClosure *eventClosure)
x_next_event_span
ptr_psi_term stack_psi_term(long stat)
stack_psi_term
void x_hide_window(Display *display, long window)
x_hide_window
ptr_definition nil
symbol in bi module
long map_funct_over_cars(ptr_psi_term lst, long(*proc)(), long *closure)
map_funct_over_cars
ptr_psi_term stack_nil()
stack_nil
long xcOpenConnection()
xcOpenConnection
static ptr_psi_term xcEventToPsiTerm(XEvent *event)
xcEventToPsiTerm
ptr_definition xdestroy_event
void clean_undo_window(long disp, long wind)
clean_undo_window
static long xevent_mask[]
#define unify
was enum (goal) – but must be long for error.c - now typedef
long xcDrawImageString()
xcDrawImageString
ptr_node find(long comp, char *keystr, ptr_node tree)
find
long xcCloseConnection()
xcCloseConnection
long xcFillPolygon()
xcFillPolygon
char * arg_v[ARGNN]
set from argv in either life.c or lib.c
void x_record_string(ListHeader *displaylist, Action action, long x, long y, char *str, Font font, unsigned long function, unsigned long color)
x_record_string
void bk_change_psi_attr(ptr_psi_term t, char *attrname, ptr_psi_term value)
bk_change_psi_attr
long xcGetGCAttribute()
xcGetGCAttribute
long xcUnmapSubwindows()
xcUnmapSubwindows
void push_window(long type, long disp, long wind)
push_window
long list_is_nil(ptr_psi_term lst)
long xcFillRectangle()
xcFillRectangle
ptr_definition xmotion_event
long xcGetConnectionAttribute()
xcGetConnectionAttribute
void x_free_display_list(ListHeader *displaylist)
x_free_display_list
void raw_setup_builtins()
raw_setup_builtins
long xcResizeWindowPixmap()
xcResizeWindowPixmap
void bk_stack_add_int_attr(ptr_psi_term t, char *attrname, long value)
bk_stack_add_int_attr
static ptr_psi_term NewPsi(ptr_definition t, char *f, long v)
ptr_psi_term NewPsi
void x_setup_builtins()
x_setup_builtins
long unify_real_result(ptr_psi_term t, REAL v)
unify_real_result
ptr_psi_term list_cdr(ptr_psi_term lst)
list_cdr
long xcRaiseWindow()
xcRaiseWindow
long xcPostScriptWindow()
xcPostScriptWindow
ptr_psi_term xevent_existing
static void ResizePixmap(ptr_psi_term psi_window, Display *display, Window window, unsigned long width, unsigned long height)
ResizePixmap.
void warningline(char *format,...)
warningline
ptr_definition xkeyboard_event
long xcClearWindow()
xcClearWindow
long xcFlushEvents()
xcFlushEvents
ListHeader * x_display_list()
x_display_list
long xcUnloadFont()
xcUnloadFont
long xcSetWindowAttribute()
xcSetWindowAttribute
#define include_var_builtin(NBARGS)
void x_record_line(ListHeader *displaylist, Action action, long x0, long y0, long x1, long y1, unsigned long function, unsigned long color, unsigned long linewidth)
x_record_line
void list_remove_value(ptr_psi_term lst, ptr_psi_term value)
list_remove_value
long GetIntAttr(ptr_psi_term psiTerm, char *attributeName)
GetIntAttr.
void x_refresh_window(Display *display, Window window, Pixmap pixmap, GC pixmapgc, ListHeader *displaylist)
x_refresh_window
long xcMapSubwindows()
xcMapSubwindows
ptr_module x_module
'ifdef X11' unnecessary
ptr_module set_current_module(ptr_module module)
set_current_module
ptr_definition quoted_string
symbol in bi module
ptr_definition xenter_event
long xcSetStandardProperties()
xcSetStandardProperties
long xcQueryTextExtents()
xcQueryTextExtents
long i_check_out(ptr_psi_term t)
i_check_out
GENERIC heap_alloc(long s)
heap_alloc
ptr_definition xbutton_event
static int x_handle_error(Display *display, XErrorEvent *x_error)
x_handle_error
void x_destroy_window(Display *display, Window window)
x_destroy_window
static long GetConnectionAttribute(Display *display, long attributeId, long *attribute)
GetConnectionAttribute.
#define psi_term_ptr
values of type_ptr
ptr_definition xleave_event
#define int_ptr
values of type_ptr