On 10 Jun 2012, at 19:31, Greg Ercolano wrote:

>       Doing some research to see what other toolkits do, seems FLTK
>       is consistent with wxwidgets and Qt; both use only XBell().
>       Only GTK tries both:
> 
> 
> *** WX WIDGETS (2.9.3) ***
> void wxBell()
> {
>    // Use current setting for the bell
>    XBell ((Display*) wxGetDisplay(), 0);
> }
> 
> 
> *** QT (current git) ***
> void QApplication::beep()
> {
>    if (X11->display)
>        XBell(X11->display, 0);
>    else
>        printf("\7");                          // << what, no fflush(stdout)? 
> -erco
> }
> 
> 
> *** GTK 3.2.2 ***
> static void gdk_x11_display_beep (GdkDisplay *display)
> {
> #ifdef HAVE_XKB
>  XkbBell (GDK_DISPLAY_XDISPLAY (display), None, 0, None);
> #else
>  XBell (GDK_DISPLAY_XDISPLAY (display), 0);
> #endif
> }
> 
> 
> 
> *** FLTK (1.3.x) ***
> void fl_beep(int type) {
>   [..X11..]
>  switch (type) {
>    case FL_BEEP_DEFAULT :
>    case FL_BEEP_ERROR :
>      if (!fl_display) fl_open_display();
> 
>      XBell(fl_display, 100);
>      break;
>    default :
>      if (!fl_display) fl_open_display();
> 
>      XBell(fl_display, 50);
>      break;
>  }
> 
> 
>       Although GTK is in the minority, they might also be
>       more up to date on new trends in X11 than the other libs
>       because they're perhaps closer to the linux community
>       where change happens quickly.
> 
>       So perhaps we should do the #ifdef for using XkbBell()
>       if available.
> 
>       Seems other platforms like Apple and Sun support this
>       extension, so maybe we should too.


Going off at a tangent...

One thing that strikes me is that, based on those examples, we are the only 
ones attempting to adjust the beep volume here; everyone else has put the 
volume scale to 0 (which I *think* just makes it play at the current default 
setting) whereas we appear to be attempting to scale the volume a bit.

Maybe just setting the scalar to 0 would be a better option anyway - more in 
line with what the user would expect?


But this is all most likely irrelevant to the OP's original question of course!

-- 
Ian



_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to