Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
4cc73fd4
Commit
4cc73fd4
authored
27 years ago
by
Niels Möller
Browse files
Options
Downloads
Patches
Plain Diff
*** empty log message ***
Rev: lib/modules/Protocols.pmod/X.pmod/Types.pmod:1.26
parent
a18d7c4c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/modules/Protocols.pmod/X.pmod/Types.pmod
+16
-5
16 additions, 5 deletions
lib/modules/Protocols.pmod/X.pmod/Types.pmod
with
16 additions
and
5 deletions
lib/modules/Protocols.pmod/X.pmod/Types.pmod
+
16
−
5
View file @
4cc73fd4
...
@@ -423,8 +423,11 @@ class Window
...
@@ -423,8 +423,11 @@ class Window
{
{
inherit Drawable;
inherit Drawable;
int currentInputMask;
int currentInputMask;
function FreeRequest = lambda(){}; // FIXME!!
function FreeRequest = lambda(){}; // FIXME!!
mapping(string:array(function)) event_callbacks = ([ ]);
/* Keys are event names, values are arrays of ({ priority, function }) */
mapping(string:array(array)) event_callbacks = ([ ]);
int alt_gr, num_lock, shift, control, caps_lock;
int alt_gr, num_lock, shift, control, caps_lock;
int meta, alt, super, hyper;
int meta, alt, super, hyper;
...
@@ -610,7 +613,7 @@ class Window
...
@@ -610,7 +613,7 @@ class Window
}
}
object CreateWindow(int x, int y, int width, int height,
object CreateWindow(int x, int y, int width, int height,
int border_width, mapping attributes,
int border_width, mapping
|void
attributes,
object|void visual, int|void d,
object|void visual, int|void d,
int|void c_class)
int|void c_class)
{
{
...
@@ -625,6 +628,9 @@ class Window
...
@@ -625,6 +628,9 @@ class Window
}
}
// object w = Window(display, req->wid);
// object w = Window(display, req->wid);
// werror(sprintf("CreateWindowRequest: %s\n",
// Crypto.string_to_hex(req->to_string())));
display->send_request(req);
display->send_request(req);
object w = new(display, req->wid, visual, this_object());
object w = new(display, req->wid, visual, this_object());
w->depth = d||depth||this_object()->rootDepth;
w->depth = d||depth||this_object()->rootDepth;
...
@@ -671,6 +677,9 @@ class Window
...
@@ -671,6 +677,9 @@ class Window
object req = Requests.ConfigureWindow();
object req = Requests.ConfigureWindow();
req->window = id;
req->window = id;
req->attributes = m;
req->attributes = m;
// werror(sprintf("ConfigureRequest: %s\n",
// Crypto.string_to_hex(req->to_string())));
return req;
return req;
}
}
...
@@ -689,10 +698,12 @@ class Window
...
@@ -689,10 +698,12 @@ class Window
Configure((["StackMode":1]));
Configure((["StackMode":1]));
}
}
void set_event_callback(string type, function f)
/* Keep callbacks sorted by decreasing priority */
void set_event_callback(string type, function f, int|void priority)
{
{
event_callbacks[type] = (event_callbacks[type] || ({ }) )
event_callbacks[type] =
+ ({ f });
reverse(sort((event_callbacks[type] || ({ }) )
+ ({ ({ priority, f }) }) ));
}
}
object SelectInput_req()
object SelectInput_req()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment