Data update

This commit is contained in:
Ingy döt Net 2023-12-16 21:33:55 -08:00
parent 35bcdeebf8
commit 74c69a0df6
2427 changed files with 31826 additions and 3468 deletions

View file

@ -1 +1 @@
VDU 23, 22, 320; 240; 8, 8, 8, 0, 18, 0, 1, 25, 69, 100; 100;
VDU 23, 22, 320; 240; 8, 8, 8, 128, 18, 0, 9, 25, 69, 100; 100;

View file

@ -0,0 +1,71 @@
// dotrosetta.c - https://rosettacode.org/wiki/Draw_a_pixel
#include <X11/Xutil.h>
#include <stdio.h>
#include <stdlib.h>
int
main(void)
{
Atom wm_both_protocols[1];
Atom wm_delete;
Atom wm_protocols;
Display *display;
GC gc;
Window root;
Window window;
XEvent event;
XSetWindowAttributes attr;
int more = 1;
display = XOpenDisplay(NULL);
if(display == NULL)
{
fprintf(stderr,"Error: The display cannot be opened\n");
exit(1);
}
root = DefaultRootWindow(display);
wm_delete = XInternAtom(display, "WM_DELETE_WINDOW", False);
wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False);
attr.background_pixel = 0x000000;
attr.event_mask = ExposureMask;
window = XCreateWindow(display, root,
0, 0, 320, 240, 0,
CopyFromParent, InputOutput, CopyFromParent,
CWBackPixel | CWEventMask,
&attr
);
XStoreName(display, window, "Draw a Pixel");
wm_both_protocols[0] = wm_delete;
XSetWMProtocols(display, window, wm_both_protocols, 1);
gc = XCreateGC(display, window, 0, NULL);
XSetForeground(display, gc, 0xFF0000);
XMapWindow(display, window);
while(more)
{
XNextEvent(display, &event);
switch(event.type)
{
case Expose:
XDrawPoint(display, window, gc, 100, 100);
break;
case ClientMessage: // for close request from WM
if(event.xclient.window == window &&
event.xclient.message_type == wm_protocols &&
event.xclient.format == 32 &&
event.xclient.data.l[0] == wm_delete)
{
more = 0;
}
break;
default:
printf("unexpected event.type %d\n", event.type);;
}
}
XCloseDisplay(display);
exit(0);
}

View file

@ -0,0 +1,10 @@
#!/usr/bin/perl
use strict; # https://rosettacode.org/wiki/Draw_a_pixel
use warnings;
use Tk;
my $mw = MainWindow->new;
my $canvas = $mw->Canvas( -width => 320, -height => 240 )->pack;
$canvas->createRectangle( 100, 100, 100, 100, -outline => 'red' );
MainLoop;

View file

@ -0,0 +1,44 @@
#!/usr/bin/perl
use strict; # https://rosettacode.org/wiki/Draw_a_pixel
use warnings;
use X11::Protocol;
my $x = new X11::Protocol or die "X11 connection failed";
$x->CreateWindow(my $id = $x->new_rsrc, $x->root, 'InputOutput',
$x->root_depth, 'CopyFromParent',
0, 0, 320, 240, 0,
background_pixel => 0x000000,
event_mask => $x->pack_event_mask( qw( Exposure )),
);
$x->ChangeProperty($id, $x->atom('WM_NAME'), $x->atom('STRING'),
8, 'Replace', 'Draw a Pixel');
$x->ChangeProperty($id, $x->atom('WM_PROTOCOLS'), $x->atom('ATOM'),
32, 'Replace', pack('L', $x->atom('WM_DELETE_WINDOW')));
$x->CreateGC(my $gc = $x->new_rsrc, $id, foreground => 0xff0000);
$x->MapWindow($id);
$x->event_handler('queue');
my ($more, $name, %e) = 1;
while($more)
{
%e = $x->next_event;
$name = $e{name};
EVENT->$name;
}
sub EVENT::Expose { $x->PolyPoint($id, $gc, 'ORIGIN', 100, 100) }
sub EVENT::ConfigureNotify { }
sub EVENT::ClientMessage
{
if($e{type} == $x->atom('WM_PROTOCOLS') &&
unpack('L', $e{data}) == $x->atom('WM_DELETE_WINDOW'))
{
$more = 0;
}
else
{
warn "Unknown $name, $e{type}\n";
}
}
sub EVENT::AUTOLOAD { die "Sorry, no handler for $name\n" }

View file

@ -0,0 +1,16 @@
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|0100
#0f00 .System/r DEO2
#0000 .System/g DEO2
#0000 .System/b DEO2
#0140 .Screen/width DEO2
#00f0 .Screen/height DEO2
#0064 .Screen/x DEO2
#0064 .Screen/y DEO2
#01 .Screen/pixel DEO
BRK