OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SampleApp.h" | 8 #include "SampleApp.h" |
9 | 9 |
10 #include "OverView.h" | 10 #include "OverView.h" |
(...skipping 2368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2379 // FIXME: this should be in a header | 2379 // FIXME: this should be in a header |
2380 void get_preferred_size(int* x, int* y, int* width, int* height); | 2380 void get_preferred_size(int* x, int* y, int* width, int* height); |
2381 void get_preferred_size(int* x, int* y, int* width, int* height) { | 2381 void get_preferred_size(int* x, int* y, int* width, int* height) { |
2382 *x = 10; | 2382 *x = 10; |
2383 *y = 50; | 2383 *y = 50; |
2384 *width = 640; | 2384 *width = 640; |
2385 *height = 480; | 2385 *height = 480; |
2386 } | 2386 } |
2387 | 2387 |
2388 #ifdef SK_BUILD_FOR_IOS | 2388 #ifdef SK_BUILD_FOR_IOS |
2389 bool set_cmd_line_args(int , char *[], const char* resourceDir) { | 2389 IOS_launch_type set_cmd_line_args(int , char *[], const char* resourceDir) { |
2390 SetResourcePath(resourceDir); | 2390 SetResourcePath(resourceDir); |
2391 return false; | 2391 return kApplication__iOSLaunchType; |
2392 } | 2392 } |
2393 #endif | 2393 #endif |
2394 | 2394 |
2395 // FIXME: this should be in a header | |
2396 void application_init(); | |
2397 void application_init() { | 2395 void application_init() { |
2398 // setenv("ANDROID_ROOT", "../../../data", 0); | 2396 // setenv("ANDROID_ROOT", "../../../data", 0); |
2399 #ifdef SK_BUILD_FOR_MAC | 2397 #ifdef SK_BUILD_FOR_MAC |
2400 setenv("ANDROID_ROOT", "/android/device/data", 0); | 2398 setenv("ANDROID_ROOT", "/android/device/data", 0); |
2401 #endif | 2399 #endif |
2402 SkGraphics::Init(); | 2400 SkGraphics::Init(); |
2403 SkEvent::Init(); | 2401 SkEvent::Init(); |
2404 } | 2402 } |
2405 | 2403 |
2406 // FIXME: this should be in a header | |
2407 void application_term(); | |
2408 void application_term() { | 2404 void application_term() { |
2409 SkEvent::Term(); | 2405 SkEvent::Term(); |
2410 SkGraphics::Term(); | 2406 SkGraphics::Term(); |
2411 } | 2407 } |
OLD | NEW |