Implement gdk_beep() (woohoo!)
Implement gdk_beep() (woohoo!)
This commit is contained in:
parent
9ecfc48c12
commit
06fd9e335d
@ -23,6 +23,7 @@
|
|||||||
#include "gdkkeysyms.h"
|
#include "gdkkeysyms.h"
|
||||||
#include "gdkprivate-fb.h"
|
#include "gdkprivate-fb.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@ -1448,6 +1449,22 @@ tty_keyboard_open(void)
|
|||||||
return retval;
|
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
|
void
|
||||||
keyboard_init(void)
|
keyboard_init(void)
|
||||||
{
|
{
|
||||||
|
@ -467,11 +467,6 @@ gdk_key_repeat_restore (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
|
||||||
gdk_beep (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
extern void keyboard_shutdown(void);
|
extern void keyboard_shutdown(void);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user