Commit b9e86a73 authored by thakis@chromium.org's avatar thakis@chromium.org

mac: Let Carbon plugin stuff buid with the 10.7 SDK

QuickDraw.h is gone, but the frameworks still exports the symbols
on 10.8. So just declare the functions for now, so that we can
build with the 10.7 SDK.

We can remove Carbon plugin support later.

BUG=136844
TEST=none
TBR=stuartmorgan,tony

Review URL: https://chromiumcodereview.appspot.com/10826036

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148647 0039d316-1c4b-4281-b951-d872f2087c98
parent bc99d228
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
......@@ -12,6 +12,17 @@
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if defined(MAC_OS_X_VERSION_10_7) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
// QuickdrawAPI.h is no longer included in the 10.7 SDK, but the symbols are
// still exported by QD.framework (a subframework of ApplicationServices).
// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
extern "C" {
Boolean PtInRect(Point pt, const Rect* r);
void SetCursor(const Cursor* crsr);
}
#endif // 10.7+ SDK
// Returns true if the given window is modal.
static bool IsModalWindow(WindowRef window) {
WindowModality modality = kWindowModalityNone;
......
......@@ -9,6 +9,8 @@
#import "base/basictypes.h"
typedef struct Cursor Cursor;
// This is really a WebPluginDelegateImpl, but that class is private to the
// framework, and these functions are called from a dylib.
typedef void* OpaquePluginRef;
......
......@@ -26,7 +26,7 @@ typedef struct _GdkCursor GdkCursor;
class NSCursor;
#endif
typedef UInt32 ThemeCursor;
struct Cursor;
typedef struct Cursor Cursor;
#endif
class Pickle;
......
......@@ -18,6 +18,19 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
#include "ui/base/resource/resource_bundle.h"
#if defined(MAC_OS_X_VERSION_10_7) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
// The 10.7 SDK no longer has QuickDraw headers.
// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
typedef short Bits16[16];
struct Cursor {
Bits16 data;
Bits16 mask;
Point hotSpot;
};
#endif // 10.7+ SDK
using WebKit::WebCursorInfo;
using WebKit::WebImage;
using WebKit::WebSize;
......
......@@ -43,6 +43,19 @@ using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
#if defined(MAC_OS_X_VERSION_10_7) && \
MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
#ifndef NP_NO_CARBON
// QuickdrawAPI.h is no longer included in the 10.7 SDK, but the symbols are
// still exported by QD.framework (a subframework of ApplicationServices).
// http://developer.apple.com/legacy/mac/library/documentation/Carbon/reference/QuickDraw_Ref/QuickDraw_Ref.pdf
extern "C" {
void SetRect(Rect* r, short left, short top, short right, short bottom);
void OffsetRect(Rect* r, short dh, short dv);
}
#endif // NP_NO_CARBON
#endif // 10.7+ SDK
// Important implementation notes: The Mac definition of NPAPI, particularly
// the distinction between windowed and windowless modes, differs from the
// Windows and Linux definitions. Most of those differences are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment