1 /*
2 * This file is part of the XForms library package.
3 *
4 * XForms is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as
6 * published by the Free Software Foundation; either version 2.1, or
7 * (at your option) any later version.
8 *
9 * XForms is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with XForms. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18
19 /**
20 * \file keyboard.c
21 *
22 * This file is part of the XForms library package.
23 * Copyright (c) 1996-2002 T.C. Zhao
24 * All rights reserved.
25 *
26 * Misc. keyboard routines
27 */
28
29 #ifdef HAVE_CONFIG_H
30 #include "config.h"
31 #endif
32
33 #include "include/forms.h"
34 #include "flinternal.h"
35
36
37 /***************************************
38 ***************************************/
39
40 void
fl_ringbell(int percent)41 fl_ringbell( int percent )
42 {
43 if ( percent < -100 )
44 percent = -100;
45 else if ( percent > 100 )
46 percent = 100;
47
48 if ( flx->display )
49 XBell( flx->display, percent );
50 else
51 fprintf( stderr, "\a" );
52 }
53
54
55 /*
56 * Local variables:
57 * tab-width: 4
58 * indent-tabs-mode: nil
59 * End:
60 */
61