javauis/lcdui_akn/javalcdui/src.nokialcdui/TextEditorImpl.cpp
branchRCL_3
changeset 23 e5618cc85d74
parent 14 04becd199f91
equal deleted inserted replaced
21:4376525cdefb 23:e5618cc85d74
   384     DEBUG("TextEditorImpl.cpp - setCaretXY -");
   384     DEBUG("TextEditorImpl.cpp - setCaretXY -");
   385 
   385 
   386     return error;
   386     return error;
   387 }
   387 }
   388 
   388 
       
   389 /**
       
   390  * Local helper function for setting the touch enabled state of a text editor
       
   391  *
       
   392  * @param aTextEditor The text editor object to be modified.
       
   393  * @param aEnabled The touch enabled status of the text editor to be set.
       
   394  */
       
   395 LOCAL_C void SetTouchEnabled(
       
   396     MMIDTextEditor* aTextEditor,
       
   397     TBool aEnabled)
       
   398 {
       
   399     aTextEditor->SetTouchEnabled(aEnabled);
       
   400 }
       
   401 
       
   402 /*
       
   403  * Class:     com_nokia_mid_ui_TextEditorImpl
       
   404  * Method:    _setTouchEnabled
       
   405  * Signature: (IIZ)I
       
   406  */
       
   407 JNIEXPORT jint JNICALL Java_com_nokia_mid_ui_TextEditorImpl__1setTouchEnabled(
       
   408     JNIEnv* /* aJniEnv */,
       
   409     jobject /* aPeer */,
       
   410     jint aToolkitHandle,
       
   411     jint aNativePeerHandle,
       
   412     jboolean aEnabled)
       
   413 {
       
   414     DEBUG("TextEditor.cpp - setTouchEnabled +");
       
   415 
       
   416     CMIDToolkit* toolkit = JavaUnhand< CMIDToolkit >(aToolkitHandle);
       
   417 
       
   418     MMIDTextEditor* editor =
       
   419         MIDUnhandObject< MMIDTextEditor >(aNativePeerHandle);
       
   420 
       
   421     toolkit->ExecuteV(&SetTouchEnabled, editor, (TBool)aEnabled);
       
   422 
       
   423     DEBUG("TextEditor.cpp - setTouchEnabled -");
       
   424 
       
   425     return KErrNone;
       
   426 }
       
   427 
   389 // End of file
   428 // End of file