FLTK logo

[Library] r5753 - trunk/src

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[Library] r5753 - trunk/src fltk-dev Apr 02, 2007  
 
Author: fabien
Date: 2007-04-03 02:30:16 -0400 (Tue, 03 Apr 2007)
New Revision: 5753
Log:
+ removed os dependent beep code please use fltk::beep() portable api
+ make ansiwidget compiled under osx though getpixel impl needs to be done
 


Modified:
   trunk/src/AnsiWidget.cxx

Modified: trunk/src/AnsiWidget.cxx
===================================================================
--- trunk/src/AnsiWidget.cxx	2007-04-02 15:39:41 UTC (rev 5752)
+++ trunk/src/AnsiWidget.cxx	2007-04-03 06:30:16 UTC (rev 5753)
@@ -35,6 +35,7 @@
 #include <fltk/Font.h>
 #include <fltk/Rectangle.h>
 #include <fltk/Group.h>
+#include <fltk/ask.h>
 
 #if defined(WIN32) 
 #include <fltk/win32.h>
@@ -328,7 +329,8 @@
   // needs to return a -ve number to distiguish from basic 16 color values
   // unpacked in later calls to ansiToFltk()
   return -::GetPixel(fl_bitmap_dc, x, y);
-
+#elif defined(__APPLE__)
+  // TODO !
 #else
   XImage *image = 
     XGetImage(fltk::xdisplay, xwindow, x, y, 1, 1, AllPlanes, ZPixmap);
@@ -337,20 +339,14 @@
     XDestroyImage(image);
     return -color;
   }
-  return 0;
 #endif
+  return 0;
 }
 
 /*! create audible beep sound
  */
 void AnsiWidget::beep() const {
-#ifdef WIN32
-  MessageBeep(MB_ICONASTERISK);
-#elif defined(__APPLE__)
-  SysBeep(30);
-#else
-  XBell(fltk::xdisplay, 100);
-#endif
+  fltk::beep(fltk::BEEP_MESSAGE);
 }
 
 /*! Returns the width in pixels using the current font setting

Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.