Updated iOSSampleApp to display FPS and display in OpenGL
git-svn-id: http://skia.googlecode.com/svn/trunk@1879 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
1b2d6cc94d
commit
c5aeccd8ba
356
experimental/SkSockets.cpp
Normal file
356
experimental/SkSockets.cpp
Normal file
@ -0,0 +1,356 @@
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include "SkSockets.h"
|
||||
#include "SkData.h"
|
||||
|
||||
SkSocket::SkSocket() {
|
||||
fMaxfd = 0;
|
||||
FD_ZERO(&fMasterSet);
|
||||
fConnected = false;
|
||||
fReady = false;
|
||||
fReadSuspended = false;
|
||||
fWriteSuspended = false;
|
||||
fSockfd = this->createSocket();
|
||||
fTimeout.tv_sec = 0;
|
||||
fTimeout.tv_usec = 0;
|
||||
}
|
||||
|
||||
SkSocket::~SkSocket() {
|
||||
this->closeSocket(fSockfd);
|
||||
}
|
||||
|
||||
int SkSocket::createSocket() {
|
||||
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
||||
if (sockfd < 0) {
|
||||
//SkDebugf("ERROR opening socket\n");
|
||||
return -1;
|
||||
}
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
this->setNonBlocking(sockfd);
|
||||
#endif
|
||||
//SkDebugf("Opened fd:%d\n", sockfd);
|
||||
fReady = true;
|
||||
return sockfd;
|
||||
}
|
||||
|
||||
void SkSocket::closeSocket(int sockfd) {
|
||||
if (!fReady)
|
||||
return;
|
||||
|
||||
//SkDebugf("Closed fd:%d\n", sockfd);
|
||||
close(sockfd);
|
||||
|
||||
if (FD_ISSET(sockfd, &fMasterSet)) {
|
||||
FD_CLR(sockfd, &fMasterSet);
|
||||
if (sockfd >= fMaxfd) {
|
||||
while (FD_ISSET(fMaxfd, &fMasterSet) == false && fMaxfd > 0)
|
||||
fMaxfd -= 1;
|
||||
}
|
||||
}
|
||||
if (0 == fMaxfd) {
|
||||
fConnected = false;
|
||||
//SkDebugf("all connections closed\n");
|
||||
}
|
||||
}
|
||||
|
||||
void SkSocket::onFailedConnection(int sockfd) {
|
||||
this->closeSocket(sockfd);
|
||||
}
|
||||
|
||||
void SkSocket::setNonBlocking(int sockfd) {
|
||||
int flags = fcntl(sockfd, F_GETFL);
|
||||
fcntl(sockfd, F_SETFL, flags | O_NONBLOCK);
|
||||
}
|
||||
|
||||
void SkSocket::addToMasterSet(int sockfd) {
|
||||
FD_SET(sockfd, &fMasterSet);
|
||||
if (sockfd > fMaxfd)
|
||||
fMaxfd = sockfd;
|
||||
}
|
||||
|
||||
int SkSocket::readPacket(void (*onRead)(const void*, size_t, int, DataType,
|
||||
void*), void* context) {
|
||||
if (!fConnected || !fReady || NULL == onRead || fReadSuspended)
|
||||
return -1;
|
||||
|
||||
int totalBytesRead = 0;
|
||||
|
||||
char packet[PACKET_SIZE];
|
||||
for (int i = 0; i <= fMaxfd; ++i) {
|
||||
if (!FD_ISSET (i, &fMasterSet))
|
||||
continue;
|
||||
|
||||
memset(packet, 0, PACKET_SIZE);
|
||||
SkDynamicMemoryWStream stream;
|
||||
int attempts = 0;
|
||||
bool failure = false;
|
||||
int bytesReadInTransfer = 0;
|
||||
int bytesReadInPacket = 0;
|
||||
header h;
|
||||
h.done = false;
|
||||
h.bytes = 0;
|
||||
while (!h.done && fConnected && !failure) {
|
||||
int retval = read(i, packet + bytesReadInPacket,
|
||||
PACKET_SIZE - bytesReadInPacket);
|
||||
|
||||
++attempts;
|
||||
if (retval < 0) {
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
if (errno == EWOULDBLOCK || errno == EAGAIN) {
|
||||
if (bytesReadInPacket > 0 || bytesReadInTransfer > 0)
|
||||
continue; //incomplete packet or frame, keep tring
|
||||
else
|
||||
break; //nothing to read
|
||||
}
|
||||
#endif
|
||||
//SkDebugf("Read() failed with error: %s\n", strerror(errno));
|
||||
failure = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (retval == 0) {
|
||||
//SkDebugf("Peer closed connection or connection failed\n");
|
||||
failure = true;
|
||||
break;
|
||||
}
|
||||
|
||||
SkASSERT(retval > 0);
|
||||
bytesReadInPacket += retval;
|
||||
if (bytesReadInPacket < PACKET_SIZE) {
|
||||
//SkDebugf("Read %d/%d\n", bytesReadInPacket, PACKET_SIZE);
|
||||
continue; //incomplete packet, keep trying
|
||||
}
|
||||
|
||||
SkASSERT((bytesReadInPacket == PACKET_SIZE) && !failure);
|
||||
memcpy(&h.done, packet, sizeof(bool));
|
||||
memcpy(&h.bytes, packet + sizeof(bool), sizeof(int));
|
||||
memcpy(&h.type, packet + sizeof(bool) + sizeof(int), sizeof(DataType));
|
||||
if (h.bytes > CONTENT_SIZE || h.bytes <= 0) {
|
||||
//SkDebugf("bad packet\n");
|
||||
failure = true;
|
||||
break;
|
||||
}
|
||||
//SkDebugf("read packet(done:%d, bytes:%d) from fd:%d in %d attempts\n",
|
||||
// h.done, h.bytes, fSockfd, attempts);
|
||||
stream.write(packet + HEADER_SIZE, h.bytes);\
|
||||
bytesReadInPacket = 0;
|
||||
attempts = 0;
|
||||
bytesReadInTransfer += h.bytes;
|
||||
}
|
||||
|
||||
if (failure) {
|
||||
onRead(NULL, 0, i, h.type, context);
|
||||
this->onFailedConnection(i);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bytesReadInTransfer > 0) {
|
||||
SkData* data = stream.copyToData();
|
||||
SkASSERT(data->size() == bytesReadInTransfer);
|
||||
onRead(data->data(), data->size(), i, h.type, context);
|
||||
data->unref();
|
||||
|
||||
totalBytesRead += bytesReadInTransfer;
|
||||
}
|
||||
}
|
||||
return totalBytesRead;
|
||||
}
|
||||
|
||||
int SkSocket::writePacket(void* data, size_t size, DataType type) {
|
||||
if (size < 0|| NULL == data || !fConnected || !fReady || fWriteSuspended)
|
||||
return -1;
|
||||
|
||||
int totalBytesWritten = 0;
|
||||
header h;
|
||||
char packet[PACKET_SIZE];
|
||||
for (int i = 0; i <= fMaxfd; ++i) {
|
||||
if (!FD_ISSET (i, &fMasterSet))
|
||||
continue;
|
||||
|
||||
//Don't signal broken pipe
|
||||
setsockopt(i, SOL_SOCKET, SO_NOSIGPIPE, (void*)1, sizeof(int));
|
||||
int bytesWrittenInTransfer = 0;
|
||||
int bytesWrittenInPacket = 0;
|
||||
int attempts = 0;
|
||||
bool failure = false;
|
||||
while (bytesWrittenInTransfer < size && fConnected && !failure) {
|
||||
memset(packet, 0, PACKET_SIZE);
|
||||
h.done = (size - bytesWrittenInTransfer <= CONTENT_SIZE);
|
||||
h.bytes = (h.done) ? size - bytesWrittenInTransfer : CONTENT_SIZE;
|
||||
h.type = type;
|
||||
memcpy(packet, &h.done, sizeof(bool));
|
||||
memcpy(packet + sizeof(bool), &h.bytes, sizeof(int));
|
||||
memcpy(packet + sizeof(bool) + sizeof(int), &h.type, sizeof(DataType));
|
||||
memcpy(packet + HEADER_SIZE, (char*)data + bytesWrittenInTransfer,
|
||||
h.bytes);
|
||||
|
||||
int retval = write(i, packet + bytesWrittenInPacket,
|
||||
PACKET_SIZE - bytesWrittenInPacket);
|
||||
attempts++;
|
||||
|
||||
if (retval < 0) {
|
||||
if (errno == EPIPE) {
|
||||
//SkDebugf("broken pipe, client closed connection");
|
||||
failure = true;
|
||||
break;
|
||||
}
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
else if (errno == EWOULDBLOCK || errno == EAGAIN) {
|
||||
if (bytesWrittenInPacket > 0 || bytesWrittenInTransfer > 0)
|
||||
continue; //incomplete packet or frame, keep tring
|
||||
else
|
||||
break; //client not available, skip current transfer
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
//SkDebugf("write(%d) failed with error:%s\n", i,
|
||||
// strerror(errno));
|
||||
failure = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bytesWrittenInPacket += retval;
|
||||
if (bytesWrittenInPacket < PACKET_SIZE) {
|
||||
//SkDebugf("Wrote %d/%d\n", bytesWrittenInPacket, PACKET_SIZE);
|
||||
continue; //incomplete packet, keep tring
|
||||
}
|
||||
|
||||
SkASSERT(bytesWrittenInPacket == PACKET_SIZE);
|
||||
//SkDebugf("wrote to packet(done:%d, bytes:%d) to fd:%d in %d tries\n",
|
||||
// h.done, h.bytes, i, attempts);
|
||||
bytesWrittenInTransfer += h.bytes;
|
||||
bytesWrittenInPacket = 0;
|
||||
attempts = 0;
|
||||
}
|
||||
|
||||
if (failure) {
|
||||
//SkDebugf("Failed to write to fd:%d, terminating connection\n", i);
|
||||
this->onFailedConnection(i);
|
||||
}
|
||||
|
||||
totalBytesWritten += bytesWrittenInTransfer;
|
||||
}
|
||||
return totalBytesWritten;
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
SkTCPServer::SkTCPServer(int port) {
|
||||
sockaddr_in serverAddr;
|
||||
serverAddr.sin_family = AF_INET;
|
||||
serverAddr.sin_addr.s_addr = INADDR_ANY;
|
||||
serverAddr.sin_port = htons(port);
|
||||
|
||||
if (bind(fSockfd, (sockaddr*)&serverAddr, sizeof(serverAddr)) < 0) {
|
||||
//SkDebugf("ERROR on binding\n");
|
||||
fReady = false;
|
||||
}
|
||||
}
|
||||
|
||||
SkTCPServer::~SkTCPServer() {
|
||||
this->disconnectAllConnections();
|
||||
}
|
||||
|
||||
int SkTCPServer::acceptIncomingConnections() {
|
||||
if (!fReady)
|
||||
return -1;
|
||||
// if (fConnected)
|
||||
// return 0;
|
||||
|
||||
listen(fSockfd, MAX_CLIENTS);
|
||||
////SkDebugf("Accepting Incoming connections\n");
|
||||
int newfd;
|
||||
|
||||
for (int i = 0; i < MAX_CLIENTS; ++i) {
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
fd_set workingSet;
|
||||
FD_ZERO(&workingSet);
|
||||
FD_SET(fSockfd, &workingSet);
|
||||
int sel = select(fSockfd + 1, &workingSet, NULL, NULL, &fTimeout);
|
||||
if (sel < 0) {
|
||||
//SkDebugf("select() failed with error %s\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
if (sel == 0) //select() timed out
|
||||
continue;
|
||||
#endif
|
||||
sockaddr_in clientAddr;
|
||||
socklen_t clientLen = sizeof(clientAddr);
|
||||
newfd = accept(fSockfd, (struct sockaddr*)&clientAddr, &clientLen);
|
||||
if (newfd< 0) {
|
||||
//SkDebugf("accept() failed with error %s\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
//SkDebugf("New incoming connection - %d\n", newfd);
|
||||
fConnected = true;
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
this->setNonBlocking(newfd);
|
||||
#endif
|
||||
this->addToMasterSet(newfd);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int SkTCPServer::disconnectAllConnections() {
|
||||
////SkDebugf("disconnecting server\n");
|
||||
if (!fConnected || !fReady)
|
||||
return -1;
|
||||
for (int i = 0; i <= fMaxfd; ++i)
|
||||
{
|
||||
if (FD_ISSET(i, &fMasterSet))
|
||||
this->closeSocket(i);
|
||||
}
|
||||
fConnected = false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
SkTCPClient::SkTCPClient(const char* hostname, int port) {
|
||||
//Add fSockfd since the client will be using it to read/write
|
||||
this->addToMasterSet(fSockfd);
|
||||
|
||||
hostent* server = gethostbyname(hostname);
|
||||
if (server) {
|
||||
fServerAddr.sin_family = AF_INET;
|
||||
memcpy((char*)&fServerAddr.sin_addr.s_addr, (char*)server->h_addr,
|
||||
server->h_length);
|
||||
fServerAddr.sin_port = htons(port);
|
||||
}
|
||||
else {
|
||||
//SkDebugf("ERROR, no such host\n");
|
||||
fReady = false;
|
||||
}
|
||||
}
|
||||
|
||||
void SkTCPClient::onFailedConnection(int sockfd) {
|
||||
SkASSERT(sockfd == fSockfd);
|
||||
this->closeSocket(fSockfd);
|
||||
fSockfd = this->createSocket();
|
||||
//Add fSockfd since the client will be using it to read/write
|
||||
this->addToMasterSet(fSockfd);
|
||||
}
|
||||
|
||||
int SkTCPClient::connectToServer() {
|
||||
if (!fReady)
|
||||
return -1;
|
||||
if (fConnected)
|
||||
return 0;
|
||||
|
||||
int conn = connect(fSockfd, (sockaddr*)&fServerAddr, sizeof(fServerAddr));
|
||||
if (conn < 0) {
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
if (errno == EINPROGRESS || errno == EALREADY)
|
||||
return conn;
|
||||
#endif
|
||||
if (errno != EISCONN) {
|
||||
//SkDebugf("error: %s\n", strerror(errno));
|
||||
this->onFailedConnection(fSockfd);
|
||||
return conn;
|
||||
}
|
||||
}
|
||||
fConnected = true;
|
||||
//SkDebugf("Succesfully reached server\n");
|
||||
return 0;
|
||||
}
|
164
experimental/SkSockets.h
Normal file
164
experimental/SkSockets.h
Normal file
@ -0,0 +1,164 @@
|
||||
#ifndef SkNetIO_DEFINED
|
||||
#define SkNetIO_DEFINED
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include "SkTypes.h"
|
||||
#include "SkStream.h"
|
||||
/* PACKET and HEADER Format */
|
||||
#define PACKET_SIZE 1024
|
||||
#define HEADER_SIZE 20
|
||||
#define CONTENT_SIZE 1004
|
||||
|
||||
#define DEFAULT_PORT 15555
|
||||
|
||||
#define NONBLOCKING_SOCKETS
|
||||
#ifdef NONBLOCKING_SOCKETS
|
||||
#define MAX_CLIENTS 3
|
||||
#else
|
||||
#define MAX_CLIENTS 1
|
||||
#endif
|
||||
|
||||
class SkSocket {
|
||||
public:
|
||||
SkSocket();
|
||||
~SkSocket();
|
||||
|
||||
enum State {
|
||||
kError_state,
|
||||
kBegin_state,
|
||||
kIncomplete_state,
|
||||
kDone_state
|
||||
};
|
||||
|
||||
enum DataType {
|
||||
kPipeAppend_type,
|
||||
kPipeReplace_type,
|
||||
kString_type,
|
||||
kInt_type
|
||||
};
|
||||
/*
|
||||
* Write data to the socket. Data is a pointer to the beginning of the data
|
||||
* to be sent and dataSize specifies the number of bytes to send. This
|
||||
* method will spread the data across multiple packets if the data can't all
|
||||
* fit in a single packet. The method will write all the data to each of the
|
||||
* socket's open connections until all the bytes have been successfully sent
|
||||
* and return total the number of bytes written to all clients, unless there
|
||||
* was an error during the transfer, in which case the method returns -1.
|
||||
* For blocking sockets, write will block indefinitely if the socket at the
|
||||
* other end of the connection doesn't receive any data.
|
||||
*/
|
||||
int writePacket(void* data, size_t size, DataType type = kPipeAppend_type);
|
||||
|
||||
/*
|
||||
* Read a logical packet from socket. The data read will be stored
|
||||
* sequentially in the dataArray. This method will keep running until all
|
||||
* the data in a logical chunk has been read (assembling multiple partial
|
||||
* packets if necessary) and return the number of bytes successfully read,
|
||||
* unless there was an error, in which case the method returns -1. NOTE: For
|
||||
* nonblocking sockets, read will return 0 if there's nothing to read. For
|
||||
* blocking sockets, read will block indefinitely if the socket doesn't
|
||||
* receive any data.
|
||||
* once
|
||||
*/
|
||||
int readPacket(void (*onRead)(const void* data, size_t size,int cid,
|
||||
DataType type, void*), void* context);
|
||||
|
||||
// Suspend network transfers until resume() is called. Leaves all
|
||||
// connections in tact.
|
||||
void suspendAll() { fReadSuspended = fWriteSuspended = true; }
|
||||
// Resume all network transfers.
|
||||
void resumeAll() { fReadSuspended = fWriteSuspended = false; }
|
||||
// Other helper functions
|
||||
void suspendRead() { fReadSuspended = true; }
|
||||
void resumeRead() { fReadSuspended = false; }
|
||||
void suspendWrite() { fWriteSuspended = true; }
|
||||
void resumeWrite() { fWriteSuspended = false; }
|
||||
|
||||
protected:
|
||||
struct header {
|
||||
bool done;
|
||||
int bytes;
|
||||
DataType type;
|
||||
};
|
||||
|
||||
// Create a socket and return its file descriptor. Returns -1 on failure
|
||||
int createSocket();
|
||||
// Close the socket specifies by the socket file descriptor passed in. Will
|
||||
// update fMaxfd
|
||||
void closeSocket(int sockfd);
|
||||
|
||||
// called when a broken or terminated connection has been detected. Closes
|
||||
// the socket file descriptor and removes it from the master set by default.
|
||||
// Override to handle broken connections differently
|
||||
virtual void onFailedConnection(int sockfd);
|
||||
|
||||
// set the socket specified by the socket file descriptor as nonblocking
|
||||
void setNonBlocking(int sockfd);
|
||||
// add the socket specified by the socket file descriptor to the master
|
||||
// file descriptor set, which is used to in the select() to detect new data
|
||||
// or connections
|
||||
void addToMasterSet(int sockfd);
|
||||
|
||||
bool fConnected;
|
||||
bool fReady;
|
||||
bool fReadSuspended;
|
||||
bool fWriteSuspended;
|
||||
int fMaxfd;
|
||||
int fPort;
|
||||
int fSockfd;
|
||||
// fMasterSet contains all the file descriptors to be used for read/write.
|
||||
// For clients, this will only contain fSockfd. For servers, this will
|
||||
// contain all the file descriptors associated with established connections
|
||||
// to clients
|
||||
fd_set fMasterSet;
|
||||
timeval fTimeout;
|
||||
};
|
||||
|
||||
/*
|
||||
* TCP server. Can accept simultaneous connections to multiple SkTCPClients and
|
||||
* read/write data back and forth using read/writePacket calls. Port number can
|
||||
* be specified, but make sure that the clients use the same port for connections
|
||||
*/
|
||||
class SkTCPServer : public SkSocket {
|
||||
public:
|
||||
SkTCPServer(int port = DEFAULT_PORT);
|
||||
~SkTCPServer();
|
||||
|
||||
// accept any incoming connections to the server, will only accept a limited
|
||||
// number of clients (specified by MAX_CLIENTS) at a time. Returns -1 on
|
||||
// error. For blocking sockets, this method will block until a client has
|
||||
// connected
|
||||
int acceptIncomingConnections();
|
||||
|
||||
// disconnect all connections to clients. Returns -1 on error
|
||||
int disconnectAllConnections();
|
||||
private:
|
||||
typedef SkSocket INHERITED;
|
||||
};
|
||||
|
||||
/*
|
||||
* TCP client. Will connect to the server specified in the constructor. If a
|
||||
* port number is specified, make sure that it's the same as the port number on
|
||||
* the server
|
||||
*/
|
||||
class SkTCPClient : public SkSocket {
|
||||
public:
|
||||
SkTCPClient(const char* hostname, int port = DEFAULT_PORT);
|
||||
|
||||
// Connect to server. Returns -1 on error or failure. Make sure to call this
|
||||
// before any read/write operation to make sure that a connection is
|
||||
// is established or is still open and reconnect to server if necessary. For
|
||||
// blocking sockets, this method will block until the connection is accepted
|
||||
// by the server.
|
||||
int connectToServer();
|
||||
|
||||
// Client needs to recreate the socket when a connection is broken because
|
||||
// connect can only be called successfully once.
|
||||
virtual void onFailedConnection(int sockfd);
|
||||
private:
|
||||
sockaddr_in fServerAddr;
|
||||
typedef SkSocket INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
182
experimental/iOSSampleApp/Shared/DrawingBoard/SkColorPalette.cpp
Normal file
182
experimental/iOSSampleApp/Shared/DrawingBoard/SkColorPalette.cpp
Normal file
@ -0,0 +1,182 @@
|
||||
#include "SkView.h"
|
||||
#include "SkCanvas.h"
|
||||
#include "SkPaint.h"
|
||||
#include "SkGradientShader.h"
|
||||
#include "SkColorPalette.h"
|
||||
|
||||
SkColorPalette::SkColorPalette() {
|
||||
fSlotRect = SkRect::MakeWH(SkIntToScalar(50), SkIntToScalar(20));
|
||||
fGradientRect = SkRect::MakeWH(SkIntToScalar(100), SkIntToScalar(100));
|
||||
fSelected = 0;
|
||||
fCurrColor = 0xFF000000;
|
||||
for (int i = 0; i < PaletteSlots; ++i) {
|
||||
fColors[i] = 0xFF000000;
|
||||
}
|
||||
}
|
||||
|
||||
bool SkColorPalette::onEvent(const SkEvent& evt) {
|
||||
return this->INHERITED::onEvent(evt);
|
||||
}
|
||||
|
||||
void SkColorPalette::onDraw(SkCanvas* canvas) {
|
||||
canvas->drawColor(0xFFEEEEEE);
|
||||
|
||||
SkPaint paint;
|
||||
paint.setAntiAlias(true);
|
||||
paint.setStyle(SkPaint::kStrokeAndFill_Style);
|
||||
|
||||
canvas->translate(PalettePadding, PalettePadding);
|
||||
for (int i = 0; i < PaletteSlots; ++i) {
|
||||
if (fSelected == i) {
|
||||
paint.setStrokeWidth(SkIntToScalar(3));
|
||||
}
|
||||
else {
|
||||
paint.setStrokeWidth(0);
|
||||
}
|
||||
|
||||
paint.setColor(fColors[i]);
|
||||
canvas->drawRect(fSlotRect, paint);
|
||||
|
||||
canvas->translate(0, fSlotRect.height() + PalettePadding);
|
||||
}
|
||||
paint.setStrokeWidth(0);
|
||||
canvas->translate(0, PalettePadding);
|
||||
SkPoint p = SkPoint::Make(0,0);
|
||||
SkPoint q = SkPoint::Make(this->width(), 0);
|
||||
SkPoint pts[] = {p, q};
|
||||
|
||||
SkColor colors[] = { SK_ColorRED, SK_ColorYELLOW, SK_ColorGREEN,
|
||||
SK_ColorCYAN, SK_ColorBLUE, SK_ColorMAGENTA,SK_ColorRED};
|
||||
SkScalar colorPositions[] = { 0, 0.2, 0.4, 0.5, 0.6, 0.8, 1.0};
|
||||
|
||||
|
||||
SkShader* shader1 = SkGradientShader::CreateLinear(pts, colors, colorPositions,7,
|
||||
SkShader::kMirror_TileMode);
|
||||
paint.setShader(shader1)->unref();
|
||||
|
||||
canvas->drawRect(fGradientRect, paint);
|
||||
|
||||
//this->INHERITED::onDraw(canvas);
|
||||
}
|
||||
|
||||
SkView::Click* SkColorPalette::onFindClickHandler(SkScalar x, SkScalar y) {
|
||||
return new Click(this);
|
||||
}
|
||||
|
||||
bool SkColorPalette::onClick(SkView::Click* click) {
|
||||
SkPoint curr = click->fCurr;
|
||||
//SkDebugf("click %f %f \n", curr.fX, curr.fY);
|
||||
int selected = selectSlot(curr);
|
||||
if (selected >= 0) {
|
||||
switch (click->fState) {
|
||||
case SkView::Click::kDown_State:
|
||||
case SkView::Click::kMoved_State:
|
||||
case SkView::Click::kUp_State:
|
||||
fSelected = selected;
|
||||
fCurrColor = fColors[fSelected];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else{
|
||||
//account for padding
|
||||
curr.fX -= PalettePadding;
|
||||
curr.fY -= 2 * PalettePadding + (fSlotRect.height() + PalettePadding) * PaletteSlots;
|
||||
if (curr.fX < 0 || curr.fX > fGradientRect.width() ||
|
||||
curr.fY < 0 || curr.fY > fGradientRect.height()) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
switch (click->fState) {
|
||||
case SkView::Click::kDown_State:
|
||||
case SkView::Click::kMoved_State:
|
||||
case SkView::Click::kUp_State:
|
||||
fColors[fSelected] = selectColorFromGradient(curr);
|
||||
fCurrColor = fColors[fSelected];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SkColorPalette::onSizeChange() {
|
||||
fGradientRect = SkRect::MakeWH(this->width() - 2*PalettePadding,
|
||||
this->width() - 2*PalettePadding);
|
||||
this->INHERITED::onSizeChange();
|
||||
}
|
||||
|
||||
int SkColorPalette::selectSlot(SkPoint& cursorPosition) {
|
||||
//account for padding
|
||||
cursorPosition.fX -= PalettePadding;
|
||||
cursorPosition.fY -= PalettePadding;
|
||||
|
||||
if (cursorPosition.fX < 0 || cursorPosition.fX > fSlotRect.width() ||
|
||||
cursorPosition.fY < 0 || cursorPosition.fY > (fSlotRect.height() + PalettePadding) * PaletteSlots) {
|
||||
return -1;
|
||||
}
|
||||
int index = cursorPosition.fY/(fSlotRect.height() + PalettePadding);
|
||||
int offset = (int)cursorPosition.fY%((int)fSlotRect.height() + PalettePadding);
|
||||
if (offset <= fSlotRect.height()) {
|
||||
return index;
|
||||
}
|
||||
else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
SkColor SkColorPalette::selectColorFromGradient(SkPoint& cursorPosition) {
|
||||
float h = cursorPosition.fX/fGradientRect.width();
|
||||
float s = 1.0 - cursorPosition.fY/fGradientRect.height();
|
||||
float v = 1.0;
|
||||
float _h,r,g,b;
|
||||
float _1, _2, _3;
|
||||
int _i;
|
||||
|
||||
_h = h * 6;
|
||||
_i = (int)_h;
|
||||
_1 = v * (1 - s);
|
||||
_2 = v * (1 - s * (_h - _i));
|
||||
_3 = v * (1 - s * (1 - (_h - _i)));
|
||||
|
||||
if (_i == 0) {
|
||||
r = v;
|
||||
g = _3;
|
||||
b = _1;
|
||||
}
|
||||
else if (_i == 1) {
|
||||
r = _2;
|
||||
g = v;
|
||||
b = _1;
|
||||
}
|
||||
else if (_i == 2) {
|
||||
r = _1;
|
||||
g = v;
|
||||
b = _3;
|
||||
}
|
||||
else if (_i == 3) {
|
||||
r = _1;
|
||||
g = _2;
|
||||
b = v;
|
||||
}
|
||||
else if (_i == 4) {
|
||||
r = _3;
|
||||
g = _1;
|
||||
b = v;
|
||||
}
|
||||
else {
|
||||
r = v;
|
||||
g = _1;
|
||||
b = _2;
|
||||
};
|
||||
|
||||
SkColor retval = 0xFF000000;
|
||||
retval += ((int)(r * 255) << 16);
|
||||
retval += ((int)(g * 255) << 8);
|
||||
retval += (int)(b * 255);
|
||||
return retval;
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
#ifndef SkColorPalette_DEFINED
|
||||
#define SkColorPalette_DEFINED
|
||||
|
||||
#define PaletteSlots 5
|
||||
#define PalettePadding 5
|
||||
class SkColorPalette : public SkView {
|
||||
public:
|
||||
SkColorPalette();
|
||||
SkColor getColor() { return fCurrColor; }
|
||||
protected:
|
||||
virtual bool onEvent(const SkEvent& evt);
|
||||
virtual void onDraw(SkCanvas* canvas);
|
||||
virtual SkView::Click* onFindClickHandler(SkScalar x, SkScalar y);
|
||||
virtual bool onClick(SkView::Click* click);
|
||||
virtual void onSizeChange();
|
||||
private:
|
||||
int selectSlot(SkPoint& cursorPosition);
|
||||
SkColor selectColorFromGradient(SkPoint& cursorPosition);
|
||||
int fSelected;
|
||||
SkRect fGradientRect;
|
||||
SkRect fSlotRect;
|
||||
SkColor fCurrColor;
|
||||
SkColor fColors[PaletteSlots];
|
||||
typedef SkView INHERITED;
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,44 @@
|
||||
#include "SkNetPipeController.h"
|
||||
|
||||
SkNetPipeController::SkNetPipeController(SkCanvas* target) : fReader(target) {
|
||||
fBlock = NULL;
|
||||
fBlockSize = fBytesWritten = 0;
|
||||
fPlayback = true;
|
||||
fStatus = SkGPipeReader::kDone_Status;
|
||||
fTotalWritten = 0;
|
||||
fAtomsWritten = 0;
|
||||
}
|
||||
SkNetPipeController::~SkNetPipeController() {
|
||||
sk_free(fBlock);
|
||||
}
|
||||
|
||||
int SkNetPipeController::writeToSocket(SkSocket* sockfd, SkSocket::DataType type) {
|
||||
if (NULL != sockfd && fTotalWritten > 4)
|
||||
return sockfd->writePacket(fBlock, fBytesWritten, type);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
void* SkNetPipeController::requestBlock(size_t minRequest, size_t* actual) {
|
||||
sk_free(fBlock);
|
||||
|
||||
fBlockSize = minRequest * 4;
|
||||
fBlock = sk_malloc_throw(fBlockSize);
|
||||
fBytesWritten = 0;
|
||||
*actual = fBlockSize;
|
||||
return fBlock;
|
||||
}
|
||||
|
||||
void SkNetPipeController::notifyWritten(size_t bytes) {
|
||||
SkASSERT(fBytesWritten + bytes <= fBlockSize);
|
||||
|
||||
if (fPlayback) {
|
||||
fStatus = fReader.playback((const char*)fBlock + fBytesWritten, bytes);
|
||||
}
|
||||
|
||||
SkASSERT(SkGPipeReader::kError_Status != fStatus);
|
||||
fBytesWritten += bytes;
|
||||
fTotalWritten += bytes;
|
||||
|
||||
fAtomsWritten += 1;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
#ifndef SkNetPipeController_DEFINED
|
||||
#define SkNetPipeController_DEFINED
|
||||
#include "SkTypes.h"
|
||||
#include "SkCanvas.h"
|
||||
#include "SkGPipe.h"
|
||||
#include "SkSockets.h"
|
||||
class SkNetPipeController : public SkGPipeController {
|
||||
public:
|
||||
SkNetPipeController(SkCanvas* target);
|
||||
~SkNetPipeController();
|
||||
|
||||
virtual void* requestBlock(size_t minRequest, size_t* actual);
|
||||
virtual void notifyWritten(size_t bytes);
|
||||
|
||||
int writeToSocket(SkSocket* sockfd, SkSocket::DataType type);
|
||||
void enablePlayback() { fPlayback = true; }
|
||||
void disablePlayback() { fPlayback = false; }
|
||||
|
||||
private:
|
||||
SkGPipeReader fReader;
|
||||
bool fPlayback;
|
||||
void* fBlock;
|
||||
size_t fBlockSize;
|
||||
size_t fBytesWritten;
|
||||
int fAtomsWritten;
|
||||
size_t fTotalWritten;
|
||||
|
||||
SkGPipeReader::Status fStatus;
|
||||
};
|
||||
#endif
|
19
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
Normal file
19
experimental/iOSSampleApp/Shared/SkAlertPrompt.h
Normal file
@ -0,0 +1,19 @@
|
||||
//
|
||||
// SkAlertPrompt.h
|
||||
// iOSSampleApp
|
||||
//
|
||||
// Created by Yang Su on 7/6/11.
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
|
||||
@interface SkAlertPrompt : UIAlertView {
|
||||
UITextField *textField;
|
||||
}
|
||||
@property (nonatomic, retain) UITextField *textField;
|
||||
|
||||
- (NSString*)enteredText;
|
||||
|
||||
@end
|
47
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
Normal file
47
experimental/iOSSampleApp/Shared/SkAlertPrompt.m
Normal file
@ -0,0 +1,47 @@
|
||||
//
|
||||
// SkAlertPrompt.m
|
||||
// iOSSampleApp
|
||||
//
|
||||
// Created by Yang Su on 7/6/11.
|
||||
// Copyright 2011 Google Inc. All rights reserved.
|
||||
//
|
||||
|
||||
#import "SkAlertPrompt.h"
|
||||
|
||||
@implementation SkAlertPrompt
|
||||
@synthesize textField;
|
||||
|
||||
- (id)initWithTitle:(NSString *)title
|
||||
message:(NSString *)message
|
||||
delegate:(id)delegate
|
||||
cancelButtonTitle:(NSString *)cancelButtonTitle
|
||||
otherButtonTitles:(NSString *)okayButtonTitle,... {
|
||||
if (self = [super initWithTitle:title
|
||||
message:message
|
||||
delegate:delegate
|
||||
cancelButtonTitle:cancelButtonTitle
|
||||
otherButtonTitles:okayButtonTitle, nil]) {
|
||||
self.textField = [[UITextField alloc]
|
||||
initWithFrame:CGRectMake(12, 45, 260, 25)];
|
||||
[self.textField setBackgroundColor:[UIColor whiteColor]];
|
||||
textField.borderStyle = UITextBorderStyleLine;
|
||||
[self addSubview:self.textField];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)show {
|
||||
[textField becomeFirstResponder];
|
||||
[super show];
|
||||
}
|
||||
|
||||
- (NSString *)enteredText {
|
||||
return textField.text;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[textField release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
36
experimental/iOSSampleApp/Shared/SkUIDetailViewController.h
Normal file
36
experimental/iOSSampleApp/Shared/SkUIDetailViewController.h
Normal file
@ -0,0 +1,36 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SkUIRootViewController.h"
|
||||
#import "SkUIView.h"
|
||||
|
||||
class SampleWindow;
|
||||
class SkData;
|
||||
@interface SkUIDetailViewController : UIViewController {
|
||||
UINavigationBar* fNavigationBar;
|
||||
UIPopoverController* fPopOverController;
|
||||
UIBarButtonItem* fPrintButton;
|
||||
UIBarButtonItem* fCycleButton;
|
||||
SkData* fData;
|
||||
SkUIView* fSkUIView;
|
||||
SampleWindow* fWind;
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UINavigationBar *fNavigationBar;
|
||||
@property (nonatomic, retain) UIBarButtonItem* fPrintButton;
|
||||
@property (nonatomic, retain) UIBarButtonItem* fCycleButton;
|
||||
@property (nonatomic, assign) UIPopoverController* fPopOverController;
|
||||
|
||||
//Instance methods
|
||||
- (void)redraw;
|
||||
- (void)populateRoot:(SkUIRootViewController*)root;
|
||||
- (void)goToItem:(NSUInteger)index;
|
||||
- (void)createButtons;
|
||||
//UI actions
|
||||
- (IBAction)usePipe:(id)sender;
|
||||
- (IBAction)enterServerIP:(id)sender;
|
||||
- (void)printContent;
|
||||
- (void)cycleDeviceType;
|
||||
|
||||
//SplitView popover management
|
||||
- (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem;
|
||||
- (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem;
|
||||
|
||||
@end
|
179
experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm
Normal file
179
experimental/iOSSampleApp/Shared/SkUIDetailViewController.mm
Normal file
@ -0,0 +1,179 @@
|
||||
#import "SkAlertPrompt.h"
|
||||
#import "SkUIDetailViewController.h"
|
||||
#include "SampleApp.h"
|
||||
#include "SkApplication.h"
|
||||
#include "SkCGUtils.h"
|
||||
#include "SkData.h"
|
||||
@implementation SkUIDetailViewController
|
||||
@synthesize fNavigationBar, fPrintButton, fCycleButton, fPopOverController;
|
||||
|
||||
//Overwritten from UIViewController
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
fSkUIView = (SkUIView*)self.view;
|
||||
fWind = (SampleWindow*)fSkUIView.fWind;
|
||||
fSkUIView.fTitleItem = fNavigationBar.topItem;
|
||||
|
||||
[NSTimer scheduledTimerWithTimeInterval:0.001 target:self
|
||||
selector:@selector(redraw) userInfo:nil
|
||||
repeats:YES];
|
||||
[self createButtons];
|
||||
}
|
||||
|
||||
- (void)createButtons {
|
||||
UIToolbar* toolbar = [[UIToolbar alloc]
|
||||
initWithFrame:CGRectMake(0, 0, 150, 45)];
|
||||
[toolbar setBarStyle: UIBarStyleBlackOpaque];
|
||||
|
||||
UIBarButtonItem* flexibleSpace = [[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
|
||||
target:nil
|
||||
action:nil];
|
||||
|
||||
fCycleButton = [[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh
|
||||
target:self
|
||||
action:@selector(cycleDeviceType)];
|
||||
fCycleButton.style = UIBarButtonItemStylePlain;
|
||||
|
||||
UIBarButtonItem* fixedSpace = [[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace
|
||||
target:nil
|
||||
action:nil];
|
||||
fixedSpace.width = 10;
|
||||
|
||||
fPrintButton = [[UIBarButtonItem alloc]
|
||||
initWithBarButtonSystemItem:UIBarButtonSystemItemAction
|
||||
target:self
|
||||
action:@selector(printContent)];
|
||||
fPrintButton.style = UIBarButtonItemStylePlain;
|
||||
|
||||
[toolbar setItems:[NSArray arrayWithObjects:flexibleSpace, fCycleButton, fixedSpace, fPrintButton, nil]
|
||||
animated:NO];
|
||||
|
||||
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
|
||||
initWithCustomView:toolbar];
|
||||
[flexibleSpace release];
|
||||
[fixedSpace release];
|
||||
[toolbar release];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
return YES; // Overriden to allow auto rotation for any direction
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[fNavigationBar release];
|
||||
[fPrintButton release];
|
||||
[fCycleButton release];
|
||||
[fPopOverController release];
|
||||
application_term();
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//Instance Methods
|
||||
- (void)redraw {
|
||||
[self.view setNeedsDisplay];
|
||||
}
|
||||
|
||||
- (void)populateRoot:(SkUIRootViewController*)rootVC {
|
||||
for (int i = 0; i < fWind->sampleCount(); ++i) {
|
||||
[rootVC addItem:[NSString stringWithUTF8String:fWind->getSampleTitle(i).c_str()]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)goToItem:(NSUInteger)index {
|
||||
fWind->goToSample(index);
|
||||
}
|
||||
|
||||
//UI actions
|
||||
- (IBAction)usePipe:(id)sender {
|
||||
//fWind->togglePipe();
|
||||
}
|
||||
|
||||
- (void)printContent {
|
||||
UIPrintInteractionController *controller = [UIPrintInteractionController sharedPrintController];
|
||||
UIPrintInfo *printInfo = [UIPrintInfo printInfo];
|
||||
printInfo.jobName = @"Skia iOS SampleApp";
|
||||
printInfo.duplex = UIPrintInfoDuplexLongEdge;
|
||||
printInfo.outputType = UIPrintInfoOutputGeneral;
|
||||
fWind->saveToPdf();
|
||||
[self.view drawRect:self.view.bounds];
|
||||
fData = fWind->getPDFData();
|
||||
NSData* data = [NSData dataWithBytesNoCopy:(void*)fData->data() length:fData->size()];
|
||||
controller.printInfo = printInfo;
|
||||
controller.printingItem = data;
|
||||
//Add ref because data pointer retains a pointer to data
|
||||
fData->ref();
|
||||
|
||||
void (^SkCompletionHandler)(UIPrintInteractionController *, BOOL, NSError *) =
|
||||
^(UIPrintInteractionController *pic, BOOL completed, NSError *error) {
|
||||
fData->unref();
|
||||
if (!completed && error)
|
||||
NSLog(@"FAILED! due to error in domain %@ with error code %u",
|
||||
error.domain, error.code);
|
||||
};
|
||||
|
||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||
[controller presentFromBarButtonItem:fPrintButton animated:YES
|
||||
completionHandler:SkCompletionHandler];
|
||||
} else {
|
||||
[controller presentAnimated:YES completionHandler:SkCompletionHandler];
|
||||
}
|
||||
}
|
||||
|
||||
- (IBAction)enterServerIP:(id)sender {
|
||||
SkAlertPrompt *prompt = [[SkAlertPrompt alloc] initWithTitle:@"Enter Server IP:"
|
||||
message:@"\n"
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Cancel"
|
||||
otherButtonTitles:@"Enter", nil];
|
||||
// show the dialog box
|
||||
[prompt show];
|
||||
[prompt release];
|
||||
}
|
||||
|
||||
- (void)cycleDeviceType {
|
||||
fWind->toggleRendering();
|
||||
}
|
||||
|
||||
/*
|
||||
- (void)presentActions {
|
||||
if (!fPopOverController) {
|
||||
SkOptionsTableViewController* controller = [[SkOptionsTableViewController alloc]
|
||||
initWithStyle:UITableViewStyleGrouped];
|
||||
fPopOverController = [[UIPopoverController alloc] initWithContentViewController:controller];
|
||||
fPopOverController.popoverContentSize = CGSizeMake(500, 400);
|
||||
[controller release];
|
||||
}
|
||||
|
||||
if (fPopOverController.isPopoverVisible)
|
||||
[fPopOverController dismissPopoverAnimated:YES];
|
||||
else
|
||||
[fPopOverController presentPopoverFromBarButtonItem:fPrintButton
|
||||
permittedArrowDirections:UIPopoverArrowDirectionAny
|
||||
animated:YES];
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
// manage popup
|
||||
- (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
|
||||
{
|
||||
if (buttonIndex != [alertView cancelButtonIndex])
|
||||
{
|
||||
NSString *entered = [(SkAlertPrompt*)alertView enteredText];
|
||||
//fWind->setServerIP([entered UTF8String]);
|
||||
}
|
||||
}
|
||||
//Popover Management
|
||||
- (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem {
|
||||
[fNavigationBar.topItem setLeftBarButtonItem:barButtonItem animated:NO];
|
||||
}
|
||||
|
||||
- (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem {
|
||||
[fNavigationBar.topItem setLeftBarButtonItem:nil animated:NO];
|
||||
}
|
||||
|
||||
@end
|
15
experimental/iOSSampleApp/Shared/SkUIRootViewController.h
Normal file
15
experimental/iOSSampleApp/Shared/SkUIRootViewController.h
Normal file
@ -0,0 +1,15 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
@interface SkUIRootViewController : UITableViewController <UITableViewDataSource> {
|
||||
@private
|
||||
UIPopoverController *popoverController;
|
||||
UIBarButtonItem *popoverButtonItem;
|
||||
NSMutableArray* fSamples;
|
||||
}
|
||||
@property (nonatomic, retain) UIPopoverController *popoverController;
|
||||
@property (nonatomic, retain) UIBarButtonItem *popoverButtonItem;
|
||||
|
||||
- (void)initSamples;
|
||||
- (void)addItem:(NSString*)anItem;
|
||||
|
||||
@end
|
64
experimental/iOSSampleApp/Shared/SkUIRootViewController.mm
Normal file
64
experimental/iOSSampleApp/Shared/SkUIRootViewController.mm
Normal file
@ -0,0 +1,64 @@
|
||||
#import "SkUIRootViewController.h"
|
||||
#import "SkUISplitViewController.h"
|
||||
@implementation SkUIRootViewController
|
||||
@synthesize popoverController, popoverButtonItem;
|
||||
|
||||
//Overwritten from UIViewController
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.contentSizeForViewInPopover = CGSizeMake(200, self.view.bounds.size.height);
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
[super viewDidUnload];
|
||||
self.popoverButtonItem = nil;
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[popoverController release];
|
||||
[popoverButtonItem release];
|
||||
[fSamples release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
||||
//Table View Delegate Methods
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
// Return the number of sections.
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
// Return the number of rows in the section.
|
||||
return [fSamples count];
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
|
||||
static NSString *CellIdentifier = @"Cell";
|
||||
|
||||
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
|
||||
if (cell == nil) {
|
||||
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
|
||||
reuseIdentifier:CellIdentifier] autorelease];
|
||||
}
|
||||
|
||||
cell.textLabel.text = [fSamples objectAtIndex:indexPath.row];
|
||||
return cell;
|
||||
}
|
||||
|
||||
//Instance methods
|
||||
- (void)addItem:(NSString*)anItem {
|
||||
[fSamples addObject:anItem];
|
||||
}
|
||||
|
||||
- (void)initSamples {
|
||||
fSamples = [[NSMutableArray alloc] init];
|
||||
}
|
||||
|
||||
@end
|
||||
|
47
experimental/iOSSampleApp/Shared/SkUIView.h
Normal file
47
experimental/iOSSampleApp/Shared/SkUIView.h
Normal file
@ -0,0 +1,47 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <OpenGLES/EAGL.h>
|
||||
#import <OpenGLES/ES1/gl.h>
|
||||
#import <OpenGLES/ES1/glext.h>
|
||||
#import <OpenGLES/ES2/gl.h>
|
||||
#import <OpenGLES/ES2/glext.h>
|
||||
#include "SkMatrix.h"
|
||||
#include "FlingState.h"
|
||||
#include "SampleApp.h"
|
||||
#include "SkiOSDeviceManager.h"
|
||||
class SkOSWindow;
|
||||
class SkEvent;
|
||||
struct FPSState;
|
||||
@interface SkUIView : UIView <UIAccelerometerDelegate> {
|
||||
BOOL fRedrawRequestPending;
|
||||
SkMatrix fMatrix;
|
||||
|
||||
float fZoomAroundX, fZoomAroundY;
|
||||
bool fZoomAround;
|
||||
|
||||
struct {
|
||||
EAGLContext* fContext;
|
||||
GLuint fRenderbuffer;
|
||||
GLuint fStencilbuffer;
|
||||
GLuint fFramebuffer;
|
||||
GLint fWidth;
|
||||
GLint fHeight;
|
||||
} fGL;
|
||||
|
||||
FPSState* fFPSState;
|
||||
NSString* fTitle;
|
||||
UINavigationItem* fTitleItem;
|
||||
SkOSWindow* fWind;
|
||||
|
||||
SkiOSDeviceManager* fDevManager;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign) SkOSWindow *fWind;
|
||||
@property (nonatomic, retain) UINavigationItem* fTitleItem;
|
||||
@property (nonatomic, copy) NSString* fTitle;
|
||||
|
||||
- (void)setSkTitle:(const char*)title;
|
||||
- (void)postInvalWithRect:(const SkIRect*)rectOrNil;
|
||||
- (BOOL)onHandleEvent:(const SkEvent&)event;
|
||||
|
||||
@end
|
||||
|
446
experimental/iOSSampleApp/Shared/SkUIView.mm
Normal file
446
experimental/iOSSampleApp/Shared/SkUIView.mm
Normal file
@ -0,0 +1,446 @@
|
||||
#import "SkUIView.h"
|
||||
#include <QuartzCore/QuartzCore.h>
|
||||
|
||||
//#define SKWIND_CONFIG SkBitmap::kRGB_565_Config
|
||||
#define SKWIND_CONFIG SkBitmap::kARGB_8888_Config
|
||||
#define SKGL_CONFIG kEAGLColorFormatRGB565
|
||||
//#define SKGL_CONFIG kEAGLColorFormatRGBA8
|
||||
|
||||
#define FORCE_REDRAW
|
||||
|
||||
//#define USE_GL_1
|
||||
//#define USE_GL_2
|
||||
#if defined(USE_GL_1) || defined(USE_GL_2)
|
||||
#define USE_GL
|
||||
#endif
|
||||
|
||||
#include "SkCanvas.h"
|
||||
#include "GrContext.h"
|
||||
#include "GrGLInterface.h"
|
||||
#include "SkGpuDevice.h"
|
||||
#include "SkCGUtils.h"
|
||||
|
||||
SkiOSDeviceManager::SkiOSDeviceManager() {
|
||||
fGrContext = NULL;
|
||||
fGrRenderTarget = NULL;
|
||||
usingGL = false;
|
||||
}
|
||||
SkiOSDeviceManager::~SkiOSDeviceManager() {
|
||||
SkSafeUnref(fGrContext);
|
||||
SkSafeUnref(fGrRenderTarget);
|
||||
}
|
||||
|
||||
void SkiOSDeviceManager::init(SampleWindow* win) {
|
||||
win->attachGL();
|
||||
if (NULL == fGrContext) {
|
||||
#if defined(USE_GL_1)
|
||||
fGrContext = GrContext::Create(kOpenGL_Fixed_GrEngine, NULL);
|
||||
#elsif defined(USE_GL_2)
|
||||
fGrContext = GrContext::Create(kOpenGL_Shaders_GrEngine, NULL);
|
||||
#endif
|
||||
}
|
||||
fGrRenderTarget = SkGpuDevice::Current3DApiRenderTarget();
|
||||
if (NULL == fGrContext) {
|
||||
SkDebugf("Failed to setup 3D");
|
||||
win->detachGL();
|
||||
}
|
||||
}
|
||||
bool SkiOSDeviceManager::supportsDeviceType(SampleWindow::DeviceType dType) {
|
||||
switch (dType) {
|
||||
case SampleWindow::kRaster_DeviceType:
|
||||
case SampleWindow::kPicture_DeviceType: // fallthru
|
||||
return true;
|
||||
case SampleWindow::kGPU_DeviceType:
|
||||
return NULL != fGrContext;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
bool SkiOSDeviceManager::prepareCanvas(SampleWindow::DeviceType dType,
|
||||
SkCanvas* canvas,
|
||||
SampleWindow* win) {
|
||||
if (SampleWindow::kGPU_DeviceType == dType) {
|
||||
canvas->setDevice(new SkGpuDevice(fGrContext, fGrRenderTarget))->unref();
|
||||
usingGL = true;
|
||||
}
|
||||
else {
|
||||
//The clip needs to be applied with a device attached to the canvas
|
||||
//canvas->setBitmapDevice(win->getBitmap());
|
||||
usingGL = false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void SkiOSDeviceManager::publishCanvas(SampleWindow::DeviceType dType,
|
||||
SkCanvas* canvas,
|
||||
SampleWindow* win) {
|
||||
if (SampleWindow::kGPU_DeviceType == dType) {
|
||||
fGrContext->flush();
|
||||
}
|
||||
else {
|
||||
CGContextRef cg = UIGraphicsGetCurrentContext();
|
||||
SkCGDrawBitmap(cg, win->getBitmap(), 0, 0);
|
||||
}
|
||||
win->presentGL();
|
||||
}
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
@implementation SkUIView
|
||||
|
||||
@synthesize fWind, fTitle, fTitleItem;
|
||||
|
||||
#include "SkApplication.h"
|
||||
#include "SkEvent.h"
|
||||
#include "SkWindow.h"
|
||||
|
||||
static float gScreenScale = 1;
|
||||
|
||||
#define kREDRAW_UIVIEW_GL "sk_redraw_uiview_gl_iOS"
|
||||
|
||||
static const float SCALE_FOR_ZOOM_LENS = 4.0;
|
||||
#define Y_OFFSET_FOR_ZOOM_LENS 200
|
||||
#define SIZE_FOR_ZOOM_LENS 250
|
||||
|
||||
static const float MAX_ZOOM_SCALE = 4.0;
|
||||
static const float MIN_ZOOM_SCALE = 2.0 / MAX_ZOOM_SCALE;
|
||||
|
||||
extern bool gDoTraceDraw;
|
||||
#define DO_TRACE_DRAW_MAX 100
|
||||
|
||||
struct FPSState {
|
||||
static const int FRAME_COUNT = 60;
|
||||
|
||||
CFTimeInterval fNow0, fNow1;
|
||||
CFTimeInterval fTime0, fTime1, fTotalTime;
|
||||
int fFrameCounter;
|
||||
int fDrawCounter;
|
||||
SkString str;
|
||||
FPSState() {
|
||||
fTime0 = fTime1 = fTotalTime = 0;
|
||||
fFrameCounter = 0;
|
||||
}
|
||||
|
||||
void startDraw() {
|
||||
fNow0 = CACurrentMediaTime();
|
||||
|
||||
if (0 == fDrawCounter && false) {
|
||||
gDoTraceDraw = true;
|
||||
SkDebugf("\n");
|
||||
}
|
||||
}
|
||||
|
||||
void endDraw() {
|
||||
fNow1 = CACurrentMediaTime();
|
||||
|
||||
if (0 == fDrawCounter) {
|
||||
gDoTraceDraw = true;
|
||||
}
|
||||
if (DO_TRACE_DRAW_MAX == ++fDrawCounter) {
|
||||
fDrawCounter = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void flush(SkOSWindow* hwnd) {
|
||||
CFTimeInterval now2 = CACurrentMediaTime();
|
||||
|
||||
fTime0 += fNow1 - fNow0;
|
||||
fTime1 += now2 - fNow1;
|
||||
|
||||
if (++fFrameCounter == FRAME_COUNT) {
|
||||
CFTimeInterval totalNow = CACurrentMediaTime();
|
||||
fTotalTime = totalNow - fTotalTime;
|
||||
|
||||
//SkMSec ms0 = (int)(1000 * fTime0 / FRAME_COUNT);
|
||||
//SkMSec msTotal = (int)(1000 * fTotalTime / FRAME_COUNT);
|
||||
//str.printf(" ms: %d [%d], fps: %3.1f", msTotal, ms0,
|
||||
// FRAME_COUNT / fTotalTime);
|
||||
str.printf(" fps:%3.1f", FRAME_COUNT / fTotalTime);
|
||||
hwnd->setTitle(NULL);
|
||||
fTotalTime = totalNow;
|
||||
fTime0 = fTime1 = 0;
|
||||
fFrameCounter = 0;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
static FPSState gFPS;
|
||||
|
||||
#define FPS_StartDraw() gFPS.startDraw()
|
||||
#define FPS_EndDraw() gFPS.endDraw()
|
||||
#define FPS_Flush(wind) gFPS.flush(wind)
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef USE_GL
|
||||
+ (Class) layerClass {
|
||||
return [CAEAGLLayer class];
|
||||
}
|
||||
#endif
|
||||
|
||||
- (id)initWithMyDefaults {
|
||||
fRedrawRequestPending = false;
|
||||
fFPSState = new FPSState;
|
||||
#ifdef USE_GL
|
||||
CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;
|
||||
eaglLayer.opaque = TRUE;
|
||||
eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithBool:NO],
|
||||
kEAGLDrawablePropertyRetainedBacking,
|
||||
SKGL_CONFIG,
|
||||
kEAGLDrawablePropertyColorFormat,
|
||||
nil];
|
||||
|
||||
#ifdef USE_GL_1
|
||||
fGL.fContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];
|
||||
#else
|
||||
fGL.fContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
|
||||
#endif
|
||||
|
||||
if (!fGL.fContext || ![EAGLContext setCurrentContext:fGL.fContext])
|
||||
{
|
||||
[self release];
|
||||
return nil;
|
||||
}
|
||||
|
||||
// Create default framebuffer object. The backing will be allocated for the current layer in -resizeFromLayer
|
||||
glGenFramebuffers(1, &fGL.fFramebuffer);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fGL.fFramebuffer);
|
||||
|
||||
glGenRenderbuffers(1, &fGL.fRenderbuffer);
|
||||
glGenRenderbuffers(1, &fGL.fStencilbuffer);
|
||||
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer);
|
||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, fGL.fRenderbuffer);
|
||||
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, fGL.fStencilbuffer);
|
||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, fGL.fStencilbuffer);
|
||||
#endif
|
||||
|
||||
fDevManager = new SkiOSDeviceManager;
|
||||
fWind = new SampleWindow(self, NULL, NULL, fDevManager);
|
||||
application_init();
|
||||
fWind->resize(self.frame.size.width, self.frame.size.height, SKWIND_CONFIG);
|
||||
fMatrix.reset();
|
||||
fZoomAround = false;
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithCoder:(NSCoder*)coder {
|
||||
if ((self = [super initWithCoder:coder])) {
|
||||
self = [self initWithMyDefaults];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
self = [self initWithMyDefaults];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
delete fWind;
|
||||
delete fDevManager;
|
||||
delete fFPSState;
|
||||
application_term();
|
||||
[fTitleItem release];
|
||||
[super dealloc];
|
||||
}
|
||||
- (void)drawWithCanvas:(SkCanvas*)canvas {
|
||||
fRedrawRequestPending = false;
|
||||
fFPSState->startDraw();
|
||||
fWind->draw(canvas);
|
||||
fFPSState->endDraw();
|
||||
#ifdef FORCE_REDRAW
|
||||
fWind->inval(NULL);
|
||||
#endif
|
||||
fFPSState->flush(fWind);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
- (void)layoutSubviews {
|
||||
int W, H;
|
||||
gScreenScale = [UIScreen mainScreen].scale;
|
||||
#ifdef USE_GL
|
||||
CAEAGLLayer* eaglLayer = (CAEAGLLayer*)self.layer;
|
||||
if ([self respondsToSelector:@selector(setContentScaleFactor:)]) {
|
||||
self.contentScaleFactor = gScreenScale;
|
||||
}
|
||||
|
||||
// Allocate color buffer backing based on the current layer size
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer);
|
||||
[fGL.fContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:eaglLayer];
|
||||
|
||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &fGL.fWidth);
|
||||
glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &fGL.fHeight);
|
||||
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, fGL.fStencilbuffer);
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, GL_STENCIL_INDEX8, fGL.fWidth, fGL.fHeight);
|
||||
|
||||
if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) {
|
||||
NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER));
|
||||
}
|
||||
|
||||
W = fGL.fWidth;
|
||||
H = fGL.fHeight;
|
||||
#else
|
||||
CGRect rect = [self bounds];
|
||||
W = (int)CGRectGetWidth(rect);
|
||||
H = (int)CGRectGetHeight(rect);
|
||||
#endif
|
||||
|
||||
printf("---- layoutSubviews %d %d\n", W, H);
|
||||
fWind->resize(W, H);
|
||||
fWind->inval(NULL);
|
||||
}
|
||||
|
||||
#ifdef USE_GL
|
||||
#include "SkDevice.h"
|
||||
|
||||
- (void)drawInGL {
|
||||
// This application only creates a single context which is already set current at this point.
|
||||
// This call is redundant, but needed if dealing with multiple contexts.
|
||||
[EAGLContext setCurrentContext:fGL.fContext];
|
||||
|
||||
// This application only creates a single default framebuffer which is already bound at this point.
|
||||
// This call is redundant, but needed if dealing with multiple framebuffers.
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, fGL.fFramebuffer);
|
||||
|
||||
GLint scissorEnable;
|
||||
glGetIntegerv(GL_SCISSOR_TEST, &scissorEnable);
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
glClearColor(0,0,0,0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (scissorEnable) {
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
}
|
||||
glViewport(0, 0, fWind->width(), fWind->height());
|
||||
|
||||
|
||||
GrContext* ctx = fDevManager->getGrContext();
|
||||
SkASSERT(NULL != ctx);
|
||||
|
||||
SkCanvas canvas;
|
||||
canvas.setDevice(new SkGpuDevice(ctx, SkGpuDevice::Current3DApiRenderTarget()))->unref();
|
||||
|
||||
// if we're not "retained", then we have to always redraw everything.
|
||||
// This call forces us to ignore the fDirtyRgn, and draw everywhere.
|
||||
// If we are "retained", we can skip this call (as the raster case does)
|
||||
fWind->forceInvalAll();
|
||||
|
||||
[self drawWithCanvas:&canvas];
|
||||
|
||||
// This application only creates a single color renderbuffer which is already bound at this point.
|
||||
// This call is redundant, but needed if dealing with multiple renderbuffers.
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, fGL.fRenderbuffer);
|
||||
[fGL.fContext presentRenderbuffer:GL_RENDERBUFFER];
|
||||
|
||||
#if GR_COLLECT_STATS
|
||||
// static int frame = 0;
|
||||
// if (!(frame % 100)) {
|
||||
// ctx->printStats();
|
||||
// }
|
||||
// ctx->resetStats();
|
||||
// ++frame;
|
||||
#endif
|
||||
}
|
||||
|
||||
#else // raster case
|
||||
|
||||
- (void)drawRect:(CGRect)rect {
|
||||
SkCanvas canvas;
|
||||
canvas.setBitmapDevice(fWind->getBitmap());
|
||||
[self drawWithCanvas:&canvas];
|
||||
}
|
||||
#endif
|
||||
|
||||
//Gesture Handlers
|
||||
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
for (UITouch *touch in touches) {
|
||||
CGPoint loc = [touch locationInView:self];
|
||||
fWind->handleClick(loc.x, loc.y, SkView::Click::kDown_State, touch);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
for (UITouch *touch in touches) {
|
||||
CGPoint loc = [touch locationInView:self];
|
||||
fWind->handleClick(loc.x, loc.y, SkView::Click::kMoved_State, touch);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
for (UITouch *touch in touches) {
|
||||
CGPoint loc = [touch locationInView:self];
|
||||
fWind->handleClick(loc.x, loc.y, SkView::Click::kUp_State, touch);
|
||||
}
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
|
||||
for (UITouch *touch in touches) {
|
||||
CGPoint loc = [touch locationInView:self];
|
||||
fWind->handleClick(loc.x, loc.y, SkView::Click::kUp_State, touch);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
- (void)setSkTitle:(const char *)title {
|
||||
NSString* text = [NSString stringWithUTF8String:title];
|
||||
if ([text length] > 0)
|
||||
self.fTitle = text;
|
||||
|
||||
if (fTitleItem && fTitle) {
|
||||
fTitleItem.title = [NSString stringWithFormat:@"%@%@", fTitle,
|
||||
[NSString stringWithUTF8String:fFPSState->str.c_str()]];
|
||||
}
|
||||
}
|
||||
|
||||
- (BOOL)onHandleEvent:(const SkEvent&)evt {
|
||||
#ifdef USE_GL
|
||||
if (evt.isType(kREDRAW_UIVIEW_GL)) {
|
||||
[self drawInGL];
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
- (void)postInvalWithRect:(const SkIRect*)r {
|
||||
#ifdef USE_GL
|
||||
|
||||
#if 1
|
||||
if (!fRedrawRequestPending) {
|
||||
fRedrawRequestPending = true;
|
||||
/*
|
||||
performSelectorOnMainThread seems to starve updating other views
|
||||
(e.g. our FPS view in the titlebar), so we use the afterDelay
|
||||
version
|
||||
*/
|
||||
if (0) {
|
||||
[self performSelectorOnMainThread:@selector(drawInGL) withObject:nil waitUntilDone:NO];
|
||||
} else {
|
||||
[self performSelector:@selector(drawInGL) withObject:nil afterDelay:0];
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (!fRedrawRequestPending) {
|
||||
SkEvent* evt = new SkEvent(kREDRAW_UIVIEW_GL);
|
||||
evt->post(fWind->getSinkID());
|
||||
fRedrawRequestPending = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#else
|
||||
if (r) {
|
||||
[self setNeedsDisplayInRect:CGRectMake(r->fLeft, r->fTop,
|
||||
r->width(), r->height())];
|
||||
} else {
|
||||
[self setNeedsDisplay];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@end
|
7
experimental/iOSSampleApp/Shared/SkiOSNotifier.h
Normal file
7
experimental/iOSSampleApp/Shared/SkiOSNotifier.h
Normal file
@ -0,0 +1,7 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@interface SkIOSNotifier : NSObject
|
||||
- (void)receiveSkEvent:(NSNotification*)notification;
|
||||
+ (void)postTimedSkEvent:(NSTimeInterval)ti;
|
||||
+ (void)timerFireMethod:(NSTimer*)theTimer;
|
||||
@end
|
58
experimental/iOSSampleApp/Shared/SkiOSNotifier.mm
Normal file
58
experimental/iOSSampleApp/Shared/SkiOSNotifier.mm
Normal file
@ -0,0 +1,58 @@
|
||||
#import "SkIOSNotifier.h"
|
||||
#import "SkEvent.h"
|
||||
#define SkEventClass @"SkEvenClass"
|
||||
@implementation SkIOSNotifier
|
||||
//Overwritten from NSObject
|
||||
- (id)init {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
//Register as an observer for SkEventClass events and call
|
||||
//receiveSkEvent: upon receiving the event
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(receiveSkEvent:)
|
||||
name:SkEventClass
|
||||
object:nil];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
-(BOOL) acceptsFirstResponder {
|
||||
return YES;
|
||||
}
|
||||
|
||||
//SkEvent Handers
|
||||
- (void)receiveSkEvent:(NSNotification *)notification {
|
||||
if(SkEvent::ProcessEvent())
|
||||
SkEvent::SignalNonEmptyQueue();
|
||||
}
|
||||
|
||||
+ (void)postTimedSkEvent:(NSTimeInterval)timeInterval {
|
||||
[NSTimer scheduledTimerWithTimeInterval:timeInterval target:self
|
||||
selector:@selector(timerFireMethod:)
|
||||
userInfo:nil repeats:NO];
|
||||
}
|
||||
|
||||
+ (void)timerFireMethod:(NSTimer*)theTimer {
|
||||
SkEvent::ServiceQueueTimer();
|
||||
}
|
||||
|
||||
@end
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
void SkEvent::SignalNonEmptyQueue() {
|
||||
//post a SkEventClass event to the default notification center
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:SkEventClass
|
||||
object:nil];
|
||||
}
|
||||
|
||||
void SkEvent::SignalQueueTimer(SkMSec delay) {
|
||||
if (delay) {
|
||||
//Convert to seconds
|
||||
NSTimeInterval ti = delay/(float)SK_MSec1;
|
||||
[SkIOSNotifier postTimedSkEvent:ti];
|
||||
}
|
||||
}
|
36
experimental/iOSSampleApp/SkiOSDeviceManager.h
Normal file
36
experimental/iOSSampleApp/SkiOSDeviceManager.h
Normal file
@ -0,0 +1,36 @@
|
||||
#ifndef SkiOSDeviceManager_DEFINED
|
||||
#define SkiOSDeviceManager_DEFINED
|
||||
#include "SampleApp.h"
|
||||
#include "SkCanvas.h"
|
||||
#include "GrContext.h"
|
||||
#include "GrGLInterface.h"
|
||||
#include "SkGpuDevice.h"
|
||||
#include "SkCGUtils.h"
|
||||
#include "GrContext.h"
|
||||
class SkiOSDeviceManager : public SampleWindow::DeviceManager {
|
||||
public:
|
||||
SkiOSDeviceManager();
|
||||
virtual ~SkiOSDeviceManager();
|
||||
|
||||
virtual void init(SampleWindow* win);
|
||||
|
||||
virtual bool supportsDeviceType(SampleWindow::DeviceType dType);
|
||||
virtual bool prepareCanvas(SampleWindow::DeviceType dType,
|
||||
SkCanvas* canvas,
|
||||
SampleWindow* win);
|
||||
virtual void publishCanvas(SampleWindow::DeviceType dType,
|
||||
SkCanvas* canvas,
|
||||
SampleWindow* win);
|
||||
|
||||
virtual void windowSizeChanged(SampleWindow* win) {}
|
||||
|
||||
bool isUsingGL() { return usingGL; }
|
||||
|
||||
virtual GrContext* getGrContext() { return fGrContext; }
|
||||
private:
|
||||
bool usingGL;
|
||||
GrContext* fGrContext;
|
||||
GrRenderTarget* fGrRenderTarget;
|
||||
};
|
||||
|
||||
#endif
|
@ -9,7 +9,6 @@
|
||||
/* Begin PBXBuildFile section */
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; };
|
||||
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
|
||||
26075E6013C506560034339C /* SkAlertPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 26075E5F13C506560034339C /* SkAlertPrompt.m */; };
|
||||
260E00D513B11F5B0064D447 /* bitmapfilters.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E001513B11F5B0064D447 /* bitmapfilters.cpp */; };
|
||||
260E00D613B11F5B0064D447 /* blurs.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E001613B11F5B0064D447 /* blurs.cpp */; };
|
||||
260E00D713B11F5B0064D447 /* complexclip.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E001713B11F5B0064D447 /* complexclip.cpp */; };
|
||||
@ -23,7 +22,6 @@
|
||||
260E00DF13B11F5B0064D447 /* shapes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002013B11F5B0064D447 /* shapes.cpp */; };
|
||||
260E00E013B11F5B0064D447 /* tilemodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002113B11F5B0064D447 /* tilemodes.cpp */; };
|
||||
260E00E113B11F5B0064D447 /* xfermodes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002213B11F5B0064D447 /* xfermodes.cpp */; };
|
||||
260E00E213B11F5B0064D447 /* ClockFaceView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002413B11F5B0064D447 /* ClockFaceView.cpp */; };
|
||||
260E00E313B11F5B0064D447 /* OverView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002513B11F5B0064D447 /* OverView.cpp */; };
|
||||
260E00E413B11F5B0064D447 /* SampleAARects.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002613B11F5B0064D447 /* SampleAARects.cpp */; };
|
||||
260E00E513B11F5B0064D447 /* SampleAll.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002713B11F5B0064D447 /* SampleAll.cpp */; };
|
||||
@ -224,7 +222,6 @@
|
||||
260E041013B122D40064D447 /* GrContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03D713B122D40064D447 /* GrContext.cpp */; };
|
||||
260E041113B122D40064D447 /* GrCreatePathRenderer_none.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03D813B122D40064D447 /* GrCreatePathRenderer_none.cpp */; };
|
||||
260E041213B122D40064D447 /* GrDrawTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03D913B122D40064D447 /* GrDrawTarget.cpp */; };
|
||||
260E041313B122D40064D447 /* GrGLDefaultInterface_none.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03DA13B122D40064D447 /* GrGLDefaultInterface_none.cpp */; };
|
||||
260E041413B122D40064D447 /* GrGLIndexBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03DB13B122D40064D447 /* GrGLIndexBuffer.cpp */; };
|
||||
260E041513B122D40064D447 /* GrGLInterface.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03DC13B122D40064D447 /* GrGLInterface.cpp */; };
|
||||
260E041613B122D40064D447 /* GrGLProgram.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E03DD13B122D40064D447 /* GrGLProgram.cpp */; };
|
||||
@ -327,7 +324,6 @@
|
||||
260E05E013B123E80064D447 /* SkWindow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E05C813B123E80064D447 /* SkWindow.cpp */; };
|
||||
260E05FE13B124210064D447 /* SkDOM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E05F713B124210064D447 /* SkDOM.cpp */; };
|
||||
260E060113B124210064D447 /* SkXMLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E05FA13B124210064D447 /* SkXMLParser.cpp */; };
|
||||
260E069013B127CC0064D447 /* SampleApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002913B11F5B0064D447 /* SampleApp.cpp */; };
|
||||
260E075313B127E00064D447 /* SkAnimateActive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E06BC13B127E00064D447 /* SkAnimateActive.cpp */; };
|
||||
260E075413B127E00064D447 /* SkAnimateBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E06BE13B127E00064D447 /* SkAnimateBase.cpp */; };
|
||||
260E075513B127E00064D447 /* SkAnimateField.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E06C013B127E00064D447 /* SkAnimateField.cpp */; };
|
||||
@ -415,7 +411,6 @@
|
||||
260E087F13B12B6F0064D447 /* SkFontHost_mac_coretext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E029813B1225D0064D447 /* SkFontHost_mac_coretext.cpp */; };
|
||||
260E095713B134C90064D447 /* FlingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E095513B134C90064D447 /* FlingState.cpp */; };
|
||||
260E095813B134C90064D447 /* GrDrawMesh.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E095613B134C90064D447 /* GrDrawMesh.cpp */; };
|
||||
260E0AC513B1401D0064D447 /* SkIOSNotifier.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260E0AC413B1401D0064D447 /* SkIOSNotifier.mm */; };
|
||||
260E147913B2734E0064D447 /* SkUISplitViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260E147813B2734E0064D447 /* SkUISplitViewController.mm */; };
|
||||
260E16E613B2853F0064D447 /* SampleGM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E004413B11F5B0064D447 /* SampleGM.cpp */; };
|
||||
260E16F013B285540064D447 /* SampleFuzz.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E004313B11F5B0064D447 /* SampleFuzz.cpp */; };
|
||||
@ -434,18 +429,26 @@
|
||||
260E1EAC13B3B15A0064D447 /* SkPDFTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E1EA013B3B15A0064D447 /* SkPDFTypes.cpp */; };
|
||||
260E1EAD13B3B15A0064D447 /* SkPDFUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E1EA113B3B15A0064D447 /* SkPDFUtils.cpp */; };
|
||||
260EE9D513AFA7850064D447 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 260EE9D013AFA7850064D447 /* CoreFoundation.framework */; };
|
||||
260EEDCD13AFCBF30064D447 /* SkOSWindow_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EE8BC13AFA7790064D447 /* SkOSWindow_iOS.mm */; };
|
||||
260EEDD713AFCC740064D447 /* SkUIView_shell.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EEA2D13AFB1C70064D447 /* SkUIView_shell.mm */; };
|
||||
260EF18513AFD62E0064D447 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 260EF18413AFD62E0064D447 /* CoreText.framework */; };
|
||||
260EF2B013AFDBD30064D447 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
|
||||
260EFB7113B0DBFF0064D447 /* SkUIRootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EFB7013B0DBFF0064D447 /* SkUIRootViewController.mm */; };
|
||||
260EFBA513B0DF600064D447 /* SkUIDetailViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EFBA413B0DF600064D447 /* SkUIDetailViewController.mm */; };
|
||||
263BE75813CCC7BF00CCE991 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 263BE75713CCC7BF00CCE991 /* QuartzCore.framework */; };
|
||||
2662AB7013BD067900CDE7E9 /* SkiOSSampleApp-Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2662AB6F13BD067900CDE7E9 /* SkiOSSampleApp-Debug.xcconfig */; };
|
||||
2662AB7613BD0C0D00CDE7E9 /* SkiOSSampleApp-Release.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2662AB7513BD0C0D00CDE7E9 /* SkiOSSampleApp-Release.xcconfig */; };
|
||||
2662AB7813BD0C1E00CDE7E9 /* SkiOSSampleApp-Base.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 2662AB7713BD0C1E00CDE7E9 /* SkiOSSampleApp-Base.xcconfig */; };
|
||||
26677D6613B4C548009319B8 /* SkData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26677D6513B4C548009319B8 /* SkData.cpp */; };
|
||||
267D09CE13C64FB600A06CB1 /* ClockFaceView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E002413B11F5B0064D447 /* ClockFaceView.cpp */; };
|
||||
268F31FE13CDE72D003A1EF2 /* SkSockets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 268F31FA13CDE726003A1EF2 /* SkSockets.cpp */; };
|
||||
26962B2313CDF6A00039B1FB /* SkOSFile_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EE8BB13AFA7790064D447 /* SkOSFile_iOS.mm */; };
|
||||
26962C7D13CE256E0039B1FB /* SkAlertPrompt.m in Sources */ = {isa = PBXBuildFile; fileRef = 26962C7313CE256E0039B1FB /* SkAlertPrompt.m */; };
|
||||
26962C7F13CE256E0039B1FB /* SkiOSNotifier.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26962C7713CE256E0039B1FB /* SkiOSNotifier.mm */; };
|
||||
26962C8013CE256E0039B1FB /* SkUIDetailViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26962C7913CE256E0039B1FB /* SkUIDetailViewController.mm */; };
|
||||
26962C8113CE256E0039B1FB /* SkUIRootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26962C7B13CE256E0039B1FB /* SkUIRootViewController.mm */; };
|
||||
26962CA413CE265C0039B1FB /* SkOSWindow_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26962CA313CE265C0039B1FB /* SkOSWindow_iOS.mm */; };
|
||||
26962CAB13CE268A0039B1FB /* SampleApp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26962CA913CE268A0039B1FB /* SampleApp.cpp */; };
|
||||
26962CEC13CE293A0039B1FB /* SkColorPalette.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26962CE813CE293A0039B1FB /* SkColorPalette.cpp */; };
|
||||
26962CED13CE293A0039B1FB /* SkNetPipeController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26962CEA13CE293A0039B1FB /* SkNetPipeController.cpp */; };
|
||||
26962D4F13CE2D780039B1FB /* GrGLDefaultInterface_iOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26962D4E13CE2D780039B1FB /* GrGLDefaultInterface_iOS.cpp */; };
|
||||
26E0E40A13B4E67800866555 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 260EE9D113AFA7850064D447 /* OpenGLES.framework */; };
|
||||
26E0E46413B4F28A00866555 /* SkOSFile_iOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 260EE8BB13AFA7790064D447 /* SkOSFile_iOS.mm */; };
|
||||
26F548C213B918EC007CC564 /* SkBlitter_4444.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E022313B1225D0064D447 /* SkBlitter_4444.cpp */; };
|
||||
26F548C313B918ED007CC564 /* SkBlitter_A1.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E022413B1225D0064D447 /* SkBlitter_A1.cpp */; };
|
||||
26F548C413B918ED007CC564 /* SkBlitter_A8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 260E022513B1225D0064D447 /* SkBlitter_A8.cpp */; };
|
||||
@ -460,6 +463,7 @@
|
||||
26F548E913B91980007CC564 /* SkBitmapProcState_opts_arm.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F548E013B91980007CC564 /* SkBitmapProcState_opts_arm.cpp */; };
|
||||
26F548EC13B91980007CC564 /* SkBlitRow_opts_none.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F548E413B91980007CC564 /* SkBlitRow_opts_none.cpp */; };
|
||||
26F548ED13B91980007CC564 /* SkUtils_opts_none.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26F548E613B91980007CC564 /* SkUtils_opts_none.cpp */; };
|
||||
26FB98D313D0C87000ACBEA0 /* SkUIView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26FB98D213D0C87000ACBEA0 /* SkUIView.mm */; };
|
||||
2860E328111B887F00E27156 /* AppDelegate_iPhone.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2860E326111B887F00E27156 /* AppDelegate_iPhone.mm */; };
|
||||
2860E329111B887F00E27156 /* MainWindow_iPhone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2860E327111B887F00E27156 /* MainWindow_iPhone.xib */; };
|
||||
2860E32E111B888700E27156 /* AppDelegate_iPad.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2860E32C111B888700E27156 /* AppDelegate_iPad.mm */; };
|
||||
@ -471,8 +475,6 @@
|
||||
1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
|
||||
1D6058910D05DD3D006BFB54 /* iOSSampleApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSSampleApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
26075E5E13C506560034339C /* SkAlertPrompt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkAlertPrompt.h; sourceTree = "<group>"; };
|
||||
26075E5F13C506560034339C /* SkAlertPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SkAlertPrompt.m; sourceTree = "<group>"; };
|
||||
260E001513B11F5B0064D447 /* bitmapfilters.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bitmapfilters.cpp; sourceTree = "<group>"; };
|
||||
260E001613B11F5B0064D447 /* blurs.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = blurs.cpp; sourceTree = "<group>"; };
|
||||
260E001713B11F5B0064D447 /* complexclip.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = complexclip.cpp; sourceTree = "<group>"; };
|
||||
@ -492,7 +494,6 @@
|
||||
260E002613B11F5B0064D447 /* SampleAARects.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleAARects.cpp; sourceTree = "<group>"; };
|
||||
260E002713B11F5B0064D447 /* SampleAll.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleAll.cpp; sourceTree = "<group>"; };
|
||||
260E002813B11F5B0064D447 /* SampleAnimator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleAnimator.cpp; sourceTree = "<group>"; };
|
||||
260E002913B11F5B0064D447 /* SampleApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SampleApp.cpp; path = ../../samplecode/SampleApp.cpp; sourceTree = "<group>"; };
|
||||
260E002A13B11F5B0064D447 /* SampleArc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleArc.cpp; sourceTree = "<group>"; };
|
||||
260E002B13B11F5B0064D447 /* SampleAvoid.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleAvoid.cpp; sourceTree = "<group>"; };
|
||||
260E002C13B11F5B0064D447 /* SampleBigGradient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SampleBigGradient.cpp; sourceTree = "<group>"; };
|
||||
@ -954,7 +955,6 @@
|
||||
260E03FA13B122D40064D447 /* gr_unittests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gr_unittests.cpp; sourceTree = "<group>"; };
|
||||
260E03FC13B122D40064D447 /* SkGpuCanvas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkGpuCanvas.h; sourceTree = "<group>"; };
|
||||
260E03FD13B122D40064D447 /* SkGpuDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkGpuDevice.h; sourceTree = "<group>"; };
|
||||
260E03FE13B122D40064D447 /* SkGpuDeviceFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkGpuDeviceFactory.h; sourceTree = "<group>"; };
|
||||
260E03FF13B122D40064D447 /* SkGr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkGr.h; sourceTree = "<group>"; };
|
||||
260E040013B122D40064D447 /* SkGrTexturePixelRef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkGrTexturePixelRef.h; sourceTree = "<group>"; };
|
||||
260E040213B122D40064D447 /* GrPrintf_skia.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GrPrintf_skia.cpp; sourceTree = "<group>"; };
|
||||
@ -1289,17 +1289,11 @@
|
||||
260E080E13B1294E0064D447 /* SkImageDecoder_CG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkImageDecoder_CG.cpp; sourceTree = "<group>"; };
|
||||
260E083B13B12A200064D447 /* SkImageDecoder_Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkImageDecoder_Factory.cpp; sourceTree = "<group>"; };
|
||||
260E083C13B12A200064D447 /* SkImageEncoder_Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkImageEncoder_Factory.cpp; sourceTree = "<group>"; };
|
||||
260E08CF13B12DBE0064D447 /* SkOSWindow_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkOSWindow_iOS.h; path = ../../include/views/SkOSWindow_iOS.h; sourceTree = SOURCE_ROOT; };
|
||||
260E08D013B12DBE0064D447 /* SkStream_NSData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkStream_NSData.h; path = ../../include/utils/ios/SkStream_NSData.h; sourceTree = SOURCE_ROOT; };
|
||||
260E095513B134C90064D447 /* FlingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FlingState.cpp; sourceTree = "<group>"; };
|
||||
260E095613B134C90064D447 /* GrDrawMesh.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GrDrawMesh.cpp; sourceTree = "<group>"; };
|
||||
260E0AC313B1401D0064D447 /* SkIOSNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkIOSNotifier.h; sourceTree = "<group>"; };
|
||||
260E0AC413B1401D0064D447 /* SkIOSNotifier.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkIOSNotifier.mm; sourceTree = "<group>"; };
|
||||
260E147713B2734E0064D447 /* SkUISplitViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUISplitViewController.h; sourceTree = "<group>"; };
|
||||
260E147813B2734E0064D447 /* SkUISplitViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUISplitViewController.mm; sourceTree = "<group>"; };
|
||||
260E157613B27A4E0064D447 /* SampleApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SampleApp.h; path = ../../samplecode/SampleApp.h; sourceTree = "<group>"; };
|
||||
260E1B9D13B38E310064D447 /* SkUIView_withSkUIContainerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUIView_withSkUIContainerView.h; sourceTree = "<group>"; };
|
||||
260E1B9E13B38E310064D447 /* SkUIView_withSkUIContainerView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUIView_withSkUIContainerView.mm; sourceTree = "<group>"; };
|
||||
260E1DCA13B3AA490064D447 /* SkUINavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUINavigationController.h; sourceTree = "<group>"; };
|
||||
260E1DCB13B3AA490064D447 /* SkUINavigationController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUINavigationController.mm; sourceTree = "<group>"; };
|
||||
260E1E8913B3B13B0064D447 /* SkPDFCatalog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkPDFCatalog.h; path = ../../include/pdf/SkPDFCatalog.h; sourceTree = SOURCE_ROOT; };
|
||||
@ -1328,24 +1322,38 @@
|
||||
260E1EA113B3B15A0064D447 /* SkPDFUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkPDFUtils.cpp; path = ../../src/pdf/SkPDFUtils.cpp; sourceTree = SOURCE_ROOT; };
|
||||
260EE8BA13AFA7790064D447 /* SkFontHost_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkFontHost_iOS.mm; path = ../../src/utils/ios/SkFontHost_iOS.mm; sourceTree = SOURCE_ROOT; };
|
||||
260EE8BB13AFA7790064D447 /* SkOSFile_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkOSFile_iOS.mm; path = ../../src/utils/ios/SkOSFile_iOS.mm; sourceTree = SOURCE_ROOT; };
|
||||
260EE8BC13AFA7790064D447 /* SkOSWindow_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkOSWindow_iOS.mm; path = ../../src/utils/ios/SkOSWindow_iOS.mm; sourceTree = SOURCE_ROOT; };
|
||||
260EE8BF13AFA7790064D447 /* SkStream_NSData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkStream_NSData.mm; path = ../../src/utils/ios/SkStream_NSData.mm; sourceTree = SOURCE_ROOT; };
|
||||
260EE9D013AFA7850064D447 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
|
||||
260EE9D113AFA7850064D447 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
|
||||
260EEA2C13AFB1C70064D447 /* SkUIView_shell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUIView_shell.h; sourceTree = "<group>"; };
|
||||
260EEA2D13AFB1C70064D447 /* SkUIView_shell.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUIView_shell.mm; sourceTree = "<group>"; };
|
||||
260EEC9313AFC5CA0064D447 /* SkUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkUIView.h; path = ../../gpu/include/SkUIView.h; sourceTree = SOURCE_ROOT; };
|
||||
260EEC9413AFC5D60064D447 /* SkUIView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkUIView.mm; path = ../../gpu/src/ios/SkUIView.mm; sourceTree = SOURCE_ROOT; };
|
||||
260EF18413AFD62E0064D447 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = System/Library/Frameworks/CoreText.framework; sourceTree = SDKROOT; };
|
||||
260EFB6F13B0DBFF0064D447 /* SkUIRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUIRootViewController.h; sourceTree = "<group>"; };
|
||||
260EFB7013B0DBFF0064D447 /* SkUIRootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUIRootViewController.mm; sourceTree = "<group>"; };
|
||||
260EFBA313B0DF600064D447 /* SkUIDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkUIDetailViewController.h; sourceTree = "<group>"; };
|
||||
260EFBA413B0DF600064D447 /* SkUIDetailViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SkUIDetailViewController.mm; sourceTree = "<group>"; };
|
||||
263BE75713CCC7BF00CCE991 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
|
||||
2662AB6F13BD067900CDE7E9 /* SkiOSSampleApp-Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "SkiOSSampleApp-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||
2662AB7513BD0C0D00CDE7E9 /* SkiOSSampleApp-Release.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "SkiOSSampleApp-Release.xcconfig"; sourceTree = "<group>"; };
|
||||
2662AB7713BD0C1E00CDE7E9 /* SkiOSSampleApp-Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = "SkiOSSampleApp-Base.xcconfig"; sourceTree = "<group>"; };
|
||||
26677D6413B4C53E009319B8 /* SkData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkData.h; path = core/SkData.h; sourceTree = "<group>"; };
|
||||
26677D6513B4C548009319B8 /* SkData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkData.cpp; path = core/SkData.cpp; sourceTree = "<group>"; };
|
||||
266CB66113CF56E30011139A /* SkiOSDeviceManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SkiOSDeviceManager.h; sourceTree = "<group>"; };
|
||||
268F31FA13CDE726003A1EF2 /* SkSockets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkSockets.cpp; path = ../SkSockets.cpp; sourceTree = "<group>"; };
|
||||
268F31FB13CDE726003A1EF2 /* SkSockets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkSockets.h; path = ../SkSockets.h; sourceTree = "<group>"; };
|
||||
26962C7213CE256E0039B1FB /* SkAlertPrompt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkAlertPrompt.h; path = Shared/SkAlertPrompt.h; sourceTree = "<group>"; };
|
||||
26962C7313CE256E0039B1FB /* SkAlertPrompt.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SkAlertPrompt.m; path = Shared/SkAlertPrompt.m; sourceTree = "<group>"; };
|
||||
26962C7613CE256E0039B1FB /* SkiOSNotifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkiOSNotifier.h; path = Shared/SkiOSNotifier.h; sourceTree = "<group>"; };
|
||||
26962C7713CE256E0039B1FB /* SkiOSNotifier.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkiOSNotifier.mm; path = Shared/SkiOSNotifier.mm; sourceTree = "<group>"; };
|
||||
26962C7813CE256E0039B1FB /* SkUIDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkUIDetailViewController.h; path = Shared/SkUIDetailViewController.h; sourceTree = "<group>"; };
|
||||
26962C7913CE256E0039B1FB /* SkUIDetailViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkUIDetailViewController.mm; path = Shared/SkUIDetailViewController.mm; sourceTree = "<group>"; };
|
||||
26962C7A13CE256E0039B1FB /* SkUIRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkUIRootViewController.h; path = Shared/SkUIRootViewController.h; sourceTree = "<group>"; };
|
||||
26962C7B13CE256E0039B1FB /* SkUIRootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkUIRootViewController.mm; path = Shared/SkUIRootViewController.mm; sourceTree = "<group>"; };
|
||||
26962C8E13CE25D60039B1FB /* iOSSampleApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iOSSampleApp_Prefix.pch; sourceTree = "<group>"; };
|
||||
26962C8F13CE25D60039B1FB /* iOSSampleApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iOSSampleApp-Info.plist"; sourceTree = "<group>"; };
|
||||
26962CA313CE265C0039B1FB /* SkOSWindow_iOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkOSWindow_iOS.mm; path = ../../src/utils/ios/SkOSWindow_iOS.mm; sourceTree = SOURCE_ROOT; };
|
||||
26962CA513CE26730039B1FB /* SkOSWindow_iOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkOSWindow_iOS.h; path = ../../include/views/SkOSWindow_iOS.h; sourceTree = SOURCE_ROOT; };
|
||||
26962CA913CE268A0039B1FB /* SampleApp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SampleApp.cpp; path = ../../samplecode/SampleApp.cpp; sourceTree = SOURCE_ROOT; };
|
||||
26962CAA13CE268A0039B1FB /* SampleApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SampleApp.h; path = ../../samplecode/SampleApp.h; sourceTree = SOURCE_ROOT; };
|
||||
26962CE813CE293A0039B1FB /* SkColorPalette.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkColorPalette.cpp; path = Shared/DrawingBoard/SkColorPalette.cpp; sourceTree = "<group>"; };
|
||||
26962CE913CE293A0039B1FB /* SkColorPalette.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkColorPalette.h; path = Shared/DrawingBoard/SkColorPalette.h; sourceTree = "<group>"; };
|
||||
26962CEA13CE293A0039B1FB /* SkNetPipeController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SkNetPipeController.cpp; path = Shared/DrawingBoard/SkNetPipeController.cpp; sourceTree = "<group>"; };
|
||||
26962CEB13CE293A0039B1FB /* SkNetPipeController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkNetPipeController.h; path = Shared/DrawingBoard/SkNetPipeController.h; sourceTree = "<group>"; };
|
||||
26962D4E13CE2D780039B1FB /* GrGLDefaultInterface_iOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GrGLDefaultInterface_iOS.cpp; path = ../../gpu/src/ios/GrGLDefaultInterface_iOS.cpp; sourceTree = SOURCE_ROOT; };
|
||||
26E0E5C913B5299E00866555 /* SkGPipe.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkGPipe.h; path = ../../include/pipe/SkGPipe.h; sourceTree = SOURCE_ROOT; };
|
||||
26F548DF13B91980007CC564 /* opts_check_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = opts_check_arm.cpp; sourceTree = "<group>"; };
|
||||
26F548E013B91980007CC564 /* SkBitmapProcState_opts_arm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SkBitmapProcState_opts_arm.cpp; sourceTree = "<group>"; };
|
||||
@ -1375,6 +1383,8 @@
|
||||
26F5492313B91C51007CC564 /* GrGLDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrGLDefines.h; sourceTree = "<group>"; };
|
||||
26F5492413B91C51007CC564 /* GrTemplates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrTemplates.h; sourceTree = "<group>"; };
|
||||
26F5492713B91CA1007CC564 /* SkTypeface_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkTypeface_mac.h; path = include/ports/SkTypeface_mac.h; sourceTree = "<group>"; };
|
||||
26FB98D113D0C87000ACBEA0 /* SkUIView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SkUIView.h; path = Shared/SkUIView.h; sourceTree = "<group>"; };
|
||||
26FB98D213D0C87000ACBEA0 /* SkUIView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = SkUIView.mm; path = Shared/SkUIView.mm; sourceTree = "<group>"; };
|
||||
2860E325111B887F00E27156 /* AppDelegate_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate_iPhone.h; sourceTree = "<group>"; };
|
||||
2860E326111B887F00E27156 /* AppDelegate_iPhone.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate_iPhone.mm; sourceTree = "<group>"; };
|
||||
2860E327111B887F00E27156 /* MainWindow_iPhone.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPhone.xib; sourceTree = "<group>"; };
|
||||
@ -1383,8 +1393,6 @@
|
||||
2860E32D111B888700E27156 /* MainWindow_iPad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MainWindow_iPad.xib; sourceTree = "<group>"; };
|
||||
288765FC0DF74451002DB57D /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
|
||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = Shared/main.m; sourceTree = "<group>"; };
|
||||
32CA4F630368D1EE00C91783 /* iOSSampleApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iOSSampleApp_Prefix.pch; sourceTree = "<group>"; };
|
||||
8D1107310486CEB800E47090 /* iOSSampleApp-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "iOSSampleApp-Info.plist"; plistStructureDefinitionIdentifier = "com.apple.xcode.plist.structure-definition.iphone.info-plist"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -1398,6 +1406,7 @@
|
||||
260EF18513AFD62E0064D447 /* CoreText.framework in Frameworks */,
|
||||
260EF2B013AFDBD30064D447 /* Foundation.framework in Frameworks */,
|
||||
26E0E40A13B4E67800866555 /* OpenGLES.framework in Frameworks */,
|
||||
263BE75813CCC7BF00CCE991 /* QuartzCore.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -1535,8 +1544,8 @@
|
||||
260E013413B11F7A0064D447 /* SampleApp */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
260E157613B27A4E0064D447 /* SampleApp.h */,
|
||||
260E002913B11F5B0064D447 /* SampleApp.cpp */,
|
||||
26962CAA13CE268A0039B1FB /* SampleApp.h */,
|
||||
26962CA913CE268A0039B1FB /* SampleApp.cpp */,
|
||||
260E001413B11F5B0064D447 /* gm */,
|
||||
260E002313B11F5B0064D447 /* samplecode */,
|
||||
);
|
||||
@ -2011,10 +2020,6 @@
|
||||
260E03C813B122D40064D447 /* src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
260E03C913B122D40064D447 /* mac */,
|
||||
260E03CB13B122D40064D447 /* mesa */,
|
||||
260E03CD13B122D40064D447 /* unix */,
|
||||
260E03CF13B122D40064D447 /* win */,
|
||||
260E095513B134C90064D447 /* FlingState.cpp */,
|
||||
260E095613B134C90064D447 /* GrDrawMesh.cpp */,
|
||||
260E03D113B122D40064D447 /* GrAllocPool.cpp */,
|
||||
@ -2063,40 +2068,11 @@
|
||||
path = src;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
260E03C913B122D40064D447 /* mac */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = mac;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
260E03CB13B122D40064D447 /* mesa */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = mesa;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
260E03CD13B122D40064D447 /* unix */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = unix;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
260E03CF13B122D40064D447 /* win */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = win;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
260E03FB13B122D40064D447 /* include */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
260E03FC13B122D40064D447 /* SkGpuCanvas.h */,
|
||||
260E03FD13B122D40064D447 /* SkGpuDevice.h */,
|
||||
260E03FE13B122D40064D447 /* SkGpuDeviceFactory.h */,
|
||||
260E03FF13B122D40064D447 /* SkGr.h */,
|
||||
260E040013B122D40064D447 /* SkGrTexturePixelRef.h */,
|
||||
);
|
||||
@ -2724,18 +2700,50 @@
|
||||
260EE8B913AFA7790064D447 /* iOS */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26FB98D113D0C87000ACBEA0 /* SkUIView.h */,
|
||||
26FB98D213D0C87000ACBEA0 /* SkUIView.mm */,
|
||||
266CB66113CF56E30011139A /* SkiOSDeviceManager.h */,
|
||||
26962D4E13CE2D780039B1FB /* GrGLDefaultInterface_iOS.cpp */,
|
||||
26962CA513CE26730039B1FB /* SkOSWindow_iOS.h */,
|
||||
26962CA313CE265C0039B1FB /* SkOSWindow_iOS.mm */,
|
||||
260EE8BB13AFA7790064D447 /* SkOSFile_iOS.mm */,
|
||||
260EE8BA13AFA7790064D447 /* SkFontHost_iOS.mm */,
|
||||
260E08D013B12DBE0064D447 /* SkStream_NSData.h */,
|
||||
260EE8BF13AFA7790064D447 /* SkStream_NSData.mm */,
|
||||
260EEC9413AFC5D60064D447 /* SkUIView.mm */,
|
||||
260EEC9313AFC5CA0064D447 /* SkUIView.h */,
|
||||
260E1B9D13B38E310064D447 /* SkUIView_withSkUIContainerView.h */,
|
||||
260E1B9E13B38E310064D447 /* SkUIView_withSkUIContainerView.mm */,
|
||||
260EE8BB13AFA7790064D447 /* SkOSFile_iOS.mm */,
|
||||
);
|
||||
name = iOS;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26962CC813CE27390039B1FB /* xcconfig */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2662AB6F13BD067900CDE7E9 /* SkiOSSampleApp-Debug.xcconfig */,
|
||||
2662AB7513BD0C0D00CDE7E9 /* SkiOSSampleApp-Release.xcconfig */,
|
||||
2662AB7713BD0C1E00CDE7E9 /* SkiOSSampleApp-Base.xcconfig */,
|
||||
);
|
||||
name = xcconfig;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26962CE713CE29120039B1FB /* DrawingBoard */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
26962CE813CE293A0039B1FB /* SkColorPalette.cpp */,
|
||||
26962CE913CE293A0039B1FB /* SkColorPalette.h */,
|
||||
26962CEA13CE293A0039B1FB /* SkNetPipeController.cpp */,
|
||||
26962CEB13CE293A0039B1FB /* SkNetPipeController.h */,
|
||||
);
|
||||
name = DrawingBoard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
26F67B2A13CB3564005DDCD2 /* Networking */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
268F31FA13CDE726003A1EF2 /* SkSockets.cpp */,
|
||||
268F31FB13CDE726003A1EF2 /* SkSockets.h */,
|
||||
);
|
||||
name = Networking;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
2860E324111B887F00E27156 /* iPhone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -2763,18 +2771,14 @@
|
||||
28EEBF621118D79A00187D67 /* Shared */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
260EFB6F13B0DBFF0064D447 /* SkUIRootViewController.h */,
|
||||
260EFB7013B0DBFF0064D447 /* SkUIRootViewController.mm */,
|
||||
260EFBA313B0DF600064D447 /* SkUIDetailViewController.h */,
|
||||
260EFBA413B0DF600064D447 /* SkUIDetailViewController.mm */,
|
||||
260EEA2C13AFB1C70064D447 /* SkUIView_shell.h */,
|
||||
260EEA2D13AFB1C70064D447 /* SkUIView_shell.mm */,
|
||||
260E08CF13B12DBE0064D447 /* SkOSWindow_iOS.h */,
|
||||
260EE8BC13AFA7790064D447 /* SkOSWindow_iOS.mm */,
|
||||
260E0AC313B1401D0064D447 /* SkIOSNotifier.h */,
|
||||
260E0AC413B1401D0064D447 /* SkIOSNotifier.mm */,
|
||||
26075E5E13C506560034339C /* SkAlertPrompt.h */,
|
||||
26075E5F13C506560034339C /* SkAlertPrompt.m */,
|
||||
26962C7213CE256E0039B1FB /* SkAlertPrompt.h */,
|
||||
26962C7313CE256E0039B1FB /* SkAlertPrompt.m */,
|
||||
26962C7613CE256E0039B1FB /* SkiOSNotifier.h */,
|
||||
26962C7713CE256E0039B1FB /* SkiOSNotifier.mm */,
|
||||
26962C7813CE256E0039B1FB /* SkUIDetailViewController.h */,
|
||||
26962C7913CE256E0039B1FB /* SkUIDetailViewController.mm */,
|
||||
26962C7A13CE256E0039B1FB /* SkUIRootViewController.h */,
|
||||
26962C7B13CE256E0039B1FB /* SkUIRootViewController.mm */,
|
||||
);
|
||||
name = Shared;
|
||||
sourceTree = "<group>";
|
||||
@ -2788,9 +2792,6 @@
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
||||
2662AB6F13BD067900CDE7E9 /* SkiOSSampleApp-Debug.xcconfig */,
|
||||
2662AB7513BD0C0D00CDE7E9 /* SkiOSSampleApp-Release.xcconfig */,
|
||||
2662AB7713BD0C1E00CDE7E9 /* SkiOSSampleApp-Base.xcconfig */,
|
||||
);
|
||||
name = CustomTemplate;
|
||||
sourceTree = "<group>";
|
||||
@ -2798,12 +2799,15 @@
|
||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
26962C8E13CE25D60039B1FB /* iOSSampleApp_Prefix.pch */,
|
||||
26962C8F13CE25D60039B1FB /* iOSSampleApp-Info.plist */,
|
||||
26962CC813CE27390039B1FB /* xcconfig */,
|
||||
26F67B2A13CB3564005DDCD2 /* Networking */,
|
||||
26962CE713CE29120039B1FB /* DrawingBoard */,
|
||||
260EE8B913AFA7790064D447 /* iOS */,
|
||||
260E013413B11F7A0064D447 /* SampleApp */,
|
||||
260EE81F13AFA7790064D447 /* Skia */,
|
||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
||||
32CA4F630368D1EE00C91783 /* iOSSampleApp_Prefix.pch */,
|
||||
8D1107310486CEB800E47090 /* iOSSampleApp-Info.plist */,
|
||||
);
|
||||
name = "Other Sources";
|
||||
sourceTree = "<group>";
|
||||
@ -2817,6 +2821,7 @@
|
||||
260EE9D013AFA7850064D447 /* CoreFoundation.framework */,
|
||||
288765FC0DF74451002DB57D /* CoreGraphics.framework */,
|
||||
260EF18413AFD62E0064D447 /* CoreText.framework */,
|
||||
263BE75713CCC7BF00CCE991 /* QuartzCore.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
@ -2888,10 +2893,6 @@
|
||||
1D60589B0D05DD56006BFB54 /* main.m in Sources */,
|
||||
2860E328111B887F00E27156 /* AppDelegate_iPhone.mm in Sources */,
|
||||
2860E32E111B888700E27156 /* AppDelegate_iPad.mm in Sources */,
|
||||
260EEDCD13AFCBF30064D447 /* SkOSWindow_iOS.mm in Sources */,
|
||||
260EEDD713AFCC740064D447 /* SkUIView_shell.mm in Sources */,
|
||||
260EFB7113B0DBFF0064D447 /* SkUIRootViewController.mm in Sources */,
|
||||
260EFBA513B0DF600064D447 /* SkUIDetailViewController.mm in Sources */,
|
||||
260E00D513B11F5B0064D447 /* bitmapfilters.cpp in Sources */,
|
||||
260E00D613B11F5B0064D447 /* blurs.cpp in Sources */,
|
||||
260E00D713B11F5B0064D447 /* complexclip.cpp in Sources */,
|
||||
@ -2905,7 +2906,6 @@
|
||||
260E00DF13B11F5B0064D447 /* shapes.cpp in Sources */,
|
||||
260E00E013B11F5B0064D447 /* tilemodes.cpp in Sources */,
|
||||
260E00E113B11F5B0064D447 /* xfermodes.cpp in Sources */,
|
||||
260E00E213B11F5B0064D447 /* ClockFaceView.cpp in Sources */,
|
||||
260E00E313B11F5B0064D447 /* OverView.cpp in Sources */,
|
||||
260E00E413B11F5B0064D447 /* SampleAARects.cpp in Sources */,
|
||||
260E00E513B11F5B0064D447 /* SampleAll.cpp in Sources */,
|
||||
@ -3106,7 +3106,6 @@
|
||||
260E041013B122D40064D447 /* GrContext.cpp in Sources */,
|
||||
260E041113B122D40064D447 /* GrCreatePathRenderer_none.cpp in Sources */,
|
||||
260E041213B122D40064D447 /* GrDrawTarget.cpp in Sources */,
|
||||
260E041313B122D40064D447 /* GrGLDefaultInterface_none.cpp in Sources */,
|
||||
260E041413B122D40064D447 /* GrGLIndexBuffer.cpp in Sources */,
|
||||
260E041513B122D40064D447 /* GrGLInterface.cpp in Sources */,
|
||||
260E041613B122D40064D447 /* GrGLProgram.cpp in Sources */,
|
||||
@ -3209,7 +3208,6 @@
|
||||
260E05E013B123E80064D447 /* SkWindow.cpp in Sources */,
|
||||
260E05FE13B124210064D447 /* SkDOM.cpp in Sources */,
|
||||
260E060113B124210064D447 /* SkXMLParser.cpp in Sources */,
|
||||
260E069013B127CC0064D447 /* SampleApp.cpp in Sources */,
|
||||
260E075313B127E00064D447 /* SkAnimateActive.cpp in Sources */,
|
||||
260E075413B127E00064D447 /* SkAnimateBase.cpp in Sources */,
|
||||
260E075513B127E00064D447 /* SkAnimateField.cpp in Sources */,
|
||||
@ -3297,7 +3295,6 @@
|
||||
260E087F13B12B6F0064D447 /* SkFontHost_mac_coretext.cpp in Sources */,
|
||||
260E095713B134C90064D447 /* FlingState.cpp in Sources */,
|
||||
260E095813B134C90064D447 /* GrDrawMesh.cpp in Sources */,
|
||||
260E0AC513B1401D0064D447 /* SkIOSNotifier.mm in Sources */,
|
||||
260E147913B2734E0064D447 /* SkUISplitViewController.mm in Sources */,
|
||||
260E16E613B2853F0064D447 /* SampleGM.cpp in Sources */,
|
||||
260E16F013B285540064D447 /* SampleFuzz.cpp in Sources */,
|
||||
@ -3316,7 +3313,6 @@
|
||||
260E1EAC13B3B15A0064D447 /* SkPDFTypes.cpp in Sources */,
|
||||
260E1EAD13B3B15A0064D447 /* SkPDFUtils.cpp in Sources */,
|
||||
26677D6613B4C548009319B8 /* SkData.cpp in Sources */,
|
||||
26E0E46413B4F28A00866555 /* SkOSFile_iOS.mm in Sources */,
|
||||
26F548C213B918EC007CC564 /* SkBlitter_4444.cpp in Sources */,
|
||||
26F548C313B918ED007CC564 /* SkBlitter_A1.cpp in Sources */,
|
||||
26F548C413B918ED007CC564 /* SkBlitter_A8.cpp in Sources */,
|
||||
@ -3331,7 +3327,19 @@
|
||||
26F548E913B91980007CC564 /* SkBitmapProcState_opts_arm.cpp in Sources */,
|
||||
26F548EC13B91980007CC564 /* SkBlitRow_opts_none.cpp in Sources */,
|
||||
26F548ED13B91980007CC564 /* SkUtils_opts_none.cpp in Sources */,
|
||||
26075E6013C506560034339C /* SkAlertPrompt.m in Sources */,
|
||||
267D09CE13C64FB600A06CB1 /* ClockFaceView.cpp in Sources */,
|
||||
268F31FE13CDE72D003A1EF2 /* SkSockets.cpp in Sources */,
|
||||
26962B2313CDF6A00039B1FB /* SkOSFile_iOS.mm in Sources */,
|
||||
26962C7D13CE256E0039B1FB /* SkAlertPrompt.m in Sources */,
|
||||
26962C7F13CE256E0039B1FB /* SkiOSNotifier.mm in Sources */,
|
||||
26962C8013CE256E0039B1FB /* SkUIDetailViewController.mm in Sources */,
|
||||
26962C8113CE256E0039B1FB /* SkUIRootViewController.mm in Sources */,
|
||||
26962CA413CE265C0039B1FB /* SkOSWindow_iOS.mm in Sources */,
|
||||
26962CAB13CE268A0039B1FB /* SampleApp.cpp in Sources */,
|
||||
26962CEC13CE293A0039B1FB /* SkColorPalette.cpp in Sources */,
|
||||
26962CED13CE293A0039B1FB /* SkNetPipeController.cpp in Sources */,
|
||||
26962D4F13CE2D780039B1FB /* GrGLDefaultInterface_iOS.cpp in Sources */,
|
||||
26FB98D313D0C87000ACBEA0 /* SkUIView.mm in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -3378,7 +3386,7 @@
|
||||
SK_DEBUG,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
PREBINDING = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
@ -3398,7 +3406,7 @@
|
||||
SK_BUILD_FOR_IOS,
|
||||
);
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = NO;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
|
||||
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
|
||||
PREBINDING = NO;
|
||||
|
@ -5,11 +5,8 @@
|
||||
@synthesize window, splitViewController;
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
|
||||
// Override point for customization after application launch.
|
||||
[window addSubview:[splitViewController view]];
|
||||
[window makeKeyAndVisible];
|
||||
[splitViewController loadData];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
<archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="7.10">
|
||||
<data>
|
||||
<int key="IBDocument.SystemTarget">1056</int>
|
||||
<string key="IBDocument.SystemVersion">10J4138</string>
|
||||
<string key="IBDocument.SystemVersion">10K540</string>
|
||||
<string key="IBDocument.InterfaceBuilderVersion">851</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.35</string>
|
||||
<string key="IBDocument.AppKitVersion">1038.36</string>
|
||||
<string key="IBDocument.HIToolboxVersion">461.00</string>
|
||||
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
|
||||
<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
@ -12,7 +12,7 @@
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<integer value="52"/>
|
||||
<integer value="143"/>
|
||||
</object>
|
||||
<object class="NSArray" key="IBDocument.PluginDependencies">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
@ -125,122 +125,155 @@
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIViewController" key="IBUIDetailViewController" id="324576857">
|
||||
<object class="IBUIView" key="IBUIView" id="662500735">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUINavigationBar" id="532491637">
|
||||
<reference key="NSNextResponder" ref="662500735"/>
|
||||
<int key="NSvFlags">290</int>
|
||||
<string key="NSFrameSize">{768, 44}</string>
|
||||
<reference key="NSSuperview" ref="662500735"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIBarStyle">1</int>
|
||||
<object class="NSArray" key="IBUIItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUINavigationItem" id="719745349">
|
||||
<reference key="IBUINavigationBar" ref="532491637"/>
|
||||
<string key="IBUITitle">Title</string>
|
||||
<object class="IBUIBarButtonItem" key="IBUIRightBarButtonItem" id="271380391">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUINavigationItem" ref="719745349"/>
|
||||
<int key="IBUISystemItemIdentifier">9</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUIToolbar" id="872721022">
|
||||
<reference key="NSNextResponder" ref="662500735"/>
|
||||
<int key="NSvFlags">266</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUISwitch" id="241745124">
|
||||
<reference key="NSNextResponder" ref="872721022"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{584, 9}, {94, 27}}</string>
|
||||
<reference key="NSSuperview" ref="872721022"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{0, 960}, {768, 44}}</string>
|
||||
<reference key="NSSuperview" ref="662500735"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIBarStyle">1</int>
|
||||
<object class="NSMutableArray" key="IBUIItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIBarButtonItem" id="732530149">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<reference key="IBUIToolbar" ref="872721022"/>
|
||||
<int key="IBUISystemItemIdentifier">5</int>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="829573230">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<float key="IBUIWidth">55</float>
|
||||
<reference key="IBUIToolbar" ref="872721022"/>
|
||||
<int key="IBUISystemItemIdentifier">6</int>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="780237299">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUICustomView" ref="241745124"/>
|
||||
<reference key="IBUIToolbar" ref="872721022"/>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="247862273">
|
||||
<string key="IBUITitle">Server iP</string>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUIToolbar" ref="872721022"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUILabel" id="65333785">
|
||||
<reference key="NSNextResponder" ref="662500735"/>
|
||||
<int key="NSvFlags">265</int>
|
||||
<string key="NSFrame">{{526, 967}, {49, 29}}</string>
|
||||
<reference key="NSSuperview" ref="662500735"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<string key="IBUIText">Pipe</string>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">24</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="IBUITextColor" ref="933040628"/>
|
||||
<reference key="IBUIHighlightedColor" ref="933040628"/>
|
||||
<int key="IBUIBaselineAdjustment">1</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{768, 1004}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="IBUIBackgroundColor" ref="933040628"/>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<reference key="IBUIToolbarItems" ref="0"/>
|
||||
<object class="IBUINavigationController" key="IBUIDetailViewController" id="1006871283">
|
||||
<reference key="IBUIParentViewController" ref="143532475"/>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
|
||||
<int key="IBUIStatusBarStyle">2</int>
|
||||
</object>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
<object class="IBUINavigationBar" key="IBUINavigationBar" id="210980145">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">256</int>
|
||||
<string key="NSFrameSize">{0, 0}</string>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIBarStyle">1</int>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="IBUIViewControllers">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIViewController" id="659859393">
|
||||
<object class="IBUIView" key="IBUIView" id="879616490">
|
||||
<reference key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIToolbar" id="1016878395">
|
||||
<reference key="NSNextResponder" ref="879616490"/>
|
||||
<int key="NSvFlags">-2147483382</int>
|
||||
<object class="NSMutableArray" key="NSSubviews">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUISwitch" id="822261752">
|
||||
<reference key="NSNextResponder" ref="1016878395"/>
|
||||
<int key="NSvFlags">292</int>
|
||||
<string key="NSFrame">{{584, 9}, {94, 27}}</string>
|
||||
<reference key="NSSuperview" ref="1016878395"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIContentHorizontalAlignment">0</int>
|
||||
<int key="IBUIContentVerticalAlignment">0</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrame">{{0, 916}, {768, 44}}</string>
|
||||
<reference key="NSSuperview" ref="879616490"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIBarStyle">1</int>
|
||||
<object class="NSMutableArray" key="IBUIItems">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBUIBarButtonItem" id="565718">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<reference key="IBUIToolbar" ref="1016878395"/>
|
||||
<int key="IBUISystemItemIdentifier">5</int>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="328568987">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<float key="IBUIWidth">306</float>
|
||||
<reference key="IBUIToolbar" ref="1016878395"/>
|
||||
<int key="IBUISystemItemIdentifier">6</int>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="267525560">
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUICustomView" ref="822261752"/>
|
||||
<reference key="IBUIToolbar" ref="1016878395"/>
|
||||
</object>
|
||||
<object class="IBUIBarButtonItem" id="377478105">
|
||||
<string key="IBUITitle">Server iP</string>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<reference key="IBUIToolbar" ref="1016878395"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUILabel" id="706652129">
|
||||
<reference key="NSNextResponder" ref="879616490"/>
|
||||
<int key="NSvFlags">265</int>
|
||||
<string key="NSFrame">{{525, 923}, {49, 29}}</string>
|
||||
<reference key="NSSuperview" ref="879616490"/>
|
||||
<bool key="IBUIOpaque">NO</bool>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<int key="IBUIContentMode">7</int>
|
||||
<bool key="IBUIUserInteractionEnabled">NO</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<string key="IBUIText">Pipe</string>
|
||||
<object class="NSFont" key="IBUIFont">
|
||||
<string key="NSName">Helvetica</string>
|
||||
<double key="NSSize">24</double>
|
||||
<int key="NSfFlags">16</int>
|
||||
</object>
|
||||
<reference key="IBUITextColor" ref="933040628"/>
|
||||
<reference key="IBUIHighlightedColor" ref="933040628"/>
|
||||
<int key="IBUIBaselineAdjustment">1</int>
|
||||
<float key="IBUIMinimumFontSize">10</float>
|
||||
<int key="IBUITextAlignment">1</int>
|
||||
</object>
|
||||
</object>
|
||||
<string key="NSFrameSize">{768, 960}</string>
|
||||
<reference key="NSSuperview"/>
|
||||
<reference key="IBUIBackgroundColor" ref="933040628"/>
|
||||
<bool key="IBUIMultipleTouchEnabled">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<reference key="IBUIToolbarItems" ref="0"/>
|
||||
<object class="IBUINavigationItem" key="IBUINavigationItem" id="245890386">
|
||||
<reference key="IBUINavigationBar"/>
|
||||
<string key="IBUITitle">Title</string>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
</object>
|
||||
<reference key="IBUIParentViewController" ref="1006871283"/>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBUITableViewController" id="714935080">
|
||||
<object class="IBUITableView" key="IBUIView" id="999117554">
|
||||
<nil key="NSNextResponder"/>
|
||||
<int key="NSvFlags">274</int>
|
||||
<string key="NSFrame">{{184, 202}, {400, 600}}</string>
|
||||
<object class="NSColor" key="IBUIBackgroundColor">
|
||||
<int key="NSColorSpace">1</int>
|
||||
<bytes key="NSRGB">MCAwIDAgMAA</bytes>
|
||||
</object>
|
||||
<bool key="IBUIClipsSubviews">YES</bool>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIAlwaysBounceVertical">YES</bool>
|
||||
<int key="IBUIStyle">1</int>
|
||||
<int key="IBUISeparatorStyle">2</int>
|
||||
<int key="IBUISectionIndexMinimumDisplayRowCount">0</int>
|
||||
<bool key="IBUIShowsSelectionImmediatelyOnTouchBegin">YES</bool>
|
||||
<float key="IBUIRowHeight">44</float>
|
||||
<float key="IBUISectionHeaderHeight">10</float>
|
||||
</object>
|
||||
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics">
|
||||
<int key="IBUIStatusBarStyle">2</int>
|
||||
</object>
|
||||
<object class="IBUISimulatedOrientationMetrics" key="IBUISimulatedOrientationMetrics">
|
||||
<int key="interfaceOrientation">1</int>
|
||||
</object>
|
||||
<string key="targetRuntimeIdentifier">IBIPadFramework</string>
|
||||
<bool key="IBUIHorizontal">NO</bool>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBObjectContainer" key="IBDocument.Objects">
|
||||
<object class="NSMutableArray" key="connectionRecords">
|
||||
@ -269,14 +302,6 @@
|
||||
</object>
|
||||
<int key="connectionID">69</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fNavigationBar</string>
|
||||
<reference key="source" ref="324576857"/>
|
||||
<reference key="destination" ref="532491637"/>
|
||||
</object>
|
||||
<int key="connectionID">83</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fRoot</string>
|
||||
@ -285,14 +310,6 @@
|
||||
</object>
|
||||
<int key="connectionID">85</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fDetail</string>
|
||||
<reference key="source" ref="143532475"/>
|
||||
<reference key="destination" ref="324576857"/>
|
||||
</object>
|
||||
<int key="connectionID">86</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">rootViewController</string>
|
||||
@ -317,38 +334,54 @@
|
||||
</object>
|
||||
<int key="connectionID">93</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fPrintButton</string>
|
||||
<reference key="source" ref="324576857"/>
|
||||
<reference key="destination" ref="271380391"/>
|
||||
</object>
|
||||
<int key="connectionID">95</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">printContent:</string>
|
||||
<reference key="source" ref="271380391"/>
|
||||
<reference key="destination" ref="324576857"/>
|
||||
</object>
|
||||
<int key="connectionID">96</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">usePipe:</string>
|
||||
<reference key="source" ref="241745124"/>
|
||||
<reference key="destination" ref="324576857"/>
|
||||
<reference key="source" ref="822261752"/>
|
||||
<reference key="destination" ref="659859393"/>
|
||||
<int key="IBEventType">13</int>
|
||||
</object>
|
||||
<int key="connectionID">110</int>
|
||||
<int key="connectionID">159</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchEventConnection" key="connection">
|
||||
<string key="label">enterServerIP:</string>
|
||||
<reference key="source" ref="247862273"/>
|
||||
<reference key="destination" ref="324576857"/>
|
||||
<reference key="source" ref="377478105"/>
|
||||
<reference key="destination" ref="659859393"/>
|
||||
</object>
|
||||
<int key="connectionID">129</int>
|
||||
<int key="connectionID">161</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fNavigationBar</string>
|
||||
<reference key="source" ref="659859393"/>
|
||||
<reference key="destination" ref="210980145"/>
|
||||
</object>
|
||||
<int key="connectionID">171</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">fDetail</string>
|
||||
<reference key="source" ref="143532475"/>
|
||||
<reference key="destination" ref="659859393"/>
|
||||
</object>
|
||||
<int key="connectionID">172</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">delegate</string>
|
||||
<reference key="source" ref="999117554"/>
|
||||
<reference key="destination" ref="714935080"/>
|
||||
</object>
|
||||
<int key="connectionID">191</int>
|
||||
</object>
|
||||
<object class="IBConnectionRecord">
|
||||
<object class="IBCocoaTouchOutletConnection" key="connection">
|
||||
<string key="label">dataSource</string>
|
||||
<reference key="source" ref="999117554"/>
|
||||
<reference key="destination" ref="714935080"/>
|
||||
</object>
|
||||
<int key="connectionID">192</int>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBMutableOrderedSet" key="objectRecords">
|
||||
@ -390,7 +423,7 @@
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="524408385"/>
|
||||
<reference ref="324576857"/>
|
||||
<reference ref="1006871283"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
@ -404,15 +437,6 @@
|
||||
</object>
|
||||
<reference key="parent" ref="143532475"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">54</int>
|
||||
<reference key="object" ref="324576857"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="662500735"/>
|
||||
</object>
|
||||
<reference key="parent" ref="143532475"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">55</int>
|
||||
<reference key="object" ref="714382558"/>
|
||||
@ -433,90 +457,113 @@
|
||||
<reference key="object" ref="136024681"/>
|
||||
<reference key="parent" ref="714382558"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">63</int>
|
||||
<reference key="object" ref="662500735"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="532491637"/>
|
||||
<reference ref="872721022"/>
|
||||
<reference ref="65333785"/>
|
||||
</object>
|
||||
<reference key="parent" ref="324576857"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">89</int>
|
||||
<reference key="object" ref="805122470"/>
|
||||
<reference key="parent" ref="714382558"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">64</int>
|
||||
<reference key="object" ref="532491637"/>
|
||||
<int key="objectID">138</int>
|
||||
<reference key="object" ref="1006871283"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="719745349"/>
|
||||
<reference ref="659859393"/>
|
||||
<reference ref="210980145"/>
|
||||
</object>
|
||||
<reference key="parent" ref="662500735"/>
|
||||
<reference key="parent" ref="143532475"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">71</int>
|
||||
<reference key="object" ref="719745349"/>
|
||||
<int key="objectID">142</int>
|
||||
<reference key="object" ref="659859393"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="271380391"/>
|
||||
<reference ref="245890386"/>
|
||||
<reference ref="879616490"/>
|
||||
</object>
|
||||
<reference key="parent" ref="532491637"/>
|
||||
<reference key="parent" ref="1006871283"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">94</int>
|
||||
<reference key="object" ref="271380391"/>
|
||||
<reference key="parent" ref="719745349"/>
|
||||
<int key="objectID">140</int>
|
||||
<reference key="object" ref="210980145"/>
|
||||
<reference key="parent" ref="1006871283"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">106</int>
|
||||
<reference key="object" ref="872721022"/>
|
||||
<int key="objectID">162</int>
|
||||
<reference key="object" ref="245890386"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="732530149"/>
|
||||
<reference ref="829573230"/>
|
||||
<reference ref="780237299"/>
|
||||
<reference ref="247862273"/>
|
||||
</object>
|
||||
<reference key="parent" ref="662500735"/>
|
||||
<reference key="parent" ref="659859393"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">113</int>
|
||||
<reference key="object" ref="732530149"/>
|
||||
<reference key="parent" ref="872721022"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">123</int>
|
||||
<reference key="object" ref="65333785"/>
|
||||
<reference key="parent" ref="662500735"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">126</int>
|
||||
<reference key="object" ref="829573230"/>
|
||||
<reference key="parent" ref="872721022"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">109</int>
|
||||
<reference key="object" ref="780237299"/>
|
||||
<int key="objectID">143</int>
|
||||
<reference key="object" ref="879616490"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="241745124"/>
|
||||
<reference ref="1016878395"/>
|
||||
<reference ref="706652129"/>
|
||||
</object>
|
||||
<reference key="parent" ref="872721022"/>
|
||||
<reference key="parent" ref="659859393"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">108</int>
|
||||
<reference key="object" ref="241745124"/>
|
||||
<reference key="parent" ref="780237299"/>
|
||||
<int key="objectID">147</int>
|
||||
<reference key="object" ref="706652129"/>
|
||||
<reference key="parent" ref="879616490"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">127</int>
|
||||
<reference key="object" ref="247862273"/>
|
||||
<reference key="parent" ref="872721022"/>
|
||||
<int key="objectID">146</int>
|
||||
<reference key="object" ref="1016878395"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="565718"/>
|
||||
<reference ref="328568987"/>
|
||||
<reference ref="267525560"/>
|
||||
<reference ref="377478105"/>
|
||||
</object>
|
||||
<reference key="parent" ref="879616490"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">151</int>
|
||||
<reference key="object" ref="565718"/>
|
||||
<reference key="parent" ref="1016878395"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">150</int>
|
||||
<reference key="object" ref="328568987"/>
|
||||
<reference key="parent" ref="1016878395"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">149</int>
|
||||
<reference key="object" ref="267525560"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="822261752"/>
|
||||
</object>
|
||||
<reference key="parent" ref="1016878395"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">148</int>
|
||||
<reference key="object" ref="377478105"/>
|
||||
<reference key="parent" ref="1016878395"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">152</int>
|
||||
<reference key="object" ref="822261752"/>
|
||||
<reference key="parent" ref="267525560"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">185</int>
|
||||
<reference key="object" ref="714935080"/>
|
||||
<object class="NSMutableArray" key="children">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<reference ref="999117554"/>
|
||||
</object>
|
||||
<reference key="parent" ref="0"/>
|
||||
</object>
|
||||
<object class="IBObjectRecord">
|
||||
<int key="objectID">190</int>
|
||||
<reference key="object" ref="999117554"/>
|
||||
<reference key="parent" ref="714935080"/>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@ -526,78 +573,80 @@
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>-1.CustomClassName</string>
|
||||
<string>-2.CustomClassName</string>
|
||||
<string>106.IBPluginDependency</string>
|
||||
<string>106.IBViewBoundsToFrameTransform</string>
|
||||
<string>108.IBPluginDependency</string>
|
||||
<string>113.IBPluginDependency</string>
|
||||
<string>123.IBPluginDependency</string>
|
||||
<string>123.IBViewBoundsToFrameTransform</string>
|
||||
<string>126.IBPluginDependency</string>
|
||||
<string>127.IBPluginDependency</string>
|
||||
<string>138.IBEditorWindowLastContentRect</string>
|
||||
<string>138.IBPluginDependency</string>
|
||||
<string>140.IBPluginDependency</string>
|
||||
<string>142.CustomClassName</string>
|
||||
<string>142.IBPluginDependency</string>
|
||||
<string>143.CustomClassName</string>
|
||||
<string>143.IBPluginDependency</string>
|
||||
<string>143.IBViewBoundsToFrameTransform</string>
|
||||
<string>146.IBPluginDependency</string>
|
||||
<string>146.IBViewBoundsToFrameTransform</string>
|
||||
<string>147.IBPluginDependency</string>
|
||||
<string>147.IBViewBoundsToFrameTransform</string>
|
||||
<string>148.IBPluginDependency</string>
|
||||
<string>150.IBPluginDependency</string>
|
||||
<string>151.IBPluginDependency</string>
|
||||
<string>152.IBPluginDependency</string>
|
||||
<string>185.IBEditorWindowLastContentRect</string>
|
||||
<string>185.IBPluginDependency</string>
|
||||
<string>190.IBPluginDependency</string>
|
||||
<string>2.IBEditorWindowLastContentRect</string>
|
||||
<string>2.IBPluginDependency</string>
|
||||
<string>52.CustomClassName</string>
|
||||
<string>52.IBEditorWindowLastContentRect</string>
|
||||
<string>52.IBPluginDependency</string>
|
||||
<string>53.IBPluginDependency</string>
|
||||
<string>54.CustomClassName</string>
|
||||
<string>54.IBPluginDependency</string>
|
||||
<string>55.CustomClassName</string>
|
||||
<string>55.IBPluginDependency</string>
|
||||
<string>56.IBPluginDependency</string>
|
||||
<string>57.IBPluginDependency</string>
|
||||
<string>6.CustomClassName</string>
|
||||
<string>6.IBPluginDependency</string>
|
||||
<string>63.CustomClassName</string>
|
||||
<string>63.IBPluginDependency</string>
|
||||
<string>63.IBViewBoundsToFrameTransform</string>
|
||||
<string>64.IBPluginDependency</string>
|
||||
<string>64.IBViewBoundsToFrameTransform</string>
|
||||
<string>71.IBPluginDependency</string>
|
||||
<string>89.IBPluginDependency</string>
|
||||
<string>94.IBPluginDependency</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UIApplication</string>
|
||||
<string>UIResponder</string>
|
||||
<string>{{335, 4}, {768, 1024}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUIDetailViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUIView</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAxDqAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAxGsAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAABD8AAAxHiAAA</bytes>
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAABD74AAxGlgAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{269, 480}, {768, 1024}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>{{125, 4}, {768, 1024}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUISplitViewController</string>
|
||||
<string>{{-34, 57}, {768, 1024}}</string>
|
||||
<string>{{35, 4}, {783, 1002}}</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUIDetailViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUIRootViewController</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>AppDelegate_iPad</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>SkUIView_shell</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAxDqAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<object class="NSAffineTransform">
|
||||
<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAwigAAA</bytes>
|
||||
</object>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
|
||||
</object>
|
||||
</object>
|
||||
@ -617,7 +666,7 @@
|
||||
</object>
|
||||
</object>
|
||||
<nil key="sourceID"/>
|
||||
<int key="maxID">129</int>
|
||||
<int key="maxID">193</int>
|
||||
</object>
|
||||
<object class="IBClassDescriber" key="IBDocument.Classes">
|
||||
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
|
||||
@ -670,14 +719,12 @@
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>enterServerIP:</string>
|
||||
<string>printContent:</string>
|
||||
<string>usePipe:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
<string>id</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="actionInfosByName">
|
||||
@ -685,7 +732,6 @@
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>enterServerIP:</string>
|
||||
<string>printContent:</string>
|
||||
<string>usePipe:</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
@ -694,10 +740,6 @@
|
||||
<string key="name">enterServerIP:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">printContent:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
</object>
|
||||
<object class="IBActionInfo">
|
||||
<string key="name">usePipe:</string>
|
||||
<string key="candidateClassName">id</string>
|
||||
@ -705,40 +747,19 @@
|
||||
</object>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="outlets">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>fNavigationBar</string>
|
||||
<string>fPrintButton</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>UINavigationBar</string>
|
||||
<string>UIBarButtonItem</string>
|
||||
</object>
|
||||
<string key="NS.key.0">fNavigationBar</string>
|
||||
<string key="NS.object.0">UINavigationBar</string>
|
||||
</object>
|
||||
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="NSArray" key="dict.sortedKeys">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<string>fNavigationBar</string>
|
||||
<string>fPrintButton</string>
|
||||
</object>
|
||||
<object class="NSMutableArray" key="dict.values">
|
||||
<bool key="EncodedWithXMLCoder">YES</bool>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">fNavigationBar</string>
|
||||
<string key="candidateClassName">UINavigationBar</string>
|
||||
</object>
|
||||
<object class="IBToOneOutletInfo">
|
||||
<string key="name">fPrintButton</string>
|
||||
<string key="candidateClassName">UIBarButtonItem</string>
|
||||
</object>
|
||||
<string key="NS.key.0">fNavigationBar</string>
|
||||
<object class="IBToOneOutletInfo" key="NS.object.0">
|
||||
<string key="name">fNavigationBar</string>
|
||||
<string key="candidateClassName">UINavigationBar</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">SkUIDetailViewController.h</string>
|
||||
<string key="minorKey">Shared/SkUIDetailViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
@ -746,7 +767,7 @@
|
||||
<string key="superclassName">UITableViewController</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">SkUIRootViewController.h</string>
|
||||
<string key="minorKey">Shared/SkUIRootViewController.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
@ -790,11 +811,11 @@
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">SkUIView_shell</string>
|
||||
<string key="className">SkUIView</string>
|
||||
<string key="superclassName">UIView</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBProjectSource</string>
|
||||
<string key="minorKey">SkUIView_shell.h</string>
|
||||
<string key="minorKey">Shared/SkUIView.h</string>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
@ -870,6 +891,20 @@
|
||||
<string key="minorKey">Foundation.framework/Headers/NSURLConnection.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">QuartzCore.framework/Headers/CAAnimation.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
<string key="majorKey">IBFrameworkSource</string>
|
||||
<string key="minorKey">QuartzCore.framework/Headers/CALayer.h</string>
|
||||
</object>
|
||||
</object>
|
||||
<object class="IBPartialClassDescription">
|
||||
<string key="className">NSObject</string>
|
||||
<object class="IBClassDescriptionSource" key="sourceIdentifier">
|
||||
|
@ -10,6 +10,4 @@
|
||||
@property (nonatomic, retain) IBOutlet SkUIRootViewController* fRoot;
|
||||
@property (nonatomic, retain) IBOutlet SkUIDetailViewController* fDetail;
|
||||
|
||||
- (void)loadData;
|
||||
|
||||
@end
|
||||
|
@ -7,14 +7,11 @@
|
||||
return YES; //Auto Rotation for all orientations
|
||||
}
|
||||
|
||||
- (void)loadData {
|
||||
[fRoot initSamples];
|
||||
[fDetail populateRoot:fRoot];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.delegate = self;
|
||||
[fRoot initSamples];
|
||||
[fDetail populateRoot:fRoot];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
|
@ -1,17 +1,13 @@
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "SkUINavigationController.h"
|
||||
|
||||
@interface AppDelegate_iPhone : NSObject <UITableViewDelegate, UIApplicationDelegate> {
|
||||
@interface AppDelegate_iPhone : NSObject <UIApplicationDelegate> {
|
||||
@private
|
||||
UIWindow *window;
|
||||
SkUINavigationController* fRoot;
|
||||
SkUIDetailViewController* fDetail;
|
||||
}
|
||||
@property (nonatomic, retain) IBOutlet UIWindow *window;
|
||||
@property (nonatomic, retain) IBOutlet SkUINavigationController* fRoot;
|
||||
@property (nonatomic, retain) IBOutlet SkUIDetailViewController* fDetail;
|
||||
|
||||
- (IBAction)displaySampleList:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -1,47 +1,18 @@
|
||||
#import "AppDelegate_iPhone.h"
|
||||
|
||||
@implementation AppDelegate_iPhone
|
||||
@synthesize window, fRoot, fDetail;
|
||||
@synthesize window, fRoot;
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
[window addSubview:fDetail.view];
|
||||
[window addSubview:fRoot.view];
|
||||
[fRoot loadData];
|
||||
fDetail.view.hidden = YES;
|
||||
[window makeKeyAndVisible];
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[window release];
|
||||
[fRoot release];
|
||||
[fDetail release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
//Table View Delegate Methods
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[fDetail goToItem:indexPath.row];
|
||||
[UIView transitionWithView:window
|
||||
duration:0.5
|
||||
options:UIViewAnimationOptionTransitionFlipFromRight
|
||||
animations:^{
|
||||
fRoot.view.hidden = YES;
|
||||
fDetail.view.hidden = NO;
|
||||
}
|
||||
completion:NULL];
|
||||
}
|
||||
|
||||
- (IBAction)displaySampleList:(id)sender {
|
||||
[UIView transitionWithView:window
|
||||
duration:0.5
|
||||
options:UIViewAnimationOptionTransitionFlipFromLeft
|
||||
animations:^{
|
||||
fRoot.view.hidden = NO;
|
||||
fDetail.view.hidden = YES;
|
||||
}
|
||||
completion:NULL];
|
||||
}
|
||||
|
||||
@end
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
#import "SkUIRootViewController.h"
|
||||
#import "SkUIDetailViewController.h"
|
||||
|
||||
@interface SkUINavigationController : UINavigationController {
|
||||
@interface SkUINavigationController : UINavigationController <UITableViewDelegate, UINavigationBarDelegate> {
|
||||
@private
|
||||
SkUIRootViewController* fRoot;
|
||||
SkUIDetailViewController* fDetail;
|
||||
@ -10,6 +10,4 @@
|
||||
@property (nonatomic, retain) IBOutlet SkUIRootViewController* fRoot;
|
||||
@property (nonatomic, retain) IBOutlet SkUIDetailViewController* fDetail;
|
||||
|
||||
- (void)loadData;
|
||||
|
||||
@end
|
||||
|
@ -3,9 +3,11 @@
|
||||
@implementation SkUINavigationController
|
||||
@synthesize fRoot, fDetail;
|
||||
|
||||
- (void)loadData {
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[fRoot initSamples];
|
||||
[fDetail populateRoot:fRoot];
|
||||
[self pushViewController:fDetail animated:NO];
|
||||
}
|
||||
|
||||
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
|
||||
@ -18,4 +20,10 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@end
|
||||
//Table View Delegate Methods
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[fDetail goToItem:indexPath.row];
|
||||
[self pushViewController:fDetail animated:YES];
|
||||
}
|
||||
|
||||
@end
|
@ -7,7 +7,7 @@
|
||||
#include "SkOSMenu.h"
|
||||
#include "SkTime.h"
|
||||
#include "SkTypes.h"
|
||||
#import "SkUIView_shell.h"
|
||||
#import "SkUIView.h"
|
||||
#include "SkWindow.h"
|
||||
|
||||
#define kINVAL_UIVIEW_EventType "inval-uiview"
|
||||
@ -31,10 +31,10 @@ bool SkOSWindow::onEvent(const SkEvent& evt) {
|
||||
if (evt.isType(kINVAL_UIVIEW_EventType)) {
|
||||
fInvalEventIsPending = false;
|
||||
const SkIRect& r = this->getDirtyBounds();
|
||||
[(SkUIView_shell*)fHWND postInvalWithRect:&r];
|
||||
[(SkUIView*)fHWND postInvalWithRect:&r];
|
||||
return true;
|
||||
}
|
||||
if ([(SkUIView_shell*)fHWND onHandleEvent:evt]) {
|
||||
if ([(SkUIView*)fHWND onHandleEvent:evt]) {
|
||||
return true;
|
||||
}
|
||||
return this->INHERITED::onEvent(evt);
|
||||
@ -45,7 +45,7 @@ bool SkOSWindow::onDispatchClick(int x, int y, Click::State state, void* owner)
|
||||
}
|
||||
|
||||
void SkOSWindow::onSetTitle(const char title[]) {
|
||||
[(SkUIView_shell*)fHWND setSkTitle:title];
|
||||
[(SkUIView*)fHWND setSkTitle:title];
|
||||
}
|
||||
|
||||
void SkOSWindow::onAddMenu(const SkOSMenu* sk_menu) {
|
||||
|
Loading…
Reference in New Issue
Block a user