#ifdef protect win specific code (e.g. LOGFONT)



git-svn-id: http://skia.googlecode.com/svn/trunk@874 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/samplecode/SampleTextBox.cpp b/samplecode/SampleTextBox.cpp
index 9511914..f2b5e2c 100644
--- a/samplecode/SampleTextBox.cpp
+++ b/samplecode/SampleTextBox.cpp
@@ -20,9 +20,11 @@
 #include "SkStream.h"
 #include "SkKey.h"
 
+#ifdef SK_BUILD_FOR_WIN
 extern SkTypeface* SkCreateTypefaceFromLOGFONT(const LOGFONT&);
+#endif
 
-static const char gText[] = 
+static const char gText[] =
 	"When in the Course of human events it becomes necessary for one people "
 	"to dissolve the political bands which have connected them with another "
 	"and to assume among the powers of the earth, the separate and equal "
@@ -31,8 +33,9 @@
 	"declare the causes which impel them to the separation.";
 
 class TextBoxView : public SkView {
-public:    
+public:
 	TextBoxView() {
+#ifdef SK_BUILD_FOR_WIN
 		LOGFONT lf;
 		sk_bzero(&lf, sizeof(lf));
 		lf.lfHeight = 9;
@@ -43,8 +46,9 @@
 		SkASSERT(tf0 == tf1);
 		tf0->unref();
 		tf1->unref();
+#endif
 	}
-    
+
 protected:
     // overrides from SkEventSink
     virtual bool onQuery(SkEvent* evt)  {
@@ -55,11 +59,11 @@
         }
         return this->INHERITED::onQuery(evt);
     }
-    
+
     void drawBG(SkCanvas* canvas) {
         canvas->drawColor(SK_ColorWHITE);
     }
-    
+
     virtual void onDraw(SkCanvas* canvas) {
         this->drawBG(canvas);
 
@@ -80,7 +84,7 @@
 			canvas->translate(0, tbox.getTextHeight() + paint.getFontSpacing());
 		}
     }
-    
+
 private:
     typedef SkView INHERITED;
 };