|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T s
Length: 2468 (0x9a4)
Types: TextFile
Names: »slide.clu«
└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
└─⟦526ad3590⟧ »EUUGD11/gnu-31mar87/X.V10.R4.tar.Z«
└─⟦2109abc41⟧
└─⟦this⟧ »./X.V10R4/xdemo/slide.clu«
% from Lucasfilm Ltd.
slidedemo = proc ()
nbounce = 33
bwidth: int := int$parse(xdemo_default("slide", "BorderWidth"))
except when not_found, overflow, bad_format: bwidth := 2 end
back: x_pixmap := x_display$white()
bdr: x_pixmap := x_display$black()
plane: int := 1
if x_display$cells() > 2
then begin
r, g, b: int := x_parse_color(xdemo_default("slide", "Border"))
bdr := x_pixmap$tile(x_display$alloc_color(r, g, b))
end except when not_found: end
cback: string := xdemo_default("slide", "Background")
except when not_found: cback := "" end
cfore: string := xdemo_default("slide", "Foreground")
except when not_found: cfore := "" end
if string$empty(cback) cand string$empty(cfore)
then exit done end
pixs: pixellist
pixs, plane := x_display$alloc_cells(1, 1, false)
back := x_pixmap$tile(pixs[1])
r, g, b: int
if string$empty(cback)
then r, g, b := x_display$query_color(WhitePixel)
else r, g, b := x_parse_color(cback)
end
x_display$store_color(pixs[1], r, g, b)
if string$empty(cfore)
then r, g, b := x_display$query_color(BlackPixel)
else r, g, b := x_parse_color(cfore)
end
x_display$store_color(pixs[1] + plane, r, g, b)
end except when done: end
w: x_window, wid0, hgt0: int := x_cons("slide", back, bdr,
xdemo_geometry(), "=405x305+1+1",
40, 40, bwidth)
w.name := "slide"
w.input := UnmapWindow
x_window$map(w)
w.input := ExposeWindow + UnmapWindow
ev: event := x_input$empty_event()
nobit: x_bitmap := x_bitmap$none()
while true do
x_window$clear(w)
sx, sy, width, height, bw, ms, wk: int, iw: x_window := x_window$query(w)
width := width - nbounce
height := height - nbounce
if width <= 0 cor height <= 0
then x_window$destroy(w)
return
end
x: int := 0
y: int := 0
xinc: int := 1
yinc: int := 1
count: int := 0
while count ~= 0 cor ~x_input$pending() do
if count = 10
then count := 0
else count := count + 1
end
x_window$pix_fill(w, 0, nobit, x, y, nbounce, nbounce,
GXinvert, plane)
x := x + xinc
if x = width cor x = 0
then xinc := -xinc end
y := y + yinc
if y = height cor y = 0
then yinc := -yinc end
end
x_input$deq(ev)
if ev.kind = UnmapWindow
then x_input$deq(ev) end
end
end slidedemo