H file:
# Include <eikenv. h> // For caknenv: static () # include <aknindicatorcontainer. h> // For caknindicatorcontainer # include <aknedsts. h> struct s_uid: Public tuid {s_uid (int I) {iuid = I ;}}; class makneditingstateindicator {public: // virtual void setstate (takneditingstate astate) = 0; virtual void setstate (tint astate) = 0; virtual caknindicatorcontainer * indicatorcontainer () = 0 ;};
S file:
Void getinputmethod () {makneditingstateindicator * Ei = caknenv: static ()-> editingstateindicator (); If (! EI) return; caknindicatorcontainer * Ic = EI-> indicatorcontainer (); If (! Ic) return; If (IC-> indicatorstate (s_uid (UID) {// pinyin} else if (IC-> indicatorstate (s_uid (eaknnavipaneeditorindicatorstroke ))) {// stroke} else if (IC-> indicatorstate (s_uid (eaknnavipaneeditorindicatorlowercase) {// ABC} else if (IC-> indicatorstate (s_uid (identifier ))) {// ABC} else if (IC-> indicatorstate (s_uid (region) {// ABC} else if (IC-> indicatorstate (s_uid (eaknnavipaneeditorindicatornumbercase ))) // 123 }}