C# Class WritePadSDK_WPFSample.SDK.WritePadAPI

This class contains P/Invoke function definitions for WritePad SDK. Note that some of the functions are accessed through an intermediate layer (Windows_CPPLayer.dll). It keeps its own recognizer pointer in a static variable, so all recognizer API's should be called through it.
ファイルを表示 Open project: phatware/WritePadSDK Class Usage Examples

Public Properties

Property Type Description
language LanguageType

Public Methods

Method Description
AddStroke ( IntPtr inkData, System.Windows.Shapes.Polyline currentStroke ) : bool

Add stroke to ink

ColorToCOLORREF ( Color color ) : uint

Translate Windows Color structure into COLORREF used by the library

detectGesture ( int type, System.Windows.Media.PointCollection points ) : int
getLanguage ( ) : LanguageType
isRecoFlagSet ( uint flags, uint flag ) : bool
recoLearnWord ( String word, int weight ) : bool
setRecoFlag ( uint flags, bool value, uint flag ) : uint

Private Methods

Method Description
HWR_AddWordToWordList ( IntPtr recoHandle, [ word1, [ word2, int flags, int replace ) : int
HWR_CheckGesture ( int type, CGTracePoint stroke, int len, int nScale, int nMinLen ) : int
HWR_EmptyWordList ( IntPtr recoHandle ) : int
HWR_GetLanguageID ( IntPtr pRecognizer ) : int
HWR_GetRecognitionFlags ( IntPtr recoHandle ) : uint
HWR_GetResult ( IntPtr pRecognizer ) : IntPtr
HWR_GetResultAlternativeCount ( IntPtr recoHandle, int nWord ) : int
HWR_GetResultWeight ( IntPtr recoHandle, int nWord, int nALternative ) : short
HWR_GetResultWordCount ( IntPtr recoHandle ) : int
HWR_InitRecognizer ( StringBuilder inDictionaryMain, StringBuilder inDictionaryCustom, StringBuilder inLearner, StringBuilder inAutoCorrect, int language, int &pFlags ) : IntPtr
HWR_IsWordInDict ( IntPtr pData, StringBuilder word ) : byte
HWR_LearnNewWord ( IntPtr reco, IntPtr word, UInt16 weight ) : int
HWR_NewUserDict ( IntPtr recoHandle ) : int
HWR_Recognize ( IntPtr pRecognizer ) : byte
HWR_RecognizerAddStroke ( IntPtr pRecognizer, [ pStroke, int nStrokeCnt ) : byte
HWR_Reset ( IntPtr pRecognizer ) : byte
HWR_SetDictionaryData ( IntPtr pRecognizer, [ pData, int nDictType ) : byte
HWR_SetRecognitionFlags ( IntPtr recoHandle, uint flags ) : void
INK_AddEmptyStroke ( IntPtr pData, float nWidth, UInt32 color ) : int
INK_AddPixelToStroke ( IntPtr pData, int nStroke, float x, float y ) : int
INK_AddStroke ( IntPtr inkData, [ ptStroke, int nStrokeCnt, float nWidth, UInt32 color ) : byte
INK_CountImages ( IntPtr pData ) : int
INK_CountTexts ( IntPtr pData ) : int
INK_DeleteImage ( IntPtr pData, UInt32 nImage ) : bool
INK_DeleteStroke ( IntPtr pData, UInt32 nStroke ) : int
INK_DeleteText ( IntPtr pData, UInt32 nText ) : bool
INK_EnableShapeRecognition ( IntPtr pData, byte bEnable ) : void
INK_Erase ( IntPtr pData ) : void
INK_FreeData ( IntPtr pData ) : void
INK_GetStroke ( IntPtr pData, UInt32 nStroke, IntPtr &ppoints, float &nWidth, Int32 &color ) : int
INK_GetStrokeRect ( IntPtr pData, UInt32 nStroke, CGRect &rect ) : byte
INK_GetStrokeZOrder ( IntPtr pData, int nStroke ) : int
INK_InitData ( ) : IntPtr
INK_IsShapeRecognitionEnabled ( IntPtr inkData ) : byte
INK_IsStrokeRecognizable ( IntPtr pData, int nStroke ) : byte
INK_IsStrokeSelected ( IntPtr pData, int nStroke ) : bool
INK_MoveStroke ( IntPtr pData, int nStroke, float xOffset, float yOffset, CGRect &pRect, Int32 recordUndo ) : int
INK_RecognizeShape ( CGStroke pStroke, int nStrokeCnt, SHAPETYPE inType ) : SHAPETYPE
INK_ResizeStroke ( IntPtr pData, int nStroke, float xOffset, float yOffset, float scaleX, float scaleY, byte bReset, CGRect &pRect, Int32 recordUndo ) : int
INK_SelectStroke ( IntPtr pData, int nStroke, bool bSelect ) : void
INK_SelectStrokesInRect ( IntPtr pData, CGRect rect ) : int
INK_Serialize ( IntPtr pData, Int32 bWrite, IntPtr File, IntPtr &data, int &pcbSize, Int32 skipImages, Int32 savePressure ) : byte
INK_SetImageFrame ( IntPtr pData, int nImageIndex, CGRect frame ) : bool
INK_SetStrokeZOrder ( IntPtr pData, int nStroke, int zOrder ) : bool
INK_SetTextFrame ( IntPtr pData, int nTextIndex, CGRect frame ) : byte
INK_StrokeCount ( IntPtr pData, UInt32 strokeCount ) : int
addWordToUserDictionary ( [ word ) : int
exportAutocorrectorDictionary ( string path ) : int
exportUserDictionary ( string path ) : int
getAutocorrectorWords ( ) : string
getRecoHandle ( ) : IntPtr
getResultWord ( int nWord, int nAlternative ) : IntPtr
getUserWords ( ) : string
importAutoCorrector ( string path ) : int
importUserDictionary ( string path ) : int
initRecognizerForLanguage ( int language, [ userpath, [ apppath, uint recoflags ) : int
recognizeInk ( ) : IntPtr
recognizeInkData ( IntPtr inkData, int bSelOnly ) : IntPtr
releaseRecognizer ( ) : void
resetRecognizer ( ) : IntPtr
resetRecognizerDataOfType ( int type ) : int
saveRecognizerDataOfType ( int type ) : int
spellCheck ( ) : int

Method Details

AddStroke() public static method

Add stroke to ink
public static AddStroke ( IntPtr inkData, System.Windows.Shapes.Polyline currentStroke ) : bool
inkData System.IntPtr Pointer to ink data
currentStroke System.Windows.Shapes.Polyline Stroke as a polyline
return bool

ColorToCOLORREF() public static method

Translate Windows Color structure into COLORREF used by the library
public static ColorToCOLORREF ( Color color ) : uint
color Color
return uint

detectGesture() public static method

public static detectGesture ( int type, System.Windows.Media.PointCollection points ) : int
type int
points System.Windows.Media.PointCollection
return int

getLanguage() public static method

public static getLanguage ( ) : LanguageType
return LanguageType

isRecoFlagSet() public static method

public static isRecoFlagSet ( uint flags, uint flag ) : bool
flags uint
flag uint
return bool

recoLearnWord() public static method

public static recoLearnWord ( String word, int weight ) : bool
word String
weight int
return bool

setRecoFlag() public static method

public static setRecoFlag ( uint flags, bool value, uint flag ) : uint
flags uint
value bool
flag uint
return uint

Property Details

language public_oe static_oe property

public static LanguageType language
return LanguageType