Added CocoaDebugger to experimental

git-svn-id: http://skia.googlecode.com/svn/trunk@1622 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
yangsu@google.com 2011-06-16 20:49:55 +00:00
Родитель af951c9bc4
Коммит a8a42e20f0
21 изменённых файлов: 5865 добавлений и 514 удалений

Просмотреть файл

@ -0,0 +1,32 @@
<?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>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

Просмотреть файл

@ -0,0 +1,8 @@
#import <Cocoa/Cocoa.h>
#import "SkNSWindow.h"
@interface CocoaDebuggerAppDelegate : NSObject <NSApplicationDelegate> {
SkNSWindow *window;
}
@property (assign) IBOutlet SkNSWindow *window;
@end

Просмотреть файл

@ -0,0 +1,10 @@
#import "CocoaDebuggerAppDelegate.h"
@implementation CocoaDebuggerAppDelegate
@synthesize window;
-(void) applicationDidFinishLaunching:(NSNotification *)aNotification {
//Load specified skia views after launching
[window installSkViews];
}
@end

Просмотреть файл

@ -0,0 +1,7 @@
//
// Prefix header for all source files of the 'CocoaSampleApp' target in the 'CocoaSampleApp' project
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

Просмотреть файл

@ -0,0 +1,2 @@
/* Localized versions of Info.plist keys */

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,141 @@
#include "SkDebuggerViews.h"
SkCommandListView::SkCommandListView() {
fBGColor = 0xFFBBBBBB;
fTopIndex = 0;
fHighlight = 0;
SkPaint p;
p.setTextSize(SkIntToScalar(SkDebugger_TextSize));
fSpacing = p.getFontSpacing();
fCentered = false;
fRange = (int)(this->height()/fSpacing) - 1;
}
bool SkCommandListView::onEvent(const SkEvent& evt) {
if (evt.isType(SkDebugger_CommandType)) {
SkString msg(evt.findString(SkDebugger_Atom));
fList.push_back(msg);
this->inval(NULL);
return true;
}
return this->INHERITED::onEvent(evt);
}
void SkCommandListView::onSizeChange() {
fRange = (int)(this->height()/fSpacing) - 1;
this->INHERITED::onSizeChange();
}
void SkCommandListView::reinit() {
fList.clear();
fTopIndex = 0;
fHighlight = 0;
}
void SkCommandListView::alignCenter() {
if (!fCentered || fHighlight < fRange/2 || fHighlight > (fList.size() - fRange/2))
return;
else {
if (fHighlight > (fTopIndex + fRange/2)) {
fTopIndex += fHighlight - (fTopIndex + fRange/2);
}
if (fHighlight < (fTopIndex + fRange/2)) {
fTopIndex -= (fTopIndex + fRange/2) - fHighlight;
}
}
}
int SkCommandListView::nextItem() {
if (fHighlight < fList.size() - 1)
++fHighlight;
if (fHighlight < fTopIndex || fHighlight > (fTopIndex + fRange)) {
fTopIndex = fHighlight;
}
if (fHighlight == (fTopIndex + fRange)) {
++fTopIndex;
}
this->alignCenter();
this->inval(NULL);
return fHighlight;
}
int SkCommandListView::prevItem() {
if (fHighlight > 0)
--fHighlight;
if (fHighlight < fTopIndex || fHighlight > (fTopIndex + fRange)) {
fTopIndex = fHighlight;
}
this->alignCenter();
this->inval(NULL);
return fHighlight;
}
int SkCommandListView::scrollUp() {
if (fTopIndex > 0)
--fTopIndex;
this->inval(NULL);
return fHighlight;
}
int SkCommandListView::scrollDown() {
if (fTopIndex < (fList.size() - 1))
++fTopIndex;
this->inval(NULL);
return fHighlight;
}
void SkCommandListView::highlight(int index) {
SkASSERT(index >= 0 && index < fList.size());
if (fHighlight != index) {
fHighlight = index;
this->alignCenter();
this->inval(NULL);
}
}
int SkCommandListView::selectHighlight(int ypos) {
int i = (int)(ypos/fSpacing) + fTopIndex;
if (i >= fList.size()) {
i = fList.size() - 1;
}
if (fHighlight != i) {
fHighlight = i;
this->alignCenter();
this->inval(NULL);
}
return fHighlight;
}
void SkCommandListView::toggleCentered() {
fCentered = !fCentered;
this->alignCenter();
this->inval(NULL);
}
void SkCommandListView::onDraw(SkCanvas* canvas) {
canvas->drawColor(fBGColor);
SkPaint p;
p.setTextSize(SkIntToScalar(SkDebugger_TextSize));
p.setAntiAlias(true);
//draw highlight
int selected = fHighlight - fTopIndex;
SkRect r = {0, fSpacing * selected, this->width(), fSpacing * (selected+1)};
p.setColor(0x880033DD);
canvas->drawRect(r, p);
int endIndex = fTopIndex + fRange;
if (endIndex > fList.size())
endIndex = fList.size();
p.setColor(0xFF000000);
int pos;
for (int i = fTopIndex; i < endIndex; ++i) {
pos = i - fTopIndex;
canvas->drawText(fList[i].c_str(), fList[i].size(),
0, fSpacing - 2 + fSpacing * pos, p);
}
this->INHERITED::onDraw(canvas);
}

Просмотреть файл

@ -0,0 +1,150 @@
#include "SkDebuggerViews.h"
#include <stdio.h>
SkContentView::SkContentView(SkEventSinkID clID, SkEventSinkID ipID) :
fDumper(this->getSinkID(), clID, ipID) {
fBGColor = 0xFFDDDDDD;
fAtomsToRead = 0;
fDisplayClip = false;
}
SkContentView::~SkContentView() {
fAtomBounds.clear();
fFrameBounds.clear();
}
void SkContentView::reinit(const char* filename) {
fFilePath.set(filename);
fAtomsToRead = 0;
this->init();
}
bool SkContentView::onEvent(const SkEvent& evt) {
return this->INHERITED::onEvent(evt);
}
//Read file atom by atom and record attom bounds
void SkContentView::init() {
fDumper.unload();
fAtomBounds.clear();
fFrameBounds.clear();
SkDumpCanvasM* dumpCanvas = new SkDumpCanvasM(&fDumper);
SkGPipeReader* dumpReader = new SkGPipeReader(dumpCanvas);
FILE* f = fopen(fFilePath.c_str(), "rb");
SkASSERT(f != NULL);
fseek(f, 0, SEEK_END);
int fileSize = ftell(f) * sizeof(char);
fseek(f, 0, SEEK_SET);
if (fileSize > 0) {
char* block = (char*)sk_malloc_throw(fileSize);
fread(block, 1, fileSize, f);
int offset = 0;
int frameBound = 0;
size_t bytesRead;
while (offset < fileSize) {
SkGPipeReader::Status s = dumpReader->playback(block + offset,
fileSize - offset,
&bytesRead, true);
SkASSERT(SkGPipeReader::kError_Status != s);
offset += bytesRead;
if (SkGPipeReader::kDone_Status == s) {
fDumper.dump(dumpCanvas,SkDumpCanvasM::kNULL_Verb,
"End of Frame", NULL);
delete dumpReader;
delete dumpCanvas;
dumpCanvas = new SkDumpCanvasM(&fDumper);
dumpReader = new SkGPipeReader(dumpCanvas);
frameBound = offset;
}
fAtomBounds.push_back(offset);
fFrameBounds.push_back(frameBound);
}
sk_free(block);
}
fclose(f);
delete dumpReader;
delete dumpCanvas;
fDumper.load();
}
void SkContentView::goToAtom(int atom) {
if (atom != fAtomsToRead) {
fAtomsToRead = atom;
this->inval(NULL);
}
}
void SkContentView::toggleClip() {
fDisplayClip = !fDisplayClip;
this->inval(NULL);
}
void SkContentView::onDraw(SkCanvas* canvas) {
canvas->drawColor(fBGColor);
SkAutoCanvasRestore acr(canvas, true);
int lastFrameBound = fFrameBounds[fAtomsToRead];
int toBeRead = fAtomBounds[fAtomsToRead] - lastFrameBound;
int firstChunk = (fAtomsToRead > 0) ? fAtomBounds[fAtomsToRead - 1] -
lastFrameBound: 0;
if (toBeRead > 0) {
SkDumpCanvasM* dumpCanvas = new SkDumpCanvasM(&fDumper);
SkGPipeReader* dumpReader = new SkGPipeReader(dumpCanvas);
SkGPipeReader* reader = new SkGPipeReader(canvas);
fDumper.disable();
FILE* f = fopen(fFilePath.c_str(), "rb");
SkASSERT(f != NULL);
fseek(f, lastFrameBound, SEEK_SET);
char* block = (char*)sk_malloc_throw(toBeRead);
fread(block, 1, toBeRead, f);
int offset = 0;
size_t bytesRead;
SkGPipeReader::Status s;
//Read the first chunk
if (offset < firstChunk && firstChunk < toBeRead) {
s = dumpReader->playback(block + offset, firstChunk - offset, NULL, false);
SkASSERT(SkGPipeReader::kError_Status != s);
s = reader->playback(block + offset, firstChunk - offset, &bytesRead, false);
SkASSERT(SkGPipeReader::kError_Status != s);
if (SkGPipeReader::kDone_Status == s){
delete dumpReader;
delete dumpCanvas;
dumpCanvas = new SkDumpCanvasM(&fDumper);
dumpReader = new SkGPipeReader(dumpCanvas);
delete reader;
reader = new SkGPipeReader(canvas);
}
offset += bytesRead;
}
SkASSERT(offset == firstChunk);
//Then read the current atom
fDumper.enable();
s = dumpReader->playback(block + offset, toBeRead - offset, NULL, true);
SkASSERT(SkGPipeReader::kError_Status != s);
s = reader->playback(block + offset, toBeRead - offset, &bytesRead, true);
SkASSERT(SkGPipeReader::kError_Status != s);
sk_free(block);
fclose(f);
delete reader;
delete dumpReader;
delete dumpCanvas;
if (fDisplayClip) {
SkPaint p;
p.setColor(0x440000AA);
SkPath path;
canvas->getTotalClip().getBoundaryPath(&path);
canvas->drawPath(path, p);
}
}
this->INHERITED::onDraw(canvas);
}

Просмотреть файл

@ -0,0 +1,161 @@
#include "SkDebugDumper.h"
#include "SkString.h"
#include "SkPaint.h"
#include "SkShader.h"
#include "SkPathEffect.h"
#include "SkXfermode.h"
#include "SkColorFilter.h"
#include "SkPathEffect.h"
#include "SkMaskFilter.h"
#include "SkGradientShader.h"
#include "SkDebuggerViews.h"
bool gNeverSetToTrueJustNeedToFoolLinker;
static void init_effects() {
if (gNeverSetToTrueJustNeedToFoolLinker) {
SkPoint p = SkPoint::Make(0,0);
SkPoint q = SkPoint::Make(100,100);
SkPoint pts[] = {p, q};
SkColor colors[] = { SK_ColorRED, SK_ColorGREEN };
SkScalar pos[] = { 0, 1.0};
SkGradientShader::CreateLinear(pts, colors, pos, 2,
SkShader::kMirror_TileMode);
}
}
SkDebugDumper::SkDebugDumper(SkEventSinkID cID, SkEventSinkID clID,
SkEventSinkID ipID) {
fContentID = cID;
fCommandListID = clID;
fInfoPanelID = ipID;
fInit = false;
fDisabled = false;
fCount = 0;
init_effects();
}
static void appendPtr(SkString* str, const void* ptr, const char name[]) {
if (ptr) {
str->appendf("$s: %p\t", name, ptr);
}
}
static void appendFlattenable(SkString* str, const SkFlattenable* ptr,
const char name[]) {
if (ptr) {
SkString info;
if (ptr->toDumpString(&info)) {
str->appendf("%s", info.c_str());
} else {
str->appendf("%s: %p", name, ptr);
}
}
}
static SkString dumpMatrix(SkDumpCanvasM* canvas) {
SkString str;
SkMatrix m = canvas->getTotalMatrix();
str.appendf("Matrix:");
str.appendf("Translate (%0.4g, %0.4g) ",
SkScalarToFloat(m.get(SkMatrix::kMTransX)),
SkScalarToFloat(m.get(SkMatrix::kMTransY)));
str.appendf("Scale (%0.4g, %0.4g) ",
SkScalarToFloat(m.get(SkMatrix::kMScaleX)),
SkScalarToFloat(m.get(SkMatrix::kMScaleY)));
str.appendf("Skew (%0.4g, %0.4g) ",
SkScalarToFloat(m.get(SkMatrix::kMSkewX)),
SkScalarToFloat(m.get(SkMatrix::kMSkewY)));
str.appendf("Perspective (%0.4g, %0.4g, %0.4g) ",
SkScalarToFloat(m.get(SkMatrix::kMPersp0)),
SkScalarToFloat(m.get(SkMatrix::kMPersp1)),
SkScalarToFloat(m.get(SkMatrix::kMPersp2)));
return str;
}
static SkString dumpClip(SkDumpCanvasM* canvas) {
SkString str;
SkPath p;
int maxPts = 50;
if (canvas->getTotalClip().getBoundaryPath(&p)) {
SkPoint pts[maxPts];
int numPts = p.getPoints(pts, maxPts);
str.appendf("Clip: [ ");
for (int i = 0; i < numPts; ++i) {
str.appendf("(%0.4g, %0.4g)", pts[i].x(), pts[i].y());
if (i < numPts-1)
str.appendf(" , ");
}
str.appendf(" ]");
}
return str;
}
static const char* gPaintFlags[] = {
"AntiAliasing",
"Bitmap Filtering",
"Dithering",
"Underline Text",
"Strike-Through Text",
"Fake Bold Text",
"Linear Text",
"Subpixel Positioned Text",
"Device Kerning Text",
"LCD/Subpixel Glyph Rendering",
"Embedded Bitmap Text",
"Freetype Autohinting",
"ALL"
};
static SkString dumpPaint(SkDumpCanvasM* canvas, const SkPaint* p,
SkDumpCanvasM::Verb verb) {
SkString str;
str.appendf("Color: #%08X\n", p->getColor());
str.appendf("Flags: %s\n", gPaintFlags[p->getFlags()]);
appendFlattenable(&str, p->getShader(), "shader");
appendFlattenable(&str, p->getXfermode(), "xfermode");
appendFlattenable(&str, p->getPathEffect(), "pathEffect");
appendFlattenable(&str, p->getMaskFilter(), "maskFilter");
appendFlattenable(&str, p->getPathEffect(), "pathEffect");
appendFlattenable(&str, p->getColorFilter(), "filter");
if (SkDumpCanvasM::kDrawText_Verb == verb) {
str.appendf("Text Size:%0.4g\n", SkScalarToFloat(p->getTextSize()));
appendPtr(&str, p->getTypeface(), "typeface");
}
return str;
}
void SkDebugDumper::dump(SkDumpCanvasM* canvas, SkDumpCanvasM::Verb verb,
const char str[], const SkPaint* p) {
if (!fDisabled) {
SkString msg, tab;
const int level = canvas->getNestLevel() + canvas->getSaveCount() - 1;
SkASSERT(level >= 0);
for (int i = 0; i < level; i++) {
tab.append("| ");
}
msg.appendf("%03d: %s%s\n", fCount, tab.c_str(), str);
++fCount;
if (!fInit) {
SkEvent* cmd = new SkEvent(SkDebugger_CommandType);
cmd->setString(SkDebugger_Atom, msg);
cmd->post(fCommandListID, 100);
}
else {
SkEvent* state = new SkEvent(SkDebugger_StateType);
state->setString(SkDebugger_Matrix, dumpMatrix(canvas));
state->setString(SkDebugger_Clip, dumpClip(canvas));
if (p) {
state->setString(SkDebugger_PaintInfo, dumpPaint(canvas, p, verb));
state->getMetaData().setPtr(SkDebugger_Paint, (void*)p, PaintProc);
}
state->post(fInfoPanelID);
}
}
}

Просмотреть файл

@ -0,0 +1,34 @@
#ifndef SkDebugDumper_DEFINED
#define SkDebugDumper_DEFINED
#include "SkDumpCanvasM.h"
#include "SkEvent.h"
class CommandListView;
class InfoPanelView;
class ContentView;
/** Formats the draw commands, and send them to a function-pointer provided
by the caller.
*/
class SkDebugDumper : public SkDumpCanvasM::Dumper {
public:
SkDebugDumper(SkEventSinkID cID, SkEventSinkID clID, SkEventSinkID ipID);
// override from baseclass that does the formatting, and in turn calls
// the function pointer that was passed to the constructor
virtual void dump(SkDumpCanvasM*, SkDumpCanvasM::Verb, const char str[],
const SkPaint*);
void load() { fInit = true; };
void unload() { fInit = false; fCount = 0;};
void disable() { fDisabled = true; };
void enable() { fDisabled = false; };
private:
int fCount;
bool fInit;
bool fDisabled;
SkEventSinkID fContentID;
SkEventSinkID fCommandListID;
SkEventSinkID fInfoPanelID;
typedef SkDumpCanvasM::Dumper INHERITED;
};
#endif

Просмотреть файл

@ -0,0 +1,15 @@
#import "SkNSWindow.h"
#import "SkDebuggerViews.h"
@interface SkDebugger : SkNSWindow {
IBOutlet SkNSView* fCommandView;
IBOutlet SkNSView* fContentView;
IBOutlet SkNSView* fInfoView;
SkCommandListView* fCommand;
SkContentView* fContent;
SkInfoPanelView* fInfo;
}
- (void)loadFile:(NSString *)filename;
@end

Просмотреть файл

@ -0,0 +1,154 @@
#import "SkDebugger.h"
@implementation SkDebugger
-(void) installSkViews {
float width = [self frame].size.width;
float height = [self frame].size.height;
float commandListW = 200;
float infoPanelH = 150.0;
fCommand = new SkCommandListView;
fCommand->setSize(commandListW, height);
fCommand->setVisibleP(true);
fInfo = new SkInfoPanelView;
fInfo->setSize(width - commandListW, infoPanelH);
fInfo->setVisibleP(true);
fContent = new SkContentView(fCommand->getSinkID(),
fInfo->getSinkID());
fContent->setSize(width - commandListW, height - infoPanelH);
fContent->setVisibleP(true);
[fInfoView addSkView:fInfo];
[fCommandView addSkView:fCommand];
[fContentView addSkView:fContent];
fInfo->unref();
fCommand->unref();
fContent->unref();
}
- (void)loadFile:(NSString *)filename {
fCommand->reinit();
fContent->reinit([filename UTF8String]);
}
- (void)keyDown:(NSEvent *)event {
// arrow keys have this mask
if ([event modifierFlags] & NSNumericPadKeyMask) {
NSString *theArrow = [event charactersIgnoringModifiers];
if ( [theArrow length] == 0 )
return; // reject dead keys
if ( [theArrow length] == 1 ) {
switch ([theArrow characterAtIndex:0]) {
case NSLeftArrowFunctionKey:
fContent->goToAtom(fCommand->prevItem());
break;
case NSRightArrowFunctionKey:
fContent->goToAtom(fCommand->nextItem());
break;
case NSUpArrowFunctionKey:
fContent->goToAtom(fCommand->scrollUp());
break;
case NSDownArrowFunctionKey:
fContent->goToAtom(fCommand->scrollDown());
break;
default:
[super keyDown:event];
}
return;
}
}
else {//normal keys
switch ([[event characters] characterAtIndex:0]) {
case 'c':
fContent->toggleClip();
break;
case 'e':
fCommand->toggleCentered();
break;
default:
[super keyDown:event];
}
return;
}
[super keyDown:event];
}
- (void)mouseDown:(NSEvent *)event {
if ([event clickCount] > 1) {
[fContentView resetTransformations];
[fContentView setNeedsDisplay:YES];
}
else {
NSPoint p = [event locationInWindow];
NSRect commandRect = [fCommandView convertRectToBase:[fCommandView bounds]];
if ([fCommandView mouse:p inRect:commandRect]) {
NSPoint mouseLocInView = [fCommandView convertPoint:p fromView:nil];
fContent->goToAtom(fCommand->selectHighlight(mouseLocInView.y));
}
}
[super mouseDown:event];
}
- (void)mouseDragged:(NSEvent *)event {
NSPoint p = [event locationInWindow];
NSRect contentRect = [fContentView convertRectToBase:[fContentView bounds]];
NSRect commandRect = [fCommandView convertRectToBase:[fCommandView bounds]];
if ([fContentView mouse:p inRect:contentRect]) {
fContentView.offset = NSMakePoint(fContentView.offset.x + [event deltaX],
fContentView.offset.y + [event deltaY]);
[fContentView setNeedsDisplay:YES];
}
[super mouseDragged:event];
}
- (void)magnifyWithEvent:(NSEvent *)event {
if ([fContentView mouse:[event locationInWindow]
inRect:[fContentView convertRectToBase:[fContentView bounds]]]) {
fContentView.center = [fContentView convertPoint:[event locationInWindow]
fromView:nil];
fContentView.scale = fContentView.scale * ([event magnification] + 1.0);
[fContentView setNeedsDisplay:YES];
}
[super magnifyWithEvent:event];
}
- (void)rotateWithEvent:(NSEvent *)event {
if ([fContentView mouse:[event locationInWindow]
inRect:[fContentView convertRectToBase:[fContentView bounds]]]) {
fContentView.center = [fContentView convertPoint:[event locationInWindow]
fromView:nil];
fContentView.rotation = fContentView.rotation - [event rotation];
[fContentView setNeedsDisplay:YES];
}
[super rotateWithEvent:event];
}
- (void)scrollWheel:(NSEvent *)event {
NSPoint p = [event locationInWindow];
NSRect contentRect = [fContentView convertRectToBase:[fContentView bounds]];
NSRect commandRect = [fCommandView convertRectToBase:[fCommandView bounds]];
if ([fContentView mouse:p inRect:contentRect]) {
fContentView.center = [fContentView convertPoint:[event locationInWindow]
fromView:nil];
if ([event deltaY] > 0) {
fContentView.scale = fContentView.scale * (1.05);
}
if ([event deltaY] < 0) {
fContentView.scale = fContentView.scale * (0.95);
}
[fContentView setNeedsDisplay:YES];
}
if ([fCommandView mouse:p inRect:commandRect]) {
if ([event deltaY] > 0) {
fContent->goToAtom(fCommand->scrollUp());
}
if ([event deltaY] < 0) {
fContent->goToAtom(fCommand->scrollDown());
}
}
[super scrollWheel:event];
}
@end

Просмотреть файл

@ -0,0 +1,114 @@
#include "SkView.h"
#include "SkColor.h"
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkGPipe.h"
#include "SkPaint.h"
#include "SkDebugDumper.h"
#include <deque>
#define SkDebugger_TextSize 14
#define SkDebugger_CommandType "SkDebugger_Command"
#define SkDebugger_StateType "SkDebugger_State"
#define SkDebugger_Atom "SkDebugger_Atom"
#define SkDebugger_Matrix "SkDebugger_Matrix"
#define SkDebugger_Clip "SkDebugger_Clip"
#define SkDebugger_PaintInfo "SkDebugger_PaintInfo"
#define SkDebugger_Paint "SkDebugger_Paint"
/*
* Debugger - Main Content
*/
class SkContentView : public SkView {
public:
SkContentView(SkEventSinkID clID, SkEventSinkID ipID);
~SkContentView();
void init();
void reinit(const char* fileName);
void toggleClip();
void goToAtom(int atom);
protected:
virtual bool onEvent(const SkEvent& evt);
virtual void onDraw(SkCanvas* canvas);
private:
SkColor fBGColor;
int fAtomsToRead;
std::deque<int> fAtomBounds;
std::deque<int> fFrameBounds;
bool fDisplayClip;
SkString fFilePath;
SkDebugDumper fDumper;
typedef SkView INHERITED;
};
/*
* Debugger - Info Panel
*/
class SkInfoPanelView : public SkView {
public:
SkInfoPanelView();
protected:
virtual bool onEvent(const SkEvent& evt);
virtual void onDraw(SkCanvas* canvas);
private:
SkColor fBGColor;
SkPaint fPaint;
SkString fMatrix;
SkString fPaintInfo;
SkString fClip;
typedef SkView INHERITED;
};
/*
* Debugger - Commands List
*/
class SkCommandListView : public SkView {
public:
SkCommandListView();
void reinit();
int nextItem();
int prevItem();
int scrollUp();
int scrollDown();
void highlight(int index);
int selectHighlight(int ypos);
void toggleCentered();
protected:
virtual bool onEvent(const SkEvent& evt);
virtual void onSizeChange();
virtual void onDraw(SkCanvas* canvas);
private:
void init();
void alignCenter();
SkColor fBGColor;
int fTopIndex;
int fHighlight;
SkScalar fSpacing;
int fRange;
bool fCentered;
std::deque<SkString> fList;
typedef SkView INHERITED;
};
static void* PaintProc(void* ptr, bool doRef) {
SkPaint* p = (SkPaint*) ptr;
if (doRef) {
return new SkPaint(*p);
}
else {
delete p;
return NULL;
}
}

Просмотреть файл

