diff options
author | Jesse Luehrs <doy@tozt.net> | 2014-10-18 03:00:09 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2014-10-18 03:00:09 -0400 |
commit | fd2fd02c97f505a3078f9870b09ed827c9f21724 (patch) | |
tree | 5482a64454ffdd72fcfe0ef94307880785e11cd1 | |
parent | 75a8e85aeb4000dad28a063876c34154024920a2 (diff) | |
download | libvt100-python-fd2fd02c97f505a3078f9870b09ed827c9f21724.tar.gz libvt100-python-fd2fd02c97f505a3078f9870b09ed827c9f21724.zip |
expose the visual_bell and audible_bell bits
-rw-r--r-- | vt100/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vt100/__init__.py b/vt100/__init__.py index 3c320fa..c01ee9d 100644 --- a/vt100/__init__.py +++ b/vt100/__init__.py @@ -178,3 +178,13 @@ class vt100(object): if x < 0 or x >= self.cols or y < 0 or y >= self.rows: return None return vt100_cell.from_address(vt100_raw.cell_at(self.vt, x, y)) + + def seen_visual_bell(self): + seen = self.screen._visual_bell + self.screen._visual_bell = 0 + return seen != 0 + + def seen_audible_bell(self): + seen = self.screen._audible_bell + self.screen._audible_bell = 0 + return seen != 0 |