1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/osshangulinputcontext.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -0,0 +1,98 @@
1.4 +/*
1.5 +* Copyright (c) 2005,2006 Choe Hwanjin
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of the License "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef OSSHANGULINPUTCONTEXT_H
1.23 +#define OSSHANGULINPUTCONTEXT_H
1.24 +
1.25 +#include <e32std.h>
1.26 +#include <e32base.h>
1.27 +
1.28 +#include <MOssHangulInputEventObserver.h>
1.29 +
1.30 +typedef struct _HangulInputContext HangulInputContext;
1.31 +
1.32 +class COssKeyboard;
1.33 +class COssCombination;
1.34 +
1.35 +class COssHangulInputContext : public CBase
1.36 + {
1.37 +public:
1.38 +
1.39 + IMPORT_C static COssHangulInputContext* NewLC(const TDesC8& aKeyboardType);
1.40 +
1.41 + IMPORT_C static COssHangulInputContext* NewL(const TDesC8& aKeyboardType);
1.42 +
1.43 + IMPORT_C virtual ~COssHangulInputContext();
1.44 +
1.45 +private:
1.46 +
1.47 + COssHangulInputContext();
1.48 +
1.49 + void ConstructL(const TDesC8& aKeyboardType);
1.50 +
1.51 +public:
1.52 +
1.53 + IMPORT_C TBool Process(const TChar& aAscII);
1.54 +
1.55 + IMPORT_C void Reset();
1.56 +
1.57 + IMPORT_C TBool BackSpace();
1.58 +
1.59 + IMPORT_C TBool IsEmpty();
1.60 +
1.61 + IMPORT_C TBool HasChoseong();
1.62 +
1.63 + IMPORT_C TBool HasJungseong();
1.64 +
1.65 + IMPORT_C TBool HasJongseong();
1.66 +
1.67 + IMPORT_C void SetOutputMode(const TInt& aMode);
1.68 +
1.69 + IMPORT_C void SetKeyboard(const COssKeyboard& aOssKeyboard);
1.70 +
1.71 + IMPORT_C void SelectKeyboard(const TDesC8& aId);
1.72 +
1.73 + IMPORT_C void SetCombinationL(COssCombination& aOssCombination);
1.74 +
1.75 + IMPORT_C void AddEventObserver(MOssHangulInputEventObserver* aObserver);
1.76 +
1.77 + IMPORT_C void RemoveEventObserver(MOssHangulInputEventObserver* aObserver);
1.78 +
1.79 + IMPORT_C TPtrC GetPreeditString();
1.80 +
1.81 + IMPORT_C TPtrC GetCommitString();
1.82 +
1.83 + IMPORT_C TPtrC Flush();
1.84 +
1.85 +public:
1.86 +
1.87 + TBool OnTranslate(const TChar& aAscII,const TDesC& aUcsStr);
1.88 +
1.89 + TBool OnTransition(const TChar& aChar,const TDesC& aPreEdit);
1.90 +
1.91 +private:
1.92 +
1.93 + HBufC8* iKeyboardType;
1.94 +
1.95 + HangulInputContext* iHic;
1.96 +
1.97 + RPointerArray<MOssHangulInputEventObserver> iObservers;
1.98 +
1.99 + };
1.100 +
1.101 +#endif // OSSHANGULINPUTCONTEXT_H