diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2010-02-25 23:29:42 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2010-02-25 23:29:42 +0000 |
| commit | 60c1ccd33e0e87bacb45d87a9fc3e58b7a9e0723 (patch) | |
| tree | 25338fedbec8221c232340eaa1b29462050fc3b8 /src | |
| parent | 7f395e6e4410e376ff95c914506d1599083afce7 (diff) | |
Working VisualC suport in IDE's (dll's are still missing). Fixed a few warnings.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7147 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_ask.cxx | 11 | ||||
| -rw-r--r-- | src/fl_font_mac.cxx | 1 | ||||
| -rw-r--r-- | src/fl_set_fonts_mac.cxx | 1 | ||||
| -rw-r--r-- | src/fl_shortcut.cxx | 8 | ||||
| -rw-r--r-- | src/fl_show_colormap.cxx | 2 | ||||
| -rw-r--r-- | src/glut_font.cxx | 5 |
6 files changed, 16 insertions, 12 deletions
diff --git a/src/fl_ask.cxx b/src/fl_ask.cxx index 4496c48bf..9d35447e0 100644 --- a/src/fl_ask.cxx +++ b/src/fl_ask.cxx @@ -47,6 +47,10 @@ #include <FL/x.H> #include <FL/fl_draw.H> +#ifdef __APPLE__ +//# include <AudioToolbox/AudioToolbox.h> +#endif + static Fl_Window *message_form; static Fl_Box *message; static Fl_Box *icon; @@ -273,8 +277,11 @@ void fl_beep(int type) { switch (type) { case FL_BEEP_DEFAULT : case FL_BEEP_ERROR : -// SysBeep(30); - AlertSoundPlay(); + // How Apple is not any better than Microsoft: + /* MacOS 8 */ // SysBeep(30); + /* OS X 10.1 */ AlertSoundPlay(); + /* OS X 10.5 */ // AudioServicesPlayAlertSound(kUserPreferredAlert); + /* OS X 10.6 */ // AudioServicesPlayAlertSound(kSystemSoundID_UserPreferredAlert); break; default : break; diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx index c67101824..50c1c613e 100644 --- a/src/fl_font_mac.cxx +++ b/src/fl_font_mac.cxx @@ -319,6 +319,7 @@ else { #if defined(__APPLE_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 } #endif + return 0; // FIXME: I do not understand the shuffeling of the above ifdef's and why they are here! } double fl_width(const char* txt, int n) { diff --git a/src/fl_set_fonts_mac.cxx b/src/fl_set_fonts_mac.cxx index b99a3b55c..b773917bf 100644 --- a/src/fl_set_fonts_mac.cxx +++ b/src/fl_set_fonts_mac.cxx @@ -150,6 +150,7 @@ else { #if defined(__APPLE_COCOA__) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 } #endif + return 0; // FIXME: I do not understand the shuffeling of the above ifdef's and why they are here! } static int array[128]; diff --git a/src/fl_shortcut.cxx b/src/fl_shortcut.cxx index 6576f3e23..fa835b15d 100644 --- a/src/fl_shortcut.cxx +++ b/src/fl_shortcut.cxx @@ -62,7 +62,7 @@ int Fl::test_shortcut(unsigned int shortcut) { if (!shortcut) return 0; unsigned int v = shortcut & FL_KEY_MASK; - if (fl_tolower(v)!=v) { + if (((unsigned)fl_tolower(v))!=v) { shortcut |= FL_SHIFT; } @@ -77,7 +77,7 @@ int Fl::test_shortcut(unsigned int shortcut) { unsigned int key = shortcut & FL_KEY_MASK; // if shift is also correct, check for exactly equal keysyms: - if (!(mismatch&(FL_SHIFT)) && key == Fl::event_key()) return 1; + if (!(mismatch&(FL_SHIFT)) && key == (unsigned)Fl::event_key()) return 1; // try matching utf8, ignore shift: unsigned int firstChar = fl_utf8decode(Fl::event_text(), Fl::event_text()+Fl::event_length(), 0); @@ -90,7 +90,7 @@ int Fl::test_shortcut(unsigned int shortcut) { } // This table must be in numeric order by fltk (X) keysym number: -struct Keyname {int key; const char* name;}; +struct Keyname {unsigned int key; const char* name;}; #if defined(WIN32) static Keyname table[] = { {' ', "Space"}, @@ -193,7 +193,7 @@ const char* fl_shortcut_label(unsigned int shortcut, const char **eom) { if (!shortcut) {*p = 0; return buf;} // fix upper case shortcuts unsigned int v = shortcut & FL_KEY_MASK; - if (fl_tolower(v)!=v) { + if (((unsigned)fl_tolower(v))!=v) { shortcut |= FL_SHIFT; } #ifdef __APPLE__ diff --git a/src/fl_show_colormap.cxx b/src/fl_show_colormap.cxx index 38965e233..fc0556fb9 100644 --- a/src/fl_show_colormap.cxx +++ b/src/fl_show_colormap.cxx @@ -82,7 +82,7 @@ void ColorMenu::draw() { } int ColorMenu::handle(int e) { - int c = which; + Fl_Color c = which; switch (e) { case FL_PUSH: case FL_DRAG: { diff --git a/src/glut_font.cxx b/src/glut_font.cxx index 474689f33..3a53fbfc6 100644 --- a/src/glut_font.cxx +++ b/src/glut_font.cxx @@ -114,11 +114,6 @@ void glutStrokeString(void* fontID, const unsigned char *string) { * A newline will simply translate the next character's insertion * point back to the start of the line and down one line. */ - -#if defined(__GNUC__) -#warning FIXME This needs to be UTF aware now -#endif /*__GNUC__*/ - while ((c = *string++) != 0) { if (c < font->Quantity) { if (c == '\n') { |