@ -0,0 +1,386 @@
#include "SkDumpCanvasM.h"
#include "SkPicture.h"
#include "SkPixelRef.h"
#include "SkString.h"
#include <stdarg.h>
// needed just to know that these are all subclassed from SkFlattenable
#include "SkShader.h"
#include "SkPathEffect.h"
#include "SkXfermode.h"
#include "SkColorFilter.h"
#include "SkPathEffect.h"
#include "SkMaskFilter.h"
#include "SkEvent.h"
static void toString(const SkRect& r, SkString* str) {
str->printf("[%g,%g %g:%g]",
SkScalarToFloat(r.fLeft), SkScalarToFloat(r.fTop),
SkScalarToFloat(r.width()), SkScalarToFloat(r.height()));
}
static void toString(const SkIRect& r, SkString* str) {
str->printf("[%d,%d %d:%d]", r.fLeft, r.fTop, r.width(), r.height());
}
static void dumpVerbs(const SkPath& path, SkString* str) {
SkPath::Iter iter(path, false);
SkPoint pts[4];
for (;;) {
switch (iter.next(pts)) {
case SkPath::kMove_Verb:
str->appendf(" M%g,%g", pts[0].fX, pts[0].fY);
break;
case SkPath::kLine_Verb:
str->appendf(" L%g,%g", pts[0].fX, pts[0].fY);
break;
case SkPath::kQuad_Verb:
str->appendf(" Q%g,%g,%g,%g", pts[1].fX, pts[1].fY,
pts[2].fX, pts[2].fY);
break;
case SkPath::kCubic_Verb:
str->appendf(" C%g,%g,%g,%g,%g,%g", pts[1].fX, pts[1].fY,
pts[2].fX, pts[2].fY, pts[3].fX, pts[3].fY);
break;
case SkPath::kClose_Verb:
str->appendf("X");
break;
case SkPath::kDone_Verb:
return;
}
}
}
static void toString(const SkPath& path, SkString* str) {
if (path.isEmpty()) {
str->set("path:empty");
} else {
toString(path.getBounds(), str);
#if 1
SkString s;
dumpVerbs(path, &s);
str->append(s.c_str());
#endif
str->append("]");
str->prepend("path:[");
}
}
static const char* toString(SkRegion::Op op) {
static const char* gOpNames[] = {
"DIFF", "SECT", "UNION", "XOR", "RDIFF", "REPLACE"
};
return gOpNames[op];
}
static void toString(const SkRegion& rgn, SkString* str) {
toString(rgn.getBounds(), str);
str->prepend("Region:[");
str->append("]");
if (rgn.isComplex()) {
str->append(".complex");
}
}
static const char* toString(SkCanvas::VertexMode vm) {
static const char* gVMNames[] = {
"TRIANGLES", "STRIP", "FAN"
};
return gVMNames[vm];
}
static const char* toString(SkCanvas::PointMode pm) {
static const char* gPMNames[] = {
"POINTS", "LINES", "POLYGON"
};
return gPMNames[pm];
}
static const char* toString(SkBitmap::Config config) {
static const char* gConfigNames[] = {
"NONE", "A1", "A8", "INDEX8", "565", "4444", "8888", "RLE"
};
return gConfigNames[config];
}
static void toString(const SkBitmap& bm, SkString* str) {
str->printf("bitmap:[%d %d] %s", bm.width(), bm.height(),
toString(bm.config()));
SkPixelRef* pr = bm.pixelRef();
if (NULL == pr) {
// show null or the explicit pixel address (rare)
str->appendf(" pixels:%p", bm.getPixels());
} else {
const char* uri = pr->getURI();
if (uri) {
str->appendf(" uri:\"%s\"", uri);
} else {
str->appendf(" pixelref:%p", pr);
}
}
}
static void toString(const void* text, size_t len, SkPaint::TextEncoding enc,
SkString* str) {
switch (enc) {
case SkPaint::kUTF8_TextEncoding:
str->printf("\"%.*s\"%s", SkMax32(len, 32), text,
len > 32 ? "..." : "");
break;
case SkPaint::kUTF16_TextEncoding:
str->printf("\"%.*S\"%s", SkMax32(len, 32), text,
len > 64 ? "..." : "");
break;
case SkPaint::kGlyphID_TextEncoding:
str->set("<glyphs>");
break;
}
}
///////////////////////////////////////////////////////////////////////////////
SkDumpCanvasM::SkDumpCanvasM(Dumper* dumper) : fNestLevel(0) {
SkSafeRef(dumper);
fDumper = dumper;
static const int WIDE_OPEN = 16384;
SkBitmap emptyBitmap;
emptyBitmap.setConfig(SkBitmap::kNo_Config, WIDE_OPEN, WIDE_OPEN);
this->setBitmapDevice(emptyBitmap);
}
SkDumpCanvasM::~SkDumpCanvasM() {
SkSafeUnref(fDumper);
}
void SkDumpCanvasM::dump(Verb verb, const SkPaint* paint,
const char format[], ...) {
static const size_t BUFFER_SIZE = 1024;
char buffer[BUFFER_SIZE];
va_list args;
va_start(args, format);
vsnprintf(buffer, BUFFER_SIZE, format, args);
va_end(args);
if (fDumper) {
fDumper->dump(this, verb, buffer, paint);
}
}
///////////////////////////////////////////////////////////////////////////////
int SkDumpCanvasM::save(SaveFlags flags) {
this->dump(kSave_Verb, NULL, "save(0x%X)", flags);
return this->INHERITED::save(flags);
}
int SkDumpCanvasM::saveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags flags) {
this->dump(kSave_Verb, paint, "saveLayer(0x%X)", flags);
return this->INHERITED::saveLayer(bounds, paint, flags);
}
void SkDumpCanvasM::restore() {
this->INHERITED::restore();
this->dump(kRestore_Verb, NULL, "restore");
}
bool SkDumpCanvasM::translate(SkScalar dx, SkScalar dy) {
this->dump(kMatrix_Verb, NULL, "translate(%g %g)",
SkScalarToFloat(dx), SkScalarToFloat(dy));
return this->INHERITED::translate(dx, dy);
}
bool SkDumpCanvasM::scale(SkScalar sx, SkScalar sy) {
this->dump(kMatrix_Verb, NULL, "scale(%g %g)",
SkScalarToFloat(sx), SkScalarToFloat(sy));
return this->INHERITED::scale(sx, sy);
}
bool SkDumpCanvasM::rotate(SkScalar degrees) {
this->dump(kMatrix_Verb, NULL, "rotate(%g)", SkScalarToFloat(degrees));
return this->INHERITED::rotate(degrees);
}
bool SkDumpCanvasM::skew(SkScalar sx, SkScalar sy) {
this->dump(kMatrix_Verb, NULL, "skew(%g %g)",
SkScalarToFloat(sx), SkScalarToFloat(sy));
return this->INHERITED::skew(sx, sy);
}
bool SkDumpCanvasM::concat(const SkMatrix& matrix) {
SkString str;
matrix.toDumpString(&str);
this->dump(kMatrix_Verb, NULL, "concat(%s)", str.c_str());
return this->INHERITED::concat(matrix);
}
void SkDumpCanvasM::setMatrix(const SkMatrix& matrix) {
SkString str;
matrix.toDumpString(&str);
this->dump(kMatrix_Verb, NULL, "setMatrix(%s)", str.c_str());
this->INHERITED::setMatrix(matrix);
}
///////////////////////////////////////////////////////////////////////////////
bool SkDumpCanvasM::clipRect(const SkRect& rect, SkRegion::Op op) {
SkString str;
toString(rect, &str);
this->dump(kClip_Verb, NULL, "clipRect(%s %s)", str.c_str(), toString(op));
return this->INHERITED::clipRect(rect, op);
}
bool SkDumpCanvasM::clipPath(const SkPath& path, SkRegion::Op op) {
SkString str;
toString(path, &str);
this->dump(kClip_Verb, NULL, "clipPath(%s %s)", str.c_str(), toString(op));
return this->INHERITED::clipPath(path, op);
}
bool SkDumpCanvasM::clipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
SkString str;
toString(deviceRgn, &str);
this->dump(kClip_Verb, NULL, "clipRegion(%s %s)", str.c_str(),
toString(op));
return this->INHERITED::clipRegion(deviceRgn, op);
}
///////////////////////////////////////////////////////////////////////////////
void SkDumpCanvasM::drawPaint(const SkPaint& paint) {
this->dump(kDrawPaint_Verb, &paint, "drawPaint()");
}
void SkDumpCanvasM::drawPoints(PointMode mode, size_t count,
const SkPoint pts[], const SkPaint& paint) {
this->dump(kDrawPoints_Verb, &paint, "drawPoints(%s, %d)", toString(mode),
count);
}
void SkDumpCanvasM::drawRect(const SkRect& rect, const SkPaint& paint) {
SkString str;
toString(rect, &str);
this->dump(kDrawRect_Verb, &paint, "drawRect(%s)", str.c_str());
}
void SkDumpCanvasM::drawPath(const SkPath& path, const SkPaint& paint) {
SkString str;
toString(path, &str);
this->dump(kDrawPath_Verb, &paint, "drawPath(%s)", str.c_str());
}
void SkDumpCanvasM::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
const SkPaint* paint) {
SkString str;
toString(bitmap, &str);
this->dump(kDrawBitmap_Verb, paint, "drawBitmap(%s %g %g)", str.c_str(),
SkScalarToFloat(x), SkScalarToFloat(y));
}
void SkDumpCanvasM::drawBitmapRect(const SkBitmap& bitmap, const SkIRect* src,
const SkRect& dst, const SkPaint* paint) {
SkString bs, rs;
toString(bitmap, &bs);
toString(dst, &rs);
// show the src-rect only if its not everything
if (src && (src->fLeft > 0 || src->fTop > 0 ||
src->fRight < bitmap.width() ||
src->fBottom < bitmap.height())) {
SkString ss;
toString(*src, &ss);
rs.prependf("%s ", ss.c_str());
}
this->dump(kDrawBitmap_Verb, paint, "drawBitmapRect(%s %s)",
bs.c_str(), rs.c_str());
}
void SkDumpCanvasM::drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
const SkPaint* paint) {
SkString bs, ms;
toString(bitmap, &bs);
m.toDumpString(&ms);
this->dump(kDrawBitmap_Verb, paint, "drawBitmapMatrix(%s %s)",
bs.c_str(), ms.c_str());
}
void SkDumpCanvasM::drawSprite(const SkBitmap& bitmap, int x, int y,
const SkPaint* paint) {
SkString str;
toString(bitmap, &str);
this->dump(kDrawBitmap_Verb, paint, "drawSprite(%s %d %d)", str.c_str(),
x, y);
}
void SkDumpCanvasM::drawText(const void* text, size_t byteLength, SkScalar x,
SkScalar y, const SkPaint& paint) {
SkString str;
toString(text, byteLength, paint.getTextEncoding(), &str);
this->dump(kDrawText_Verb, &paint, "drawText(%s [%d] %g %g)", str.c_str(),
byteLength, SkScalarToFloat(x), SkScalarToFloat(y));
}
void SkDumpCanvasM::drawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint& paint) {
SkString str;
toString(text, byteLength, paint.getTextEncoding(), &str);
this->dump(kDrawText_Verb, &paint, "drawPosText(%s [%d] %g %g ...)",
str.c_str(), byteLength, SkScalarToFloat(pos[0].fX),
SkScalarToFloat(pos[0].fY));
}
void SkDumpCanvasM::drawPosTextH(const void* text, size_t byteLength,
const SkScalar xpos[], SkScalar constY,
const SkPaint& paint) {
SkString str;
toString(text, byteLength, paint.getTextEncoding(), &str);
this->dump(kDrawText_Verb, &paint, "drawPosTextH(%s [%d] %g %g ...)",
str.c_str(), byteLength, SkScalarToFloat(xpos[0]),
SkScalarToFloat(constY));
}
void SkDumpCanvasM::drawTextOnPath(const void* text, size_t byteLength,
const SkPath& path, const SkMatrix* matrix,
const SkPaint& paint) {
SkString str;
toString(text, byteLength, paint.getTextEncoding(), &str);
this->dump(kDrawText_Verb, &paint, "drawTextOnPath(%s [%d])",
str.c_str(), byteLength);
}
void SkDumpCanvasM::drawShape(SkShape* shape) {
this->dump(kDrawShape_Verb, NULL, "drawShape(%p)", shape);
fNestLevel += 1;
this->INHERITED::drawShape(shape);
fNestLevel -= 1;
this->dump(kDrawShape_Verb, NULL, "endShape(%p)", shape);
}
void SkDumpCanvasM::drawPicture(SkPicture& picture) {
this->dump(kDrawPicture_Verb, NULL, "drawPicture(%p) %d:%d", &picture,
picture.width(), picture.height());
fNestLevel += 1;
this->INHERITED::drawPicture(picture);
fNestLevel -= 1;
this->dump(kDrawPicture_Verb, NULL, "endPicture(%p) %d:%d", &picture,
picture.width(), picture.height());
}
void SkDumpCanvasM::drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint) {
this->dump(kDrawVertices_Verb, &paint, "drawVertices(%s [%d] %g %g ...)",
toString(vmode), vertexCount, SkScalarToFloat(vertices[0].fX),
SkScalarToFloat(vertices[0].fY));
}
void SkDumpCanvasM::drawData(const void* data, size_t length) {
// this->dump(kDrawData_Verb, NULL, "drawData(%d)", length);
this->dump(kDrawData_Verb, NULL, "drawData(%d) %.*s", length,
SkMin32(length, 64), data);
}

Просмотреть файл

@ -0,0 +1,117 @@
#ifndef SkDumpCanvasM_DEFINED
#define SkDumpCanvasM_DEFINED
#include "SkCanvas.h"
/** This class overrides all the draw methods on SkCanvas, and formats them
as text, and then sends that to a Dumper helper object.
Typical use might be to dump a display list to a log file to see what is
being drawn.
*/
class SkDumpCanvasM : public SkCanvas {
public:
class Dumper;
explicit SkDumpCanvasM(Dumper* = 0);
virtual ~SkDumpCanvasM();
enum Verb {
kNULL_Verb,
kSave_Verb,
kRestore_Verb,
kMatrix_Verb,
kClip_Verb,
kDrawPaint_Verb,
kDrawPoints_Verb,
kDrawRect_Verb,
kDrawPath_Verb,
kDrawBitmap_Verb,
kDrawText_Verb,
kDrawPicture_Verb,
kDrawShape_Verb,
kDrawVertices_Verb,
kDrawData_Verb
};
/** Subclasses of this are installed on the DumpCanvas, and then called for
each drawing command.
*/
class Dumper : public SkRefCnt {
public:
virtual void dump(SkDumpCanvasM*, SkDumpCanvasM::Verb, const char str[],
const SkPaint*) = 0;
};
Dumper* getDumper() const { return fDumper; }
void setDumper(Dumper*);
int getNestLevel() const { return fNestLevel; }
// overrides from SkCanvas
virtual int save(SaveFlags flags = kMatrixClip_SaveFlag);
virtual int saveLayer(const SkRect* bounds, const SkPaint* paint,
SaveFlags flags = kARGB_ClipLayer_SaveFlag);
virtual void restore();
virtual bool translate(SkScalar dx, SkScalar dy);
virtual bool scale(SkScalar sx, SkScalar sy);
virtual bool rotate(SkScalar degrees);
virtual bool skew(SkScalar sx, SkScalar sy);
virtual bool concat(const SkMatrix& matrix);
virtual void setMatrix(const SkMatrix& matrix);
virtual bool clipRect(const SkRect& rect,
SkRegion::Op op = SkRegion::kIntersect_Op);
virtual bool clipPath(const SkPath& path,
SkRegion::Op op = SkRegion::kIntersect_Op);
virtual bool clipRegion(const SkRegion& deviceRgn,
SkRegion::Op op = SkRegion::kIntersect_Op);
virtual void drawPaint(const SkPaint& paint);
virtual void drawPoints(PointMode mode, size_t count, const SkPoint pts[],
const SkPaint& paint);
virtual void drawRect(const SkRect& rect, const SkPaint& paint);
virtual void drawPath(const SkPath& path, const SkPaint& paint);
virtual void drawBitmap(const SkBitmap& bitmap, SkScalar left, SkScalar top,
const SkPaint* paint = NULL);
virtual void drawBitmapRect(const SkBitmap& bitmap, const SkIRect* src,
const SkRect& dst, const SkPaint* paint = NULL);
virtual void drawBitmapMatrix(const SkBitmap& bitmap, const SkMatrix& m,
const SkPaint* paint = NULL);
virtual void drawSprite(const SkBitmap& bitmap, int left, int top,
const SkPaint* paint = NULL);
virtual void drawText(const void* text, size_t byteLength, SkScalar x,
SkScalar y, const SkPaint& paint);
virtual void drawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint& paint);
virtual void drawPosTextH(const void* text, size_t byteLength,
const SkScalar xpos[], SkScalar constY,
const SkPaint& paint);
virtual void drawTextOnPath(const void* text, size_t byteLength,
const SkPath& path, const SkMatrix* matrix,
const SkPaint& paint);
virtual void drawPicture(SkPicture&);
virtual void drawShape(SkShape*);
virtual void drawVertices(VertexMode vmode, int vertexCount,
const SkPoint vertices[], const SkPoint texs[],
const SkColor colors[], SkXfermode* xmode,
const uint16_t indices[], int indexCount,
const SkPaint& paint);
virtual void drawData(const void*, size_t);
private:
Dumper* fDumper;
int fNestLevel; // for nesting recursive elements like pictures
void dump(Verb, const SkPaint*, const char format[], ...);
typedef SkCanvas INHERITED;
};
#endif

Просмотреть файл

@ -0,0 +1,41 @@
#include "SkDebuggerViews.h"
#include "SkRect.h"
SkInfoPanelView::SkInfoPanelView() {
fBGColor = 0xFF999999;
fPaint.setColor(fBGColor);
}
bool SkInfoPanelView::onEvent(const SkEvent& evt) {
if (evt.isType(SkDebugger_StateType)) {
fMatrix = evt.findString(SkDebugger_Matrix);
fClip = evt.findString(SkDebugger_Clip);
SkPaint* ptr;
if (evt.getMetaData().findPtr(SkDebugger_Paint, (void**)&ptr)) {
fPaint = *ptr;
fPaintInfo = evt.findString(SkDebugger_PaintInfo);
}
this->inval(NULL);
return true;
}
return this->INHERITED::onEvent(evt);
}
void SkInfoPanelView::onDraw(SkCanvas* canvas) {
canvas->drawColor(fBGColor);
//Display Current Paint
SkRect r = {10, 20, 40, 50};
canvas->drawRect(r, fPaint);
//Display Information
SkPaint p;
p.setTextSize(SkDebugger_TextSize);
p.setAntiAlias(true);
int x = 50;
canvas->drawText(fPaintInfo.c_str(), fPaintInfo.size(), x, 30, p);
canvas->drawText(fMatrix.c_str(), fMatrix.size(), x, 60, p);
canvas->drawText(fClip.c_str(), fClip.size(), x, 90, p);
this->INHERITED::onDraw(canvas);
}

Просмотреть файл

@ -0,0 +1,7 @@
#import <Cocoa/Cocoa.h>
#import "SkDebugger.h"
@interface SkMenuController : NSObject {
IBOutlet SkDebugger *fWindow;
}
-(IBAction) openFile:(id) sender;
@end

Просмотреть файл

@ -0,0 +1,16 @@
#import "SkMenuController.h"
@implementation SkMenuController
-(IBAction) openFile:(id) sender {
NSOpenPanel* panel = [NSOpenPanel openPanel];
NSInteger response = [panel runModal];
[panel setFloatingPanel:YES];
[panel setCanChooseDirectories:NO];
[panel setCanChooseFiles:YES];
if(response == NSOKButton){
[fWindow loadFile:[panel filename]];
}
}
@end

Просмотреть файл

@ -0,0 +1,14 @@
//
// main.m
// CocoaSampleApp
//
// Created by Yang Su on 6/14/11.
// Copyright 2011 Google Inc. All rights reserved.
//
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}

Просмотреть файл

@ -1,513 +0,0 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
265A019913A93DCE0010128A /* SimpleCocoaAppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 265A019813A93DCE0010128A /* SimpleCocoaAppDelegate.mm */; };
26828B1613A8032000B4B75E /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97324FDCFA39411CA2CEA /* AppKit.framework */; };
26828B1713A8032200B4B75E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 29B97325FDCFA39411CA2CEA /* Foundation.framework */; };
26828B1913A8032D00B4B75E /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26828B1813A8032D00B4B75E /* OpenGL.framework */; };
26828B4C13A803C000B4B75E /* SkNSWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26828B4713A803C000B4B75E /* SkNSWindow.mm */; };
26828B4E13A803C000B4B75E /* SkNSView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26828B4B13A803C000B4B75E /* SkNSView.mm */; };
26828B7013A8053D00B4B75E /* SkEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B6B13A8053D00B4B75E /* SkEvent.cpp */; };
26828B7113A8053D00B4B75E /* SkEventSink.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B6C13A8053D00B4B75E /* SkEventSink.cpp */; };
26828B7213A8053D00B4B75E /* SkTagList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B6D13A8053D00B4B75E /* SkTagList.cpp */; };
26828B7313A8053D00B4B75E /* SkView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B6E13A8053D00B4B75E /* SkView.cpp */; };
26828B7413A8053D00B4B75E /* SkViewPriv.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B6F13A8053D00B4B75E /* SkViewPriv.cpp */; };
26828B7613A8054900B4B75E /* SkCanvas.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B7513A8054900B4B75E /* SkCanvas.cpp */; };
26828B7B13A8055D00B4B75E /* SkDOM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B7913A8055D00B4B75E /* SkDOM.cpp */; };
26828B7C13A8055D00B4B75E /* SkXMLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B7A13A8055D00B4B75E /* SkXMLParser.cpp */; };
26828B7E13A8057000B4B75E /* SkXMLParser_empty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828B7D13A8057000B4B75E /* SkXMLParser_empty.cpp */; };
26828BA613A8059A00B4B75E /* libeffects.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 26828B1513A8031400B4B75E /* libeffects.a */; };
26828BA713A8059C00B4B75E /* libmaccore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 26828B0C13A8030700B4B75E /* libmaccore.a */; };
26828BA813A8059E00B4B75E /* libcore.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 26828B0113A802FC00B4B75E /* libcore.a */; };
26828BAD13A805B200B4B75E /* SkGlobals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26828BAC13A805B200B4B75E /* SkGlobals.cpp */; };
26AE09C913A90D8F00AA2764 /* SampleWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26AE09C813A90D8F00AA2764 /* SampleWindow.mm */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
26828B0013A802FC00B4B75E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828AF913A802FC00B4B75E /* core.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = core;
};
26828B0B13A8030700B4B75E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828B0413A8030700B4B75E /* maccore.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = maccore;
};
26828B1413A8031400B4B75E /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828B0D13A8031400B4B75E /* effects.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = D2AAC046055464E500DB518D;
remoteInfo = effects;
};
26AE072813A8F8D300AA2764 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828B0D13A8031400B4B75E /* effects.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC045055464E500DB518D;
remoteInfo = effects;
};
26AE072A13A8F8D600AA2764 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828AF913A802FC00B4B75E /* core.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC045055464E500DB518D;
remoteInfo = core;
};
26AE072C13A8F8D800AA2764 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 26828B0413A8030700B4B75E /* maccore.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = D2AAC045055464E500DB518D;
remoteInfo = maccore;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
256AC3F00F4B6AF500CF3369 /* SimpleCocoaApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleCocoaApp_Prefix.pch; sourceTree = "<group>"; };
265A019713A93DCE0010128A /* SimpleCocoaAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleCocoaAppDelegate.h; sourceTree = "<group>"; };
265A019813A93DCE0010128A /* SimpleCocoaAppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleCocoaAppDelegate.mm; sourceTree = "<group>"; };
26828AF913A802FC00B4B75E /* core.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = core.xcodeproj; path = ../core/core.xcodeproj; sourceTree = SOURCE_ROOT; };
26828B0413A8030700B4B75E /* maccore.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = maccore.xcodeproj; path = ../maccore/maccore.xcodeproj; sourceTree = SOURCE_ROOT; };
26828B0D13A8031400B4B75E /* effects.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = effects.xcodeproj; path = ../effects/effects.xcodeproj; sourceTree = SOURCE_ROOT; };
26828B1813A8032D00B4B75E /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
26828B4613A803C000B4B75E /* SkNSWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkNSWindow.h; sourceTree = "<group>"; };
26828B4713A803C000B4B75E /* SkNSWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkNSWindow.mm; sourceTree = "<group>"; };
26828B4A13A803C000B4B75E /* SkNSView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkNSView.h; sourceTree = "<group>"; };
26828B4B13A803C000B4B75E /* SkNSView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkNSView.mm; sourceTree = "<group>"; };
26828B6B13A8053D00B4B75E /* SkEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkEvent.cpp; path = ../../src/views/SkEvent.cpp; sourceTree = SOURCE_ROOT; };
26828B6C13A8053D00B4B75E /* SkEventSink.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkEventSink.cpp; path = ../../src/views/SkEventSink.cpp; sourceTree = SOURCE_ROOT; };
26828B6D13A8053D00B4B75E /* SkTagList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkTagList.cpp; path = ../../src/views/SkTagList.cpp; sourceTree = SOURCE_ROOT; };
26828B6E13A8053D00B4B75E /* SkView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkView.cpp; path = ../../src/views/SkView.cpp; sourceTree = SOURCE_ROOT; };
26828B6F13A8053D00B4B75E /* SkViewPriv.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkViewPriv.cpp; path = ../../src/views/SkViewPriv.cpp; sourceTree = SOURCE_ROOT; };
26828B7513A8054900B4B75E /* SkCanvas.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkCanvas.cpp; path = ../../src/core/SkCanvas.cpp; sourceTree = SOURCE_ROOT; };
26828B7913A8055D00B4B75E /* SkDOM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkDOM.cpp; path = ../../src/xml/SkDOM.cpp; sourceTree = SOURCE_ROOT; };
26828B7A13A8055D00B4B75E /* SkXMLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkXMLParser.cpp; path = ../../src/xml/SkXMLParser.cpp; sourceTree = SOURCE_ROOT; };
26828B7D13A8057000B4B75E /* SkXMLParser_empty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkXMLParser_empty.cpp; path = ../../src/ports/SkXMLParser_empty.cpp; sourceTree = SOURCE_ROOT; };
26828BAC13A805B200B4B75E /* SkGlobals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkGlobals.cpp; path = ../../src/core/SkGlobals.cpp; sourceTree = SOURCE_ROOT; };
26AE09C813A90D8F00AA2764 /* SampleWindow.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SampleWindow.mm; sourceTree = "<group>"; };
26AE0A5A13A918D700AA2764 /* SampleWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SampleWindow.h; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
8D1107310486CEB800E47090 /* SimpleCocoaApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "SimpleCocoaApp-Info.plist"; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* SimpleCocoaApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SimpleCocoaApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
26828B1613A8032000B4B75E /* AppKit.framework in Frameworks */,
26828B1713A8032200B4B75E /* Foundation.framework in Frameworks */,
26828B1913A8032D00B4B75E /* OpenGL.framework in Frameworks */,
26828BA613A8059A00B4B75E /* libeffects.a in Frameworks */,
26828BA713A8059C00B4B75E /* libmaccore.a in Frameworks */,
26828BA813A8059E00B4B75E /* libcore.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
265A019713A93DCE0010128A /* SimpleCocoaAppDelegate.h */,
265A019813A93DCE0010128A /* SimpleCocoaAppDelegate.mm */,
26828B4613A803C000B4B75E /* SkNSWindow.h */,
26828B4713A803C000B4B75E /* SkNSWindow.mm */,
26828B4A13A803C000B4B75E /* SkNSView.h */,
26828B4B13A803C000B4B75E /* SkNSView.mm */,
26828B6A13A8051300B4B75E /* Skia Dependencies */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
26828B1813A8032D00B4B75E /* OpenGL.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* SimpleCocoaApp.app */,
);
name = Products;
sourceTree = "<group>";
};
26828AFA13A802FC00B4B75E /* Products */ = {
isa = PBXGroup;
children = (
26828B0113A802FC00B4B75E /* libcore.a */,
);
name = Products;
sourceTree = "<group>";
};
26828B0513A8030700B4B75E /* Products */ = {
isa = PBXGroup;
children = (
26828B0C13A8030700B4B75E /* libmaccore.a */,
);
name = Products;
sourceTree = "<group>";
};
26828B0E13A8031400B4B75E /* Products */ = {
isa = PBXGroup;
children = (
26828B1513A8031400B4B75E /* libeffects.a */,
);
name = Products;
sourceTree = "<group>";
};
26828B6A13A8051300B4B75E /* Skia Dependencies */ = {
isa = PBXGroup;
children = (
26828BAC13A805B200B4B75E /* SkGlobals.cpp */,
26828B7D13A8057000B4B75E /* SkXMLParser_empty.cpp */,
26828B7913A8055D00B4B75E /* SkDOM.cpp */,
26828B7A13A8055D00B4B75E /* SkXMLParser.cpp */,
26828B7513A8054900B4B75E /* SkCanvas.cpp */,
26828B6B13A8053D00B4B75E /* SkEvent.cpp */,
26828B6C13A8053D00B4B75E /* SkEventSink.cpp */,
26828B6D13A8053D00B4B75E /* SkTagList.cpp */,
26828B6E13A8053D00B4B75E /* SkView.cpp */,
26828B6F13A8053D00B4B75E /* SkViewPriv.cpp */,
);
name = "Skia Dependencies";
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* CocoaSampleApp */ = {
isa = PBXGroup;
children = (
26AE0A5A13A918D700AA2764 /* SampleWindow.h */,
26AE09C813A90D8F00AA2764 /* SampleWindow.mm */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = CocoaSampleApp;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
256AC3F00F4B6AF500CF3369 /* SimpleCocoaApp_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D1107310486CEB800E47090 /* SimpleCocoaApp-Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
26828B0D13A8031400B4B75E /* effects.xcodeproj */,
26828B0413A8030700B4B75E /* maccore.xcodeproj */,
26828AF913A802FC00B4B75E /* core.xcodeproj */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* SimpleCocoaApp */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleCocoaApp" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
);
buildRules = (
);
dependencies = (
26AE072913A8F8D300AA2764 /* PBXTargetDependency */,
26AE072B13A8F8D600AA2764 /* PBXTargetDependency */,
26AE072D13A8F8D800AA2764 /* PBXTargetDependency */,
);
name = SimpleCocoaApp;
productInstallPath = "$(HOME)/Applications";
productName = CocoaSampleApp;
productReference = 8D1107320486CEB800E47090 /* SimpleCocoaApp.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleCocoaApp" */;
compatibilityVersion = "Xcode 3.1";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* CocoaSampleApp */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 26828AFA13A802FC00B4B75E /* Products */;
ProjectRef = 26828AF913A802FC00B4B75E /* core.xcodeproj */;
},
{
ProductGroup = 26828B0E13A8031400B4B75E /* Products */;
ProjectRef = 26828B0D13A8031400B4B75E /* effects.xcodeproj */;
},
{
ProductGroup = 26828B0513A8030700B4B75E /* Products */;
ProjectRef = 26828B0413A8030700B4B75E /* maccore.xcodeproj */;
},
);
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* SimpleCocoaApp */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
26828B0113A802FC00B4B75E /* libcore.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libcore.a;
remoteRef = 26828B0013A802FC00B4B75E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
26828B0C13A8030700B4B75E /* libmaccore.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libmaccore.a;
remoteRef = 26828B0B13A8030700B4B75E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
26828B1513A8031400B4B75E /* libeffects.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
path = libeffects.a;
remoteRef = 26828B1413A8031400B4B75E /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
26828B4C13A803C000B4B75E /* SkNSWindow.mm in Sources */,
26828B4E13A803C000B4B75E /* SkNSView.mm in Sources */,
26828B7013A8053D00B4B75E /* SkEvent.cpp in Sources */,
26828B7113A8053D00B4B75E /* SkEventSink.cpp in Sources */,
26828B7213A8053D00B4B75E /* SkTagList.cpp in Sources */,
26828B7313A8053D00B4B75E /* SkView.cpp in Sources */,
26828B7413A8053D00B4B75E /* SkViewPriv.cpp in Sources */,
26828B7613A8054900B4B75E /* SkCanvas.cpp in Sources */,
26828B7B13A8055D00B4B75E /* SkDOM.cpp in Sources */,
26828B7C13A8055D00B4B75E /* SkXMLParser.cpp in Sources */,
26828B7E13A8057000B4B75E /* SkXMLParser_empty.cpp in Sources */,
26828BAD13A805B200B4B75E /* SkGlobals.cpp in Sources */,
26AE09C913A90D8F00AA2764 /* SampleWindow.mm in Sources */,
265A019913A93DCE0010128A /* SimpleCocoaAppDelegate.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
26AE072913A8F8D300AA2764 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = effects;
targetProxy = 26AE072813A8F8D300AA2764 /* PBXContainerItemProxy */;
};
26AE072B13A8F8D600AA2764 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = core;
targetProxy = 26AE072A13A8F8D600AA2764 /* PBXContainerItemProxy */;
};
26AE072D13A8F8D800AA2764 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = maccore;
targetProxy = 26AE072C13A8F8D800AA2764 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
1DDD58150DA1D0A300B32029 /* English */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SimpleCocoaApp_Prefix.pch;
INFOPLIST_FILE = "SimpleCocoaApp-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = SimpleCocoaApp;
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SimpleCocoaApp_Prefix.pch;
INFOPLIST_FILE = "SimpleCocoaApp-Info.plist";
INSTALL_PATH = "$(HOME)/Applications";
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = SimpleCocoaApp;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
SK_BUILD_FOR_MAC,
SK_RELEASE,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
USER_HEADER_SEARCH_PATHS = "../../include/**";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_PREPROCESSOR_DEFINITIONS = (
SK_BUILD_FOR_MAC,
SK_RELEASE,
);
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.6;
USER_HEADER_SEARCH_PATHS = "../../include/**";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "SimpleCocoaApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SimpleCocoaApp" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

Просмотреть файл

@ -1,7 +1,7 @@
#import "SkView.h"
#import "SkMatrix.h"
#import "SkCanvas.h"
#import <AppKit/AppKit.h>
class SkNSContainerView : public SkView {
public:
SkNSContainerView(NSView* parent){