Implement gdk_beep() (woohoo!)

Implement gdk_beep() (woohoo!)
This commit is contained in:
Elliot Lee 2000-08-09 16:12:06 +00:00
parent 9ecfc48c12
commit 06fd9e335d
2 changed files with 17 additions and 5 deletions

View File

@ -23,6 +23,7 @@
#include "gdkkeysyms.h"
#include "gdkprivate-fb.h"
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <fcntl.h>
#include <time.h>
@ -1448,6 +1449,22 @@ tty_keyboard_open(void)
return retval;
}
void
gdk_beep (void)
{
static int pitch = 600, duration = 100;
gulong arg;
if(!keyboard)
return;
/* Thank you XFree86 */
arg = ((1193190 / pitch) & 0xffff) |
(((unsigned long)duration) << 16);
ioctl(keyboard->fd, KDMKTONE, arg);
}
void
keyboard_init(void)
{

View File

@ -467,11 +467,6 @@ gdk_key_repeat_restore (void)
}
void
gdk_beep (void)
{
}
extern void keyboard_shutdown(void);
void