summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2010-11-17 17:05:08 +0000
committerManolo Gouy <Manolo>2010-11-17 17:05:08 +0000
commit9ae50a2703f7fd44e0c4c263557a7bfff83f51da (patch)
tree4778514c829793b378a68a6cbb006e47581836f3 /src
parentc077050d05eeb4afb6af9610889d5829a9cbfbce (diff)
Removed compilation warnings when compiling before 10.5 (STR 2428)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7868 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
-rw-r--r--src/fl_font_mac.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/fl_font_mac.cxx b/src/fl_font_mac.cxx
index b02de3351..e1e4bead6 100644
--- a/src/fl_font_mac.cxx
+++ b/src/fl_font_mac.cxx
@@ -34,7 +34,9 @@ extern unsigned fl_utf8toUtf16(const char* src, unsigned srclen, unsigned short*
#define check_default_font() {if (!fl_fontsize) fl_font(0, 12);}
static const CGAffineTransform font_mx = { 1, 0, 0, -1, 0, 0 };
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
static SInt32 MACsystemVersion = 0;
+#endif
Fl_Font_Descriptor::Fl_Font_Descriptor(const char* name, Fl_Fontsize Size) {
next = 0;
@@ -407,6 +409,7 @@ void Fl_Graphics_Driver::draw(const char* str, int n, int x, int y) {
}
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
static CGColorRef flcolortocgcolor(Fl_Color i)
{
uchar r, g, b;
@@ -414,14 +417,12 @@ static CGColorRef flcolortocgcolor(Fl_Color i)
CGFloat components[4] = {r/255.0f, g/255.0f, b/255.0f, 1.};
static CGColorSpaceRef cspace = NULL;
if(cspace == NULL) {
-#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
cspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
-#else
- cspace = CGColorSpaceCreateWithName(kCGColorSpaceUserRGB);
-#endif
}
return CGColorCreate(cspace, components);
}
+#endif
+
void fl_draw(const char *str, int n, float x, float y) {