mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-23 21:52:18 +00:00
...
This commit is contained in:
parent
e3bbb7a3c9
commit
5636971999
1 changed files with 8 additions and 8 deletions
|
|
@ -116,14 +116,6 @@ dealloc(Screen* self) {
|
|||
Py_TYPE(self)->tp_free((PyObject*)self);
|
||||
} // }}}
|
||||
|
||||
void screen_bell(Screen UNUSED *self, uint8_t ch) { // {{{
|
||||
FILE *f = fopen("/dev/tty", "w");
|
||||
if (f != NULL) {
|
||||
fwrite(&ch, 1, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
} // }}}
|
||||
|
||||
// Draw text {{{
|
||||
|
||||
void screen_shift_out(Screen *self, uint8_t UNUSED ch) {
|
||||
|
|
@ -792,6 +784,14 @@ void screen_erase_characters(Screen *self, unsigned int count) {
|
|||
|
||||
// Device control {{{
|
||||
|
||||
void screen_bell(Screen UNUSED *self, uint8_t ch) {
|
||||
FILE *f = fopen("/dev/tty", "w");
|
||||
if (f != NULL) {
|
||||
fwrite(&ch, 1, 1, f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void callback(const char *name, Screen *self, const char *data, unsigned int sz) {
|
||||
if (sz) PyObject_CallMethod(self->callbacks, name, "y#", data, sz);
|
||||
else PyObject_CallMethod(self->callbacks, name, "y", data);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue