From f4b964145d2f36e290309ae35fcae3238a40eb12 Mon Sep 17 00:00:00 2001 From: David Hedbor <david@hedbor.org> Date: Wed, 11 Feb 1998 14:17:00 -0800 Subject: [PATCH] Added Bell command to be able to beep. Rev: lib/modules/Protocols.pmod/X.pmod/Requests.pmod:1.20 Rev: lib/modules/Protocols.pmod/X.pmod/Xlib.pmod:1.23 --- lib/modules/Protocols.pmod/X.pmod/Requests.pmod | 9 +++++++++ lib/modules/Protocols.pmod/X.pmod/Xlib.pmod | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod index 604add1631..2541bf6cdf 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Requests.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Requests.pmod @@ -741,6 +741,15 @@ class CreateColormap } } +class Bell { + inherit request; + constant reqType = 104; + + int volume; + + string to_string() { return build_request("", volume); } +} + class AllocColor { inherit request; diff --git a/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod b/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod index e4d7afd169..8c3cf5952b 100644 --- a/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod +++ b/lib/modules/Protocols.pmod/X.pmod/Xlib.pmod @@ -946,4 +946,16 @@ class Display send_request(req); return Types.Cursor(this_object(), req->cid); } + + object Bell_req(int volume) + { + object req=Requests.Bell(); + req->volume=volume; + return req; + } + + void Bell(int volume) + { + send_request(Bell_req(volume)); + } } -- GitLab