javauis/lcdui_akn/javalcdui/src/ImageLoader.cpp
branchRCL_3
changeset 26 2455ef1f5bbc
parent 14 04becd199f91
equal deleted inserted replaced
25:ae942d28ec0e 26:2455ef1f5bbc
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 //
       
    18 // ImageLoader.cpp
       
    19 //
       
    20 //
       
    21 #include "javax_microedition_lcdui_ImageLoader.h"
       
    22 #include "CMIDImageLoader.h"
       
    23 
       
    24 //
       
    25 //
       
    26 //
       
    27 JNIEXPORT jint JNICALL
       
    28 Java_javax_microedition_lcdui_ImageLoader__1create
       
    29 (
       
    30     JNIEnv* aJni,
       
    31     jobject aLoader,
       
    32     jint    aServerHandle,
       
    33     jint    aToolkitHandle
       
    34 )
       
    35 {
       
    36     return CMIDImageLoader::New(*aJni, aLoader, aServerHandle, aToolkitHandle);
       
    37 }
       
    38 
       
    39 //
       
    40 //
       
    41 //
       
    42 JNIEXPORT void JNICALL
       
    43 Java_javax_microedition_lcdui_ImageLoader__1destroy
       
    44 (
       
    45     JNIEnv* aJni,
       
    46     jobject /*aLoader*/,
       
    47     jint    aHandle
       
    48 )
       
    49 {
       
    50     JavaUnhand<CMIDImageLoader>(aHandle)->Dispose(*aJni);
       
    51 }
       
    52 
       
    53 //
       
    54 //
       
    55 //
       
    56 JNIEXPORT jint JNICALL
       
    57 Java_javax_microedition_lcdui_ImageLoader__1append
       
    58 (
       
    59     JNIEnv*     aJni,
       
    60     jobject     /*aLoader*/,
       
    61     jint        aHandle,
       
    62     jbyteArray  aArray,
       
    63     jint        aOffset,
       
    64     jint        aCount
       
    65 )
       
    66 {
       
    67     return JavaUnhand<CMIDImageLoader>(aHandle)->AppendJni(*aJni, aArray, aOffset, aCount);
       
    68 }
       
    69 
       
    70 JNIEXPORT jint JNICALL
       
    71 Java_javax_microedition_lcdui_ImageLoader__1decode
       
    72 (
       
    73     JNIEnv* aJni,
       
    74     jobject /*aLoader*/,
       
    75     jint    aHandle
       
    76 )
       
    77 {
       
    78     return JavaUnhand<CMIDImageLoader>(aHandle)->AsyncDecodeJni(*aJni);
       
    79 }