Utils must not depend on Views.
http://codereview.appspot.com/5867051/
git-svn-id: http://skia.googlecode.com/svn/trunk@3459 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index b915821..2a38add 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -174,33 +174,33 @@
],
'sources': [
# Sample App specific files
- '../src/utils/mac/SampleApp-Info.plist',
- '../src/utils/mac/SampleAppDelegate.h',
- '../src/utils/mac/SampleAppDelegate.mm',
- '../src/utils/mac/SkSampleNSView.h',
- '../src/utils/mac/SkSampleNSView.mm',
+ '../src/views/mac/SampleApp-Info.plist',
+ '../src/views/mac/SampleAppDelegate.h',
+ '../src/views/mac/SampleAppDelegate.mm',
+ '../src/views/mac/SkSampleNSView.h',
+ '../src/views/mac/SkSampleNSView.mm',
# Mac files
- '../src/utils/mac/SkEventNotifier.h',
- '../src/utils/mac/SkEventNotifier.mm',
- '../src/utils/mac/skia_mac.mm',
- '../src/utils/mac/SkNSView.h',
- '../src/utils/mac/SkNSView.mm',
- '../src/utils/mac/SkOptionsTableView.h',
- '../src/utils/mac/SkOptionsTableView.mm',
- '../src/utils/mac/SkOSWindow_Mac.mm',
- '../src/utils/mac/SkTextFieldCell.h',
- '../src/utils/mac/SkTextFieldCell.m',
+ '../src/views/mac/SkEventNotifier.h',
+ '../src/views/mac/SkEventNotifier.mm',
+ '../src/views/mac/skia_mac.mm',
+ '../src/views/mac/SkNSView.h',
+ '../src/views/mac/SkNSView.mm',
+ '../src/views/mac/SkOptionsTableView.h',
+ '../src/views/mac/SkOptionsTableView.mm',
+ '../src/views/mac/SkOSWindow_Mac.mm',
+ '../src/views/mac/SkTextFieldCell.h',
+ '../src/views/mac/SkTextFieldCell.m',
],
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
'$(SDKROOT)/System/Library/Frameworks/OpenGL.framework',
],
'xcode_settings' : {
- 'INFOPLIST_FILE' : '../src/utils/mac/SampleApp-Info.plist',
+ 'INFOPLIST_FILE' : '../src/views/mac/SampleApp-Info.plist',
},
'mac_bundle_resources' : [
- '../src/utils/mac/SampleApp.xib',
+ '../src/views/mac/SampleApp.xib',
],
}],
[ 'skia_os == "ios"', {
@@ -222,7 +222,7 @@
'../experimental/iOSSampleApp/iPhone/AppDelegate_iPhone.mm',
'../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
- '../src/utils/ios/SkOSWindow_iOS.mm',
+ '../src/views/ios/SkOSWindow_iOS.mm',
'../src/utils/ios/SkImageDecoder_iOS.mm',
'../src/utils/ios/SkStream_NSData.mm',
'../src/utils/ios/SkOSFile_iOS.mm',
diff --git a/gyp/SimpleCocoaApp.gyp b/gyp/SimpleCocoaApp.gyp
index f5e41c4..13f05dc 100644
--- a/gyp/SimpleCocoaApp.gyp
+++ b/gyp/SimpleCocoaApp.gyp
@@ -8,16 +8,16 @@
'../experimental/SimpleCocoaApp/',
],
'sources': [
- '../src/utils/mac/SkEventNotifier.h',
- '../src/utils/mac/SkEventNotifier.mm',
- '../src/utils/mac/skia_mac.mm',
- '../src/utils/mac/SkNSView.h',
- '../src/utils/mac/SkNSView.mm',
- '../src/utils/mac/SkOptionsTableView.h',
- '../src/utils/mac/SkOptionsTableView.mm',
- '../src/utils/mac/SkOSWindow_Mac.mm',
- '../src/utils/mac/SkTextFieldCell.h',
- '../src/utils/mac/SkTextFieldCell.m',
+ '../src/views/mac/SkEventNotifier.h',
+ '../src/views/mac/SkEventNotifier.mm',
+ '../src/views/mac/skia_mac.mm',
+ '../src/views/mac/SkNSView.h',
+ '../src/views/mac/SkNSView.mm',
+ '../src/views/mac/SkOptionsTableView.h',
+ '../src/views/mac/SkOptionsTableView.mm',
+ '../src/views/mac/SkOSWindow_Mac.mm',
+ '../src/views/mac/SkTextFieldCell.h',
+ '../src/views/mac/SkTextFieldCell.m',
'../experimental/SimpleCocoaApp/SimpleApp-Info.plist',
'../experimental/SimpleCocoaApp/SimpleApp.h',
diff --git a/gyp/iOSSampleApp.gyp b/gyp/iOSSampleApp.gyp
index b864ca6..f504594 100644
--- a/gyp/iOSSampleApp.gyp
+++ b/gyp/iOSSampleApp.gyp
@@ -1,7 +1,4 @@
{
- 'includes': [
- 'target_defaults.gypi',
- ],
'defines!': [
'SK_BUILD_FOR_MAC',
],
@@ -212,7 +209,7 @@
'../experimental/iOSSampleApp/iPhone/SkUINavigationController.mm',
'../experimental/iOSSampleApp/iPhone/MainWindow_iPhone.xib',
- '../src/utils/ios/SkOSWindow_iOS.mm',
+ '../src/views/ios/SkOSWindow_iOS.mm',
'../src/utils/ios/SkImageDecoder_iOS.mm',
'../src/utils/ios/SkStream_NSData.mm',
'../src/utils/ios/SkOSFile_iOS.mm',
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 87d6e97..1847e95 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -10,7 +10,6 @@
'../include/utils/mac',
'../include/utils/unix',
'../include/utils/win',
- '../include/views',
'../include/effects',
'../include/xml',
],
@@ -62,13 +61,6 @@
#mac
'../include/utils/mac/SkCGUtils.h',
'../src/utils/mac/SkCreateCGImageRef.cpp',
-
- #sdl
- '../src/utils/SDL/SkOSWindow_SDL.cpp',
-
- #*nix
- '../src/utils/unix/keysym2ucs.c',
- '../src/utils/unix/SkOSWindow_Unix.cpp',
#windows
'../include/utils/win/SkAutoCoInitialize.h',
@@ -76,10 +68,8 @@
'../include/utils/win/SkIStream.h',
'../include/utils/win/SkTScopedComPtr.h',
'../src/utils/win/SkAutoCoInitialize.cpp',
- '../src/utils/win/skia_win.cpp',
'../src/utils/win/SkHRESULT.cpp',
'../src/utils/win/SkIStream.cpp',
- '../src/utils/win/SkOSWindow_win.cpp',
'../src/utils/win/SkWGL_win.cpp',
],
'sources!': [
@@ -104,8 +94,6 @@
'sources!': [
'../include/utils/mac/SkCGUtils.h',
'../src/utils/mac/SkCreateCGImageRef.cpp',
- '../src/utils/mac/skia_mac.mm',
- '../src/utils/mac/SkOSWindow_Mac.mm',
],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
@@ -119,10 +107,6 @@
'include_dirs!': [
'../include/utils/unix',
],
- 'sources!': [
- '../src/utils/unix/keysym2ucs.c',
- '../src/utils/unix/SkOSWindow_Unix.cpp',
- ],
}],
[ 'skia_os == "win"', {
'direct_dependent_settings': {
diff --git a/gyp/views.gyp b/gyp/views.gyp
index e997573..832c180 100644
--- a/gyp/views.gyp
+++ b/gyp/views.gyp
@@ -12,6 +12,7 @@
'../include/images',
'../include/animator',
'../include/effects',
+ '../include/views/unix',
],
'sources': [
'../include/views/SkApplication.h',
@@ -64,10 +65,27 @@
'../src/views/SkWidgets.cpp',
'../src/views/SkWidgetViews.cpp',
'../src/views/SkWindow.cpp',
+
+ #mac
+ '../src/views/mac/SkOSWindow_Mac.mm',
+ '../src/views/mac/skia_mac.mm',
+
+ #sdl
+ '../src/views/SDL/SkOSWindow_SDL.cpp',
+
+ #*nix
+ '../src/views/unix/SkOSWindow_Unix.cpp',
+ '../src/views/unix/keysym2ucs.c',
+
+ #windows
+ '../src/views/win/SkOSWindow_win.cpp',
+ '../src/views/win/skia_win.cpp',
+
],
'sources!' : [
'../src/views/SkListView.cpp', #depends on missing SkListSource implementation
'../src/views/SkListWidget.cpp', #depends on missing SkListSource implementation
+ '../src/views/SDL/SkOSWindow_SDL.cpp',
],
'conditions': [
[ 'skia_os == "mac"', {
@@ -77,11 +95,28 @@
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
],
},
+ },{
+ 'sources!': [
+ '../src/views/mac/SkOSWindow_Mac.mm',
+ '../src/views/mac/skia_mac.mm',
+ ],
}],
[ 'skia_os in ["linux", "freebsd", "openbsd", "solaris"]', {
'sources': [
'../unix_test_app/main.cpp',
],
+ },{
+ 'sources!': [
+ '../src/views/unix/SkOSWindow_Unix.cpp',
+ '../src/views/unix/keysym2ucs.c',
+ ],
+ }],
+ [ 'skia_os == "win"', {
+ },{
+ 'sources!': [
+ '../src/views/win/SkOSWindow_win.cpp',
+ '../src/views/win/skia_win.cpp',
+ ],
}],
[ 'skia_os == "android"', {
# Android does not support animator so we need to remove all files