diff --git a/lib/modules/Protocols.pmod/X.pmod/Atom.pmod b/lib/modules/Protocols.pmod/X.pmod/Atom.pmod index 6a4b4695eb6e9fb293e68b7ece1226971fc80843..e46e63eda3eedf485cc74780ca70d807c4957866 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Atom.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Atom.pmod @@ -1,6 +1,6 @@ /* Atom.pmod * - * X Atoms $Id: Atom.pmod,v 1.4 1998/04/19 00:48:25 grubba Exp $ + * X Atoms $Id: Atom.pmod,v 1.5 1998/04/21 02:55:59 per Exp $ * */ @@ -112,7 +112,7 @@ class atom_manager object InternAtom_req(string name) { - object req = Requests.InternAtom(); + object req = .Requests.InternAtom(); req->name = name; return req; } @@ -127,7 +127,7 @@ class atom_manager object atom = Atom(this_object()); atom->name = name; - object req = Requests.InternAtom(); + object req = .Requests.InternAtom(); req->name = name; if (callback) { @@ -146,7 +146,7 @@ class atom_manager object GetAtomName_req(object atom) { - object req = Requests.GetAtomName(); + object req = .Requests.GetAtomName(); req->atom = atom->id; return req; } @@ -175,11 +175,11 @@ class atom_manager void create() { - for(int i = 1; i<sizeof(_Xlib.predefined_atoms); i++) + for(int i = 1; i<sizeof(._Xlib.predefined_atoms); i++) { object atom = Atom(this_object()); atom->id = i; - atom->name = _Xlib.predefined_atoms[i]; + atom->name = ._Xlib.predefined_atoms[i]; remember_atom(atom); } } diff --git a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod index 1d530d62c6e603d485c4fe9261160523c5a68335..bd9ed13611c19aa9d34f1ddb6b07745388c1bc11 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod @@ -1,6 +1,6 @@ /* Requests.pike * - * $Id: Requests.pmod,v 1.25 1998/04/19 00:31:01 grubba Exp $ + * $Id: Requests.pmod,v 1.26 1998/04/21 02:56:01 per Exp $ */ /* @@ -57,7 +57,7 @@ class request string build_request(string req, void|int data) { - req = _Xlib.pad(req); + req = ._Xlib.pad(req); // Big requests extension. Will not work // if this extension is not present. @@ -175,8 +175,8 @@ class CreateWindow x, y, width, height, borderWidth, c_class, visual, - @build_value_list(attributes, - _Xlib.window_attributes) ), + @build_value_list(attributes, + ._Xlib.window_attributes) ), depth); } } @@ -194,7 +194,7 @@ class ChangeWindowAttributes return build_request (sprintf("%4c%4c%s", window, @build_value_list(attributes, - _Xlib.window_attributes))); + ._Xlib.window_attributes))); } } @@ -270,7 +270,7 @@ class ConfigureWindow return build_request (sprintf("%4c%2c\0\0%s", window, @build_value_list(attributes, - _Xlib.window_configure_attributes))); + ._Xlib.window_configure_attributes))); } } @@ -633,7 +633,7 @@ class CreateGC { return build_request(sprintf("%4c%4c%4c%s", gc, drawable, @build_value_list(attributes, - _Xlib.gc_attributes))); + ._Xlib.gc_attributes))); } } @@ -649,7 +649,7 @@ class ChangeGC { return build_request(sprintf("%4c%4c%s", gc, @build_value_list(attributes, - _Xlib.gc_attributes))); + ._Xlib.gc_attributes))); } } diff --git a/lib/modules/Protocols.pmod/X.pmod/Types.pmod b/lib/modules/Protocols.pmod/X.pmod/Types.pmod index 5f110b9d14db7a686fc6961117c0ae4c341a775c..4d4f40f62c83aef0209f6f85a7b226ee991053d0 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Types.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Types.pmod @@ -1,6 +1,6 @@ /* Types.pmod * - * $Id: Types.pmod,v 1.31 1998/04/19 00:31:02 grubba Exp $ + * $Id: Types.pmod,v 1.32 1998/04/21 02:56:02 per Exp $ */ /* @@ -65,6 +65,7 @@ class XResource class Font { + import "."; inherit XResource; object QueryTextExtents_req(string str) @@ -111,7 +112,7 @@ class Font class Cursor { inherit XResource; - constant FreeRequest = Requests.FreeCursor; + constant FreeRequest = .Requests.FreeCursor; } class Visual @@ -137,13 +138,13 @@ class Visual class GC { inherit XResource; - constant FreeRequest = Requests.FreeGC; + constant FreeRequest = .Requests.FreeGC; mapping(string:mixed) values; object ChangeGC_req(mapping attributes) { - object req = Requests.ChangeGC(); + object req = .Requests.ChangeGC(); req->gc = id; req->attributes = attributes; return req; @@ -164,7 +165,7 @@ class GC void create(mixed ... args) { ::create(@args); - values = mkmapping(_Xlib.gc_attributes, + values = mkmapping(._Xlib.gc_attributes, ({ 3, -1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 4, 1 })); } @@ -229,12 +230,12 @@ class Colormap { inherit XResource; object visual; - constant FreeRequest = Requests.FreeColormap; + constant FreeRequest = .Requests.FreeColormap; mapping alloced = ([]); object FreeColors_req(int pixel) { - object req = Requests.FreeColors(); + object req = .Requests.FreeColors(); req->colormap = id; req->plane_mask=0; req->colors = ({ pixel }); @@ -258,7 +259,7 @@ class Colormap { if(alloced[sprintf("%2c%2c%2c", r, g, b)]) return alloced[sprintf("%2c%2c%2c", r, g, b)]; - object req = Requests.AllocColor(); + object req = .Requests.AllocColor(); req->colormap = id; req->red = r; req->green = g; @@ -288,7 +289,7 @@ class Drawable object CopyArea_req(object gc, object src, object area, int x, int y) { - object r= Requests.CopyArea(); + object r= .Requests.CopyArea(); r->gc = gc; r->src = src; r->area = area; @@ -305,7 +306,7 @@ class Drawable object CreateGC_req() { - object req = Requests.CreateGC(); + object req = .Requests.CreateGC(); req->drawable = id; req->gc = display->alloc_id(); @@ -325,7 +326,7 @@ class Drawable object CreatePixmap_req(int width, int height, int depth) { - object req = Requests.CreatePixmap(); + object req = .Requests.CreatePixmap(); req->pid = display->alloc_id(); req->drawable = id; @@ -339,14 +340,14 @@ class Drawable { object req = CreatePixmap_req(width, height, depth); display->send_request( req ); - object p = PIXMAP(display, req->pid, this_object(), colormap ); + object p = Pixmap(display, req->pid, this_object(), colormap ); p->depth = depth; return p; } object FillPoly_req(int gc, int shape, int coordMode, array(object) p) { - object req = Requests.FillPoly(); + object req = .Requests.FillPoly(); req->drawable = id; req->gc = gc; req->shape = shape; @@ -363,7 +364,7 @@ class Drawable object FillRectangles_req(int gc, array(object) r) { - object req = Requests.PolyFillRectangle(); + object req = .Requests.PolyFillRectangle(); req->drawable = id; req->gc = gc; req->rectangles = r; @@ -378,7 +379,7 @@ class Drawable object DrawLine_req(int gc, int coordMode, array(object) points) { - object req = Requests.PolyLine(); + object req = .Requests.PolyLine(); req->drawable = id; req->gc = gc; req->coordMode = coordMode; @@ -394,7 +395,7 @@ class Drawable object PutImage_req(object gc, int depth, int tx, int ty, int width, int height, string data) { - object r = Requests.PutImage(); + object r = .Requests.PutImage(); r->drawable = id; r->gc = gc->id; r->depth = depth; @@ -418,7 +419,7 @@ class Drawable object ImageText8_req(int gc, int x, int y, string str) { - object req = Requests.ImageText8(); + object req = .Requests.ImageText8(); req->drawable = id; req->gc = gc; req->x = x; @@ -437,7 +438,7 @@ class Drawable object ImageText16_req(int gc, int x, int y, string str) { - object req = Requests.ImageText16(); + object req = .Requests.ImageText16(); req->drawable = id; req->gc = gc; req->x = x; @@ -458,7 +459,7 @@ class Drawable class Pixmap { inherit Drawable; - constant FreeRequest = Requests.FreePixmap; + constant FreeRequest = .Requests.FreePixmap; // Init function. void create(mixed ... args) @@ -630,7 +631,7 @@ class Window object CreateWindow_req(int x, int y, int width, int height, int border_width, int depth, object visual) { - object req = Requests.CreateWindow(); + object req = .Requests.CreateWindow(); req->depth = depth; /* CopyFromParent */ req->wid = display->alloc_id(); req->parent = id; @@ -651,7 +652,7 @@ class Window object CreateColormap(object visual, int|void alloc) { - object req = Requests.CreateColormap(); + object req = .Requests.CreateColormap(); req->cid = display->alloc_id(); req->alloc = alloc; req->visual = visual->id; @@ -708,7 +709,7 @@ class Window object ChangeAttributes_req(mapping m) { - object req = Requests.ChangeWindowAttributes(); + object req = .Requests.ChangeWindowAttributes(); req->window = id; req->attributes = m; return req; @@ -722,7 +723,7 @@ class Window object Configure_req(mapping m) { - object req = Requests.ConfigureWindow(); + object req = .Requests.ConfigureWindow(); req->window = id; req->attributes = m; @@ -756,7 +757,7 @@ class Window object SelectInput_req() { - object req = Requests.ChangeWindowAttributes(); + object req = .Requests.ChangeWindowAttributes(); req->window = id; req->attributes->EventMask = currentInputMask; attributes->EventMask = currentInputMask; @@ -769,7 +770,7 @@ class Window foreach(masks, string type) mask - |= _Xlib.event_masks[type]; + |= ._Xlib.event_masks[type]; return mask; } @@ -792,7 +793,7 @@ class Window object GrabButton_req(int button, int modifiers, array(string) types) { - object req = Requests.GrabButton(); + object req = .Requests.GrabButton(); req->ownerEvents = 1; req->grabWindow = id; req->eventMask = event_mask_to_int(types); @@ -812,7 +813,7 @@ class Window object Map_req() { - object req = Requests.MapWindow(); + object req = .Requests.MapWindow(); req->id = id; return req; } @@ -824,7 +825,7 @@ class Window object Unmap_req() { - object req = Requests.UnmapWindow(); + object req = .Requests.UnmapWindow(); req->id = id; return req; } @@ -836,7 +837,7 @@ class Window object ListProperties_req() { - object req = Requests.ListProperties(); + object req = .Requests.ListProperties(); req->window = id; return req; } @@ -863,7 +864,7 @@ class Window object ChangeProperty_req(object property, object type, int format, array(int)|string data) { - object req = Requests.ChangeProperty(); + object req = .Requests.ChangeProperty(); req->window = id; req->property = property->id; req->type = type->id; @@ -881,7 +882,7 @@ class Window object GetProperty_req(object property, object|void type) { - object req = Requests.GetProperty(); + object req = .Requests.GetProperty(); req->window = id; req->property = property->id; if (type) @@ -908,7 +909,7 @@ class Window object ClearArea_req(int x, int y, int width, int height, int exposures) { - object req = Requests.ClearArea(); + object req = .Requests.ClearArea(); req->window = id; req->exposures = exposures; req->x = x; @@ -1013,5 +1014,5 @@ class RootWindow /* Kludge */ void create() { - _Types.set_pixmap_class(Pixmap); + ._Types.set_pixmap_class(Pixmap); } diff --git a/lib/modules/Protocols.pmod/X.pmod/XImage.pmod b/lib/modules/Protocols.pmod/X.pmod/XImage.pmod index d292d3393eb755b675912d0a3b4896bc83a5ea01..ddcd9e85abeb0317891c721c021afe17dad2cce1 100644 --- a/lib/modules/Protocols.pmod/X.pmod/XImage.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/XImage.pmod @@ -1,6 +1,6 @@ /* XImage.pmod * - * $Id: XImage.pmod,v 1.11 1998/04/19 00:34:11 mirar Exp $ + * $Id: XImage.pmod,v 1.12 1998/04/21 02:56:03 per Exp $ */ /* @@ -106,6 +106,7 @@ class Image_wrapper class XImage { inherit Image_wrapper; + import Protocols.X; object /*(Types.Window)*/ window; object /*(Types.RootWindow)*/ root; // extends window @@ -356,8 +357,9 @@ class WindowImage class PixmapImage { inherit XImage; + import Protocols.X; - void create(object (Types.Pixmap) p, object|void ct) + void create(Types.Pixmap p, object|void ct) { if(ct) ccol = ct; set_drawable( p ); diff --git a/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod b/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod index 63c997595bdea3caabafa27de3614ee7c217f22c..34c790f6ad7331ae8a56351b7dc5d9a64dd4bb20 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod @@ -1,6 +1,6 @@ /* Xlib.pmod * - * $Id: Xlib.pmod,v 1.33 1998/04/20 01:49:36 nisse Exp $ + * $Id: Xlib.pmod,v 1.34 1998/04/21 02:56:05 per Exp $ */ /* @@ -135,11 +135,11 @@ class id_manager class Display { - import _Xlib; + import ._Xlib; inherit Stdio.File; inherit id_manager; - inherit Atom.atom_manager; + inherit .Atom.atom_manager; @@ -372,9 +372,9 @@ class Display for(i=0; i<numRoots; i++) { int wid = struct->get_uint(4); - object r = Types.RootWindow(this_object(), wid); + object r = .Types.RootWindow(this_object(), wid); int cm = struct->get_uint(4); - r->colormap = r->defaultColorMap = Types.Colormap(this_object(), cm, 0); + r->colormap = r->defaultColorMap = .Types.Colormap(this_object(), cm, 0); r->colormap->autofree=0; r->whitePixel = struct->get_uint(4); r->blackPixel = struct->get_uint(4); @@ -404,7 +404,7 @@ class Display for(int k=0; k<nVisuals; k++) { int visualID = struct->get_uint(4); - object v = Types.Visual(this_object(), visualID); + object v = .Types.Visual(this_object(), visualID); v->depth = depth; v->c_class = struct->get_uint(1); @@ -440,7 +440,7 @@ class Display case STATE_WAIT_HEADER: { received->expect(32); /* Correct for most of the cases */ - string type = _Xlib.event_types[msg[0] & 0x3f]; + string type = ._Xlib.event_types[msg[0] & 0x3f]; if (type == "Error") { mapping m = ([]); @@ -448,7 +448,7 @@ class Display sscanf(msg, "%*c%c%2c%4c%2c%c", errorCode, m->sequenceNumber, m->resourceID, m->minorCode, m->majorCode); - m->errorCode = _Xlib.error_codes[errorCode]; + m->errorCode = ._Xlib.error_codes[errorCode]; #ifdef DEBUG m->failed_request = debug_requests[DEBUGEQ(m->sequenceNumber)]; #endif @@ -628,7 +628,7 @@ class Display default: /* Any other event */ // werror("Unimplemented event: "+ -// _Xlib.event_types[msg[0] & 0x3f]+"\n"); +// ._Xlib.event_types[msg[0] & 0x3f]+"\n"); event = ([ "type" :type, "raw" : msg ]); break; @@ -755,7 +755,7 @@ class Display /* Authentication */ mapping auth_data; - object auth_file = Auth.read_auth_data(); + object auth_file = .Auth.read_auth_data(); if (auth_file) auth_data = host ? auth_file->lookup_ip(gethostbyname(host)[1][0], @@ -803,7 +803,7 @@ class Display string msg = sprintf("B\0%2c%2c%2c%2c\0\0%s%s", 11, 0, strlen(auth_data->name), strlen(auth_data->data), - _Xlib.pad(auth_data->name), _Xlib.pad(auth_data->data)); + ._Xlib.pad(auth_data->name), ._Xlib.pad(auth_data->data)); state = STATE_WAIT_CONNECT; received->expect(8); @@ -915,7 +915,7 @@ class Display void get_keyboard_mapping() { - object r = Requests.GetKeyboardMapping(); + object r = .Requests.GetKeyboardMapping(); r->first = minKeyCode; r->num = maxKeyCode - minKeyCode + 1; send_async_request(r, got_mapping); @@ -928,7 +928,7 @@ class Display object OpenFont_req(string name) { - object req = Requests.OpenFont(); + object req = .Requests.OpenFont(); req->fid = alloc_id(); req->name = name; return req; @@ -941,7 +941,7 @@ class Display if(fonts[name]) return fonts[name]; object req = OpenFont_req(name); send_request(req); - fonts[name] = Types.Font(this_object(), req->fid); + fonts[name] = .Types.Font(this_object(), req->fid); return fonts[name]; } @@ -949,7 +949,7 @@ class Display int sourcechar, int maskchar, array(int) foreground, array(int) background) { - object req = Requests.CreateGlyphCursor(); + object req = .Requests.CreateGlyphCursor(); req->cid = alloc_id(); req->sourcefont = sourcefont->id; req->maskfont = maskfont->id; @@ -979,12 +979,12 @@ class Display foreground||({0,0,0}), background||({0xffff,0xffff,0xffff})); send_request(req); - return Types.Cursor(this_object(), req->cid); + return .Types.Cursor(this_object(), req->cid); } object Bell_req(int volume) { - object req=Requests.Bell(); + object req=.Requests.Bell(); req->percent=volume; return req; }