Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes
nsIMM Class Reference

Native IMM wrapper. More...

#include <nsWindow.h>

List of all members.

Public Member Functions

 nsIMM (const char *aModuleName="IMM32.DLL")
 ~nsIMM ()
LONG GetCompositionStringA (HIMC h, DWORD d1, LPVOID v, DWORD d2)
LONG GetCompositionStringW (HIMC h, DWORD d1, LPVOID v, DWORD d2)
LONG GetContext (HWND anHWND)
LONG ReleaseContext (HWND anHWND, HIMC anIMC)
LONG NotifyIME (HIMC h, DWORD d1, DWORD d2, DWORD d3)
LONG SetCandidateWindow (HIMC h, LPCANDIDATEFORM l)
LONG SetCompositionWindow (HIMC h, LPCOMPOSITIONFORM l)
LONG GetCompositionWindow (HIMC h, LPCOMPOSITIONFORM l)
LONG GetProperty (HKL hKL, DWORD dwIndex)
LONG GetDefaultIMEWnd (HWND hWnd)
BOOL GetOpenStatus (HIMC h)
BOOL SetOpenStatus (HIMC h, BOOL b)

Static Public Member Functions

static nsIMMLoadModule ()

Private Types

typedef LONG(CALLBACKSetCandWindowPtr )(HIMC, LPCANDIDATEFORM)
typedef LONG(CALLBACKSetCompWindowPtr )(HIMC, LPCOMPOSITIONFORM)
typedef LONG(CALLBACKGetCompWindowPtr )(HIMC, LPCOMPOSITIONFORM)

Private Member Functions

typedef LONG (CALLBACK *GetCompStrPtr)(HIMC
typedef LONG (CALLBACK *GetContextPtr)(HWND)
typedef LONG (CALLBACK *RelContextPtr)(HWND
typedef LONG (CALLBACK *NotifyIMEPtr)(HIMC
typedef LONG (CALLBACK *GetPropertyPtr)(HKL
typedef LONG (CALLBACK *GetDefaultIMEWndPtr)(HWND)
typedef BOOL (CALLBACK *GetOpenStatusPtr)(HIMC)
typedef BOOL (CALLBACK *SetOpenStatusPtr)(HIMC

Private Attributes

typedef DWORD
typedef LPVOID
typedef HIMC
typedef BOOL
HINSTANCE mInstance
GetCompStrPtr mGetCompositionStringA
GetCompStrPtr mGetCompositionStringW
GetContextPtr mGetContext
RelContextPtr mReleaseContext
NotifyIMEPtr mNotifyIME
SetCandWindowPtr mSetCandiateWindow
SetCompWindowPtr mSetCompositionWindow
GetCompWindowPtr mGetCompositionWindow
GetPropertyPtr mGetProperty
GetDefaultIMEWndPtr mGetDefaultIMEWnd
GetOpenStatusPtr mGetOpenStatus
SetOpenStatusPtr mSetOpenStatus

Detailed Description

Native IMM wrapper.

Definition at line 103 of file nsWindow.h.


Member Typedef Documentation

typedef LONG(CALLBACK * nsIMM::GetCompWindowPtr)(HIMC, LPCOMPOSITIONFORM) [private]

Definition at line 112 of file nsWindow.h.

typedef LONG(CALLBACK * nsIMM::SetCandWindowPtr)(HIMC, LPCANDIDATEFORM) [private]

Definition at line 110 of file nsWindow.h.

typedef LONG(CALLBACK * nsIMM::SetCompWindowPtr)(HIMC, LPCOMPOSITIONFORM) [private]

Definition at line 111 of file nsWindow.h.


Constructor & Destructor Documentation

nsIMM::nsIMM ( const char *  aModuleName = "IMM32.DLL") [inline]

Definition at line 124 of file nsWindow.h.

                                             {
#ifndef WINCE
    mInstance=::LoadLibrary(aModuleName);
    NS_ASSERTION(mInstance!=NULL, "nsIMM.LoadLibrary failed.");

    mGetCompositionStringA=(mInstance) ? (GetCompStrPtr)GetProcAddress(mInstance, "ImmGetCompositionStringA") : 0;
    NS_ASSERTION(mGetCompositionStringA!=NULL, "nsIMM.ImmGetCompositionStringA failed.");

    mGetCompositionStringW=(mInstance) ? (GetCompStrPtr)GetProcAddress(mInstance, "ImmGetCompositionStringW") : 0;
    NS_ASSERTION(mGetCompositionStringW!=NULL, "nsIMM.ImmGetCompositionStringW failed.");

    mGetContext=(mInstance) ? (GetContextPtr)GetProcAddress(mInstance, "ImmGetContext") : 0;
    NS_ASSERTION(mGetContext!=NULL, "nsIMM.ImmGetContext failed.");

    mReleaseContext=(mInstance) ? (RelContextPtr)GetProcAddress(mInstance, "ImmReleaseContext") : 0;
    NS_ASSERTION(mReleaseContext!=NULL, "nsIMM.ImmReleaseContext failed.");

    mNotifyIME=(mInstance) ? (NotifyIMEPtr)GetProcAddress(mInstance, "ImmNotifyIME") : 0;
    NS_ASSERTION(mNotifyIME!=NULL, "nsIMM.ImmNotifyIME failed.");

    mSetCandiateWindow=(mInstance) ? (SetCandWindowPtr)GetProcAddress(mInstance, "ImmSetCandidateWindow") : 0;
    NS_ASSERTION(mSetCandiateWindow!=NULL, "nsIMM.ImmSetCandidateWindow failed.");

    mGetCompositionWindow=(mInstance) ? (GetCompWindowPtr)GetProcAddress(mInstance, "ImmGetCompositionWindow") : 0;
    NS_ASSERTION(mGetCompositionWindow!=NULL, "nsIMM.ImmGetCompositionWindow failed.");

    mSetCompositionWindow=(mInstance) ? (SetCompWindowPtr)GetProcAddress(mInstance, "ImmSetCompositionWindow") : 0;
    NS_ASSERTION(mSetCompositionWindow!=NULL, "nsIMM.ImmSetCompositionWindow failed.");

    mGetProperty=(mInstance) ? (GetPropertyPtr)GetProcAddress(mInstance, "ImmGetProperty") : 0;
    NS_ASSERTION(mGetProperty!=NULL, "nsIMM.ImmGetProperty failed.");

    mGetDefaultIMEWnd=(mInstance) ? (GetDefaultIMEWndPtr)GetProcAddress(mInstance, "ImmGetDefaultIMEWnd") : 0;
    NS_ASSERTION(mGetDefaultIMEWnd!=NULL, "nsIMM.ImmGetDefaultIMEWnd failed.");

    mGetOpenStatus=(mInstance) ? (GetOpenStatusPtr)GetProcAddress(mInstance,"ImmGetOpenStatus") : 0;
    NS_ASSERTION(mGetOpenStatus!=NULL, "nsIMM.ImmGetOpenStatus failed.");

    mSetOpenStatus=(mInstance) ? (SetOpenStatusPtr)GetProcAddress(mInstance,"ImmSetOpenStatus") : 0;
    NS_ASSERTION(mSetOpenStatus!=NULL, "nsIMM.ImmSetOpenStatus failed.");
#elif WINCE_EMULATOR
    mInstance=NULL;
    mGetCompositionStringA=NULL;
    mGetCompositionStringW=NULL;
    mGetContext=NULL;
    mReleaseContext=NULL;
    mNotifyIME=NULL;
    mSetCandiateWindow=NULL;
    mGetCompositionWindow=NULL;
    mSetCompositionWindow=NULL;
    mGetProperty=NULL;
    mGetDefaultIMEWnd=NULL;
    mGetOpenStatus=NULL;
    mSetOpenStatus=NULL;
#else // WinCE
    mInstance=NULL;

    mGetCompositionStringA=NULL;
    mGetCompositionStringW=(GetCompStrPtr)ImmGetCompositionStringW;
    mGetContext=(GetContextPtr)ImmGetContext;
    mReleaseContext=(RelContextPtr)ImmReleaseContext;
    mNotifyIME=(NotifyIMEPtr)ImmNotifyIME;
    mSetCandiateWindow=(SetCandWindowPtr)ImmSetCandidateWindow;
    mGetCompositionWindow=(GetCompWindowPtr)ImmGetCompositionWindow;
    mSetCompositionWindow=(SetCompWindowPtr)ImmSetCompositionWindow;
    mGetProperty=(GetPropertyPtr)ImmGetProperty;
    mGetDefaultIMEWnd=(GetDefaultIMEWndPtr)ImmGetDefaultIMEWnd;
    mGetOpenStatus=(GetOpenStatusPtr)ImmGetOpenStatus;
    mSetOpenStatus=(SetOpenStatusPtr)ImmSetOpenStatus;
#endif
  }
nsIMM::~nsIMM ( ) [inline]

Member Function Documentation

typedef nsIMM::BOOL ( CALLBACK GetOpenStatusPtr) [private]
typedef nsIMM::BOOL ( CALLBACK SetOpenStatusPtr) [private]
LONG nsIMM::GetCompositionStringA ( HIMC  h,
DWORD  d1,
LPVOID  v,
DWORD  d2 
) [inline]

Definition at line 214 of file nsWindow.h.

                                                                   {
    return (mGetCompositionStringA) ? mGetCompositionStringA(h, d1, v, d2) : 0L;
  }
LONG nsIMM::GetCompositionStringW ( HIMC  h,
DWORD  d1,
LPVOID  v,
DWORD  d2 
) [inline]

Definition at line 218 of file nsWindow.h.

                                                                   {
    return (mGetCompositionStringW) ? mGetCompositionStringW(h, d1, v, d2) : 0L;
  }
LONG nsIMM::GetCompositionWindow ( HIMC  h,
LPCOMPOSITIONFORM  l 
) [inline]

Definition at line 242 of file nsWindow.h.

                                                        {
    return (mGetCompositionWindow) ? mGetCompositionWindow(h, l) : 0L;
  }
LONG nsIMM::GetContext ( HWND  anHWND) [inline]

Definition at line 222 of file nsWindow.h.

                               {
    return (mGetContext) ? mGetContext(anHWND) : 0L;
  }
LONG nsIMM::GetDefaultIMEWnd ( HWND  hWnd) [inline]

Definition at line 250 of file nsWindow.h.

                                   {
    return (mGetDefaultIMEWnd) ? mGetDefaultIMEWnd(hWnd) : 0L;
  }
BOOL nsIMM::GetOpenStatus ( HIMC  h) [inline]

Definition at line 254 of file nsWindow.h.

                             {
    return (mGetOpenStatus) ? mGetOpenStatus(h) : FALSE;
  }
LONG nsIMM::GetProperty ( HKL  hKL,
DWORD  dwIndex 
) [inline]

Definition at line 246 of file nsWindow.h.

                                           {
    return (mGetProperty) ? mGetProperty(hKL, dwIndex) : 0L;
  }
static nsIMM& nsIMM::LoadModule ( ) [inline, static]

Definition at line 119 of file nsWindow.h.

                             {
    static nsIMM gIMM;
    return gIMM;
  }
typedef nsIMM::LONG ( CALLBACK GetCompStrPtr) [private]
typedef nsIMM::LONG ( CALLBACK GetContextPtr) [private]
typedef nsIMM::LONG ( CALLBACK RelContextPtr) [private]
typedef nsIMM::LONG ( CALLBACK NotifyIMEPtr) [private]
typedef nsIMM::LONG ( CALLBACK GetPropertyPtr) [private]
typedef nsIMM::LONG ( CALLBACK GetDefaultIMEWndPtr) [private]
LONG nsIMM::NotifyIME ( HIMC  h,
DWORD  d1,
DWORD  d2,
DWORD  d3 
) [inline]

Definition at line 230 of file nsWindow.h.

                                                       {
    return (mNotifyIME) ? mNotifyIME(h, d1, d2, d3) : 0L;
  }
LONG nsIMM::ReleaseContext ( HWND  anHWND,
HIMC  anIMC 
) [inline]

Definition at line 226 of file nsWindow.h.

                                               {
    return (mReleaseContext) ? mReleaseContext(anHWND, anIMC) : 0L;
  }
LONG nsIMM::SetCandidateWindow ( HIMC  h,
LPCANDIDATEFORM  l 
) [inline]

Definition at line 234 of file nsWindow.h.

                                                     {
    return (mSetCandiateWindow) ? mSetCandiateWindow(h, l) : 0L;
  }
LONG nsIMM::SetCompositionWindow ( HIMC  h,
LPCOMPOSITIONFORM  l 
) [inline]

Definition at line 238 of file nsWindow.h.

                                                         {
    return (mSetCompositionWindow) ? mSetCompositionWindow(h, l) : 0L;
  }
BOOL nsIMM::SetOpenStatus ( HIMC  h,
BOOL  b 
) [inline]

Definition at line 258 of file nsWindow.h.

                                     {
    return (mSetOpenStatus) ? mSetOpenStatus(h,b) : FALSE;
  }

Member Data Documentation

typedef nsIMM::BOOL [private]

Definition at line 116 of file nsWindow.h.

typedef nsIMM::DWORD [private]

Definition at line 106 of file nsWindow.h.

typedef nsIMM::HIMC [private]

Definition at line 108 of file nsWindow.h.

typedef nsIMM::LPVOID [private]

Definition at line 106 of file nsWindow.h.

GetCompStrPtr nsIMM::mGetCompositionStringA [private]

Definition at line 265 of file nsWindow.h.

GetCompStrPtr nsIMM::mGetCompositionStringW [private]

Definition at line 266 of file nsWindow.h.

Definition at line 272 of file nsWindow.h.

GetContextPtr nsIMM::mGetContext [private]

Definition at line 267 of file nsWindow.h.

GetDefaultIMEWndPtr nsIMM::mGetDefaultIMEWnd [private]

Definition at line 274 of file nsWindow.h.

GetOpenStatusPtr nsIMM::mGetOpenStatus [private]

Definition at line 275 of file nsWindow.h.

GetPropertyPtr nsIMM::mGetProperty [private]

Definition at line 273 of file nsWindow.h.

Definition at line 264 of file nsWindow.h.

NotifyIMEPtr nsIMM::mNotifyIME [private]

Definition at line 269 of file nsWindow.h.

RelContextPtr nsIMM::mReleaseContext [private]

Definition at line 268 of file nsWindow.h.

Definition at line 270 of file nsWindow.h.

Definition at line 271 of file nsWindow.h.

SetOpenStatusPtr nsIMM::mSetOpenStatus [private]

Definition at line 276 of file nsWindow.h.


The documentation for this class was generated from the following file: