javauis/lcdui_akn/javalcdui/src.nokialcdui/CanvasGraphicsItemPainter.cpp
branchRCL_3
changeset 46 4376525cdefb
parent 19 04becd199f91
equal deleted inserted replaced
34:71c436fe3ce0 46:4376525cdefb
    23 // EXTERNAL INCLUDES
    23 // EXTERNAL INCLUDES
    24 #include <MMIDCanvasGraphicsItemPainter.h>
    24 #include <MMIDCanvasGraphicsItemPainter.h>
    25 #include <CMIDToolkit.h>
    25 #include <CMIDToolkit.h>
    26 #include <jutils.h>
    26 #include <jutils.h>
    27 #include <jdebug.h>
    27 #include <jdebug.h>
       
    28 
       
    29 /**
       
    30  * Local helper function for disposing graphics item painter
       
    31  * native side component.
       
    32  *
       
    33  * @param aItem The graphics item painter to be destroyed.
       
    34  */
       
    35 LOCAL_C void Dispose(CMIDToolkit* aToolkit, MMIDCanvasGraphicsItemPainter* aItem)
       
    36 {
       
    37     aToolkit->DisposeObject(aItem);
       
    38 }
       
    39 
       
    40 /*
       
    41  * Class:     com_nokia_mid_ui_CanvasGraphicsItemPainter
       
    42  * Method:    _dispose
       
    43  * Signature: (II)V
       
    44  */
       
    45 JNIEXPORT void JNICALL Java_javax_microedition_lcdui_CanvasGraphicsItemPainter__1dispose(
       
    46     JNIEnv* /* aJniEnv */,
       
    47     jobject /* aPeer */,
       
    48     jint aToolkitHandle,
       
    49     jint aNativePeerHandle)
       
    50 {
       
    51     DEBUG("CanvasGraphicsItemPainter.cpp - dispose +");
       
    52 
       
    53     CMIDToolkit* toolkit = JavaUnhand< CMIDToolkit >(aToolkitHandle);
       
    54 
       
    55     MMIDCanvasGraphicsItemPainter* item =
       
    56         MIDUnhandObject<MMIDCanvasGraphicsItemPainter>(aNativePeerHandle);
       
    57 
       
    58     toolkit->ExecuteV(&Dispose, toolkit, item);
       
    59 
       
    60     DEBUG("CanvasGraphicsItemPainter.cpp - dispose -");
       
    61 }
    28 
    62 
    29 LOCAL_C void CreateNativePeerL
    63 LOCAL_C void CreateNativePeerL
    30 (
    64 (
    31     CMIDToolkit* aToolkit,
    65     CMIDToolkit* aToolkit,
    32     jobject aPeer,
    66     jobject aPeer,