diff options
Diffstat (limited to 'experimental/SimpleiOSApp')
-rw-r--r-- | experimental/SimpleiOSApp/SimpleApp.mm | 15 | ||||
-rw-r--r-- | experimental/SimpleiOSApp/tool-Info.plist | 43 |
2 files changed, 57 insertions, 1 deletions
diff --git a/experimental/SimpleiOSApp/SimpleApp.mm b/experimental/SimpleiOSApp/SimpleApp.mm index 12dff34ce4..dba8bccafd 100644 --- a/experimental/SimpleiOSApp/SimpleApp.mm +++ b/experimental/SimpleiOSApp/SimpleApp.mm @@ -3,6 +3,10 @@ #import "SkWindow.h" #include "SkGraphics.h" #include "SkCGUtils.h" + +extern void tool_main(int argc, char *argv[]); +void save_args(int argc, char *argv[]); + class SkSampleView : public SkView { public: SkSampleView() { @@ -15,7 +19,7 @@ protected: SkPaint p; p.setTextSize(20); p.setAntiAlias(true); - canvas->drawText("Hello World!", 13, 50, 30, p); + canvas->drawText("finished", 13, 50, 30, p); SkRect r = {50, 50, 80, 80}; p.setColor(0xAA11EEAA); canvas->drawRect(r, p); @@ -34,6 +38,14 @@ void application_term() { SkEvent::Term(); } +int saved_argc; +char** saved_argv; + +void save_args(int argc, char *argv[]) { + saved_argc = argc; + saved_argv = argv; +} + class FillLayout : public SkView::Layout { protected: virtual void onLayoutChildren(SkView* parent) { @@ -46,6 +58,7 @@ protected: @implementation SimpleApp - (id)initWithDefaults { + (void) tool_main(saved_argc, saved_argv); if (self = [super initWithDefaults]) { fWind = new SkOSWindow(self); fWind->setLayout(new FillLayout, false); diff --git a/experimental/SimpleiOSApp/tool-Info.plist b/experimental/SimpleiOSApp/tool-Info.plist new file mode 100644 index 0000000000..6f8c6d8bd1 --- /dev/null +++ b/experimental/SimpleiOSApp/tool-Info.plist @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleDisplayName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundleExecutable</key> + <string>${EXECUTABLE_NAME}</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.google.${EXECUTABLE_NAME}</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundleName</key> + <string>${PRODUCT_NAME}</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>LSRequiresIPhoneOS</key> + <true/> + <key>NSMainNibFile</key> + <string>MainWindow_iPhone</string> + <key>NSMainNibFile~ipad</key> + <string>MainWindow_iPad</string> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + </array> + <key>UISupportedInterfaceOrientations~ipad</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + <string>UIInterfaceOrientationPortraitUpsideDown</string> + <string>UIInterfaceOrientationLandscapeLeft</string> + <string>UIInterfaceOrientationLandscapeRight</string> + </array> +</dict> +</plist> |