/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#import <Cocoa/Cocoa.h>
#import "GeomUtilities.h"
#import "ThreadUtilities.h"
#import "sun_lwawt_macosx_CImage.h"
static void CImage_CopyArrayIntoNSImageRep
{
int x, y;
// TODO: test this on big endian systems (not sure if its correct)...
for (y = 0; y < height; y++) {
for (x = 0; x < width; x++) {
}
}
}
static void CImage_CopyNSImageIntoArray
{
CGContextRef cgRef = CGBitmapContextCreate(dstPixels, width, height, 8, width * 4, colorspace, kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host);
fraction:1.0];
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCreateNSImageFromArray
* Signature: ([III)J
*/
{
bitsPerPixel:32];
}
return result;
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCreateNSImageFromIconSelector
* Signature: (I)J
*/
{
}
return ptr_to_jlong(image);
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCreateNSImageFromFileContents
*/
{
return ptr_to_jlong(image);
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCreateNSImageOfFileFromLaunchServices
*/
{
}];
return ptr_to_jlong(image);
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCreateNSImageFromImageName
*/
{
return ptr_to_jlong(image);
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeCopyNSImageIntoArray
* Signature: (J[III)V
*/
{
if (dst) {
}
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeGetNSImageSize
* Signature: (J)Ljava/awt/geom/Dimension2D;
*/
{
return size;
}
/*
* Class: sun_lwawt_macosx_CImage
* Method: nativeSetNSImageSize
* Signature: (JDD)V
*/
{
if (!image) return;
[i setScalesWhenResized:TRUE];
[i setSize:NSMakeSize(w, h)];
}