3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync/* ***** BEGIN LICENSE BLOCK *****
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * The contents of this file are subject to the Mozilla Public License Version
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * 1.1 (the "License"); you may not use this file except in compliance with
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * the License. You may obtain a copy of the License at
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * http://www.mozilla.org/MPL/
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Software distributed under the License is distributed on an "AS IS" basis,
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * for the specific language governing rights and limitations under the
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * License.
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * The Original Code is Java XPCOM Bindings.
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * The Initial Developer of the Original Code is IBM Corporation.
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Portions created by the Initial Developer are Copyright (C) 2006
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * IBM Corporation. All Rights Reserved.
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Contributor(s):
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Javier Pedemonte (jhpedemonte@gmail.com)
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * Alternatively, the contents of this file may be used under the terms of
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * either the GNU General Public License Version 2 or later (the "GPL"), or
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * in which case the provisions of the GPL or the LGPL are applicable instead
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * of those above. If you wish to allow use of your version of this file only
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * under the terms of either the GPL or the LGPL, and not to allow others to
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * use your version of this file under the terms of the MPL, indicate your
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * decision by deleting the provisions above and replace them with the notice
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * and other provisions required by the GPL or the LGPL. If you do not delete
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * the provisions above, a recipient may use your version of this file under
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * the terms of any one of the MPL, the GPL or the LGPL.
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync *
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync * ***** END LICENSE BLOCK ***** */
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync#include <jni.h>
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync#import <JavaVM/jawt_md.h>
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync#include "prtypes.h"
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsyncPRUint64 GetPlatformHandle(JAWT_DrawingSurfaceInfo* dsi)
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync{
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync JAWT_MacOSXDrawingSurfaceInfo* dsi_mac =
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync static_cast<JAWT_MacOSXDrawingSurfaceInfo*> (dsi->platformInfo);
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync return reinterpret_cast<PRUint64> (dsi_mac->cocoaViewRef);
3ac4cd918f9ffed59c4cc988665d1e09c5d7304avboxsync}