1#ifndef __STRANSLATOR_I__H__
2#define __STRANSLATOR_I__H__
4#include <interface/obj-ref-i.h>
5#include <interface/sstring-i.h>
21#define INTERFACE ITranslator
48 STDMETHOD_(BOOL,
Load)(THIS_ LPVOID pData, UINT uType) PURE;
55 STDMETHOD_(
void,
GetName)(CTHIS_
wchar_t szBuf[TR_MAX_NAME_LEN]) SCONST PURE;
62 STDMETHOD_(
void,
GetNameA)(CTHIS_ IStringA * str) SCONST PURE;
69 STDMETHOD_(BOOL,
NameEqual)(CTHIS_ LPCWSTR pszName) SCONST PURE;
76 STDMETHOD_(BOOL,
NameEqualA)(CTHIS_
const IStringA *str) SCONST PURE;
82 STDMETHOD_(GUID,
guid)(CTHIS) SCONST PURE;
93 (CTHIS_
const IStringW *strSrc,
const IStringW *strCtx,
wchar_t *pszOut,
int nLen) SCONST PURE;
100 STDMETHOD_(
void,
getFontInfo)(CTHIS_ IStringW * strFont) SCONST PURE;
110#define INTERFACE ITranslatorMgr
158 STDMETHOD_(
void,
GetLanguage)(CTHIS_
wchar_t szOut[TR_MAX_NAME_LEN]) SCONST PURE;
197 (CTHIS_
const IStringW *strSrc,
const IStringW *strCtx,
wchar_t *pszOut,
int nLen) SCONST PURE;
Interface for reference counting.
Language Translation Interface.
BOOL Load(LPVOID pData, UINT uType) PURE
Loads language translation data from a resource.
long AddRef() PURE
Increments the reference count.
GUID guid() SCONST PURE
Retrieves the GUID of the translation resource.
void GetName(wchar_t szBuf[TR_MAX_NAME_LEN]) SCONST PURE
Retrieves the name of the translation resource.
void getFontInfo(IStringW *strFont) SCONST PURE
Retrieves the default font information for translation.
long Release() PURE
Decrements the reference count.
int tr(const IStringW *strSrc, const IStringW *strCtx, wchar_t *pszOut, int nLen) SCONST PURE
Translates a string.
void GetNameA(IStringA *str) SCONST PURE
Retrieves the name of the translation resource.
void OnFinalRelease() PURE
Finalizes the release of the object.
BOOL NameEqual(LPCWSTR pszName) SCONST PURE
Compares the translation resource name.
BOOL NameEqualA(const IStringA *str) SCONST PURE
Compares the translation resource name.
Language Translation Interface Manager.
long Release() PURE
Decrements the reference count.
BOOL InstallTranslator(ITranslator *ppTranslator) PURE
Installs a language translation object into the manager.
BOOL IsValid() SCONST PURE
Checks if the manager is valid.
void GetLanguage(wchar_t szOut[TR_MAX_NAME_LEN]) SCONST PURE
Retrieves the current language for the translation module.
BOOL CreateTranslator(ITranslator **ppTranslator) PURE
Creates a language translation object.
void GetLanguageA(IStringA *out) SCONST PURE
Retrieves the current language for the translation module.
void OnFinalRelease() PURE
Finalizes the release of the object.
void SetLanguage(LPCWSTR pszLang) PURE
Sets the current language for the translation module.
int tr(const IStringW *strSrc, const IStringW *strCtx, wchar_t *pszOut, int nLen) SCONST PURE
Translates a string.
BOOL UninstallTranslator(REFGUID id) PURE
Uninstalls a language translation object from the manager.
void SetLanguageA(LPCSTR pszLang) PURE
Sets the current language for the translation module.
long AddRef() PURE
Increments the reference count.