Skip to content
Snippets Groups Projects
Commit 99b490cc authored by Niels Möller's avatar Niels Möller
Browse files

Added Window->Configure, Window->ChangeAttributes and

Drawable->PolyLine

Rev: lib/modules/Protocols.pmod/X.pmod/Types.pmod:1.4
Rev: lib/modules/Protocols.pmod/X.pmod/_Xlib.pmod:1.4
parent 67fb324d
No related branches found
No related tags found
No related merge requests found
......@@ -159,6 +159,21 @@ class Drawable
object req = FillRectangles_req(gc->id, r);
display->send_request(req);
}
object DrawLine_req(int gc, int coordMode, array(object) points)
{
object req = Requests.PolyLine();
req->drawable = id;
req->gc = gc;
req->coordMode = coordMode;
req->points = points;
return req;
}
void DrawLine(object gc, int coordMode, object ... points)
{
display->send_request(DrawLine_req(gc->id, coordMode, points));
}
}
class Window
......@@ -228,6 +243,33 @@ class Window
return w;
}
object ChangeAttributes_req(mapping m)
{
object req = Requests.ChangeWindowAttributes();
req->window = id;
req->attributes = m;
return req;
}
void ChangeAttributes(mapping m)
{
display->send_request(ChangeAttributes_req(m));
}
object Configure_req(mapping m)
{
object req = Requests.ConfigureWindow();
req->window = id;
req->attributes = m;
return req;
}
void Configure(mapping m)
{
display->send_request(Configure_req(m));
}
void set_event_callback(string type, function f)
{
event_callbacks[type] = f;
......
......@@ -22,6 +22,17 @@ array(string) window_attributes =
"Colormap",
"Cursor" });
array(string) window_configure_attributes =
({
"X",
"Y",
"Width",
"Height",
"BorderWidth",
"Sibling",
"StackMode"
});
array(string) gc_attributes =
({
"Function",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment