{$IFDEF M_API_UNIT} //----- CListint ----- function IsHContactGroup (h:TMCONTACT):bool; function IsHContactInfo (h:TMCONTACT):bool; function IsHContactContact(h:TMCONTACT):bool; function CLCDEFAULT_BKCOLOUR:dword; function CLCDEFAULT_TEXTCOLOUR:dword; function CLCDEFAULT_SELBKCOLOUR:dword; function CLCDEFAULT_SELTEXTCOLOUR:dword; function CLCDEFAULT_HOTTEXTCOLOUR:dword; function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar; function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar; function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int; function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int; function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline} function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline} function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline} function Netlib_CloseHandle(Handle: THANDLE): int; function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int; function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int; function Netlib_Send(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr; function Netlib_Recv(hConn: THANDLE; const buf: PAnsiChar; len: int; flags: int): int_ptr; procedure Netlib_Log(hNetLib: THANDLE; const sz: PAnsiChar); function mir_hashstr (const key:PAnsiChar):uint; {inline;} function mir_hashstrW(const key:PWideChar):uint; {inline;} function lrtrim (str:PAnsiChar):PAnsiChar; {inline} function lrtrimp(str:PAnsiChar):PAnsiChar; {inline} function mir_utf8decodeA(const src:PAnsiChar):PAnsiChar; {inline} function Translate (sz: PAnsiChar): PAnsiChar; function Translatew(sz: PWideChar): PWideChar; function TranslateString (const sz:AnsiString):AnsiString; function TranslateWideString(const sz:WideString):WideString; function TranslateUnicodeString(sz: UnicodeString): UnicodeString; procedure TranslateDialogDefault(hwndDlg: THANDLE); procedure TranslateMenu(hMenu: HMENU); function Langpack_Register:int_ptr; function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr; function Srmm_AddIcon (sid: PStatusIconData):int_ptr; procedure Srmm_RemoveIcon(sid: PStatusIconData); procedure Srmm_ModifyIcon(hContact:TMCONTACT; sid:PStatusIconData); function Srmm_GetNthIcon(hContact:TMCONTACT; index:int):pStatusIconData; function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr; function SkinPlaySound (const name: PAnsiChar): int_ptr; function Menu_AddContextFrameMenuItem(mi:PMO_MenuItem):HGENMENU; function Menu_AddMainMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddContactMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddStatusMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddProtoMenuItem (mi:PMO_MenuItem):HGENMENU; function Menu_AddTrayMenuItem (mi:PMO_MenuItem):HGENMENU; function UserInfo_AddPage(wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Options_AddPage (wParam:WPARAM; odp:POPTIONSDIALOGPAGE):int_ptr; function Hotkey_Register(hk:PHOTKEYDESC):int_ptr; function Skin_AddIcon(si:PSKINICONDESC):THANDLE; procedure Icon_Register (hInst:HINST; const szSection:PAnsiChar; pIcons:pIconItem ; iCount:size_t; prefix:PAnsiChar); procedure Icon_RegisterW(hInst:HINST; const szSection:PWideChar; pIcons:pIconItemW; iCount:size_t; prefix:PAnsiChar); procedure FontRegister (pFontID:pFontID); procedure FontRegisterW(pFontID:pFontIDW); procedure ColourRegister (pColorID:pColourID); procedure ColourRegisterW(pColorID:pColourIDW); procedure EffectRegister (pEffectID:pEffectID); procedure EffectRegisterW(pEffectID:pEffectIDW); function TopToolbar_AddButton(pButton:PTTBButton):THANDLE; function Options_Open (ood:POPENOPTIONSDIALOG):int_ptr; function Options_OpenPage(ood:POPENOPTIONSDIALOG):HWND; procedure MIcoTab_AddItem (hwnd:HWND; lptzName:PAnsiChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool); procedure MIcoTab_AddItemW(hwnd:HWND; lptzName:PWideChar; hIcon:HICON; data:LPARAM; bSharedIcon:bool); function Crypto_RegisterEngine(pProvider:PCRYPTO_PROVIDER):THANDLE; procedure Crypto_EnumProviders(var numProvs:int; var pResult:array of PCRYPTO_PROVIDER); function Crypto_GetProvider(pszName:PAnsiChar):PCRYPTO_PROVIDER; {$ELSE} var hLangpack:int = 0; function _AddMainMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall; external AppDll name 'Menu_AddMainMenuItem'; function _AddContactMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; external AppDll name 'Menu_AddContactMenuItem'; function _AddProtoMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; external AppDll name 'Menu_AddProtoMenuItem'; function _AddStatusMenuItem(mi:PMO_MenuItem; pszProto:PAnsiChar) : HGENMENU; stdcall; external AppDll name 'Menu_AddStatusMenuItem'; function _AddTrayMenuItem(mi:PMO_MenuItem) : HGENMENU; stdcall; external AppDll name 'Menu_AddTrayMenuItem'; //----- CListint ----- function IsHContactGroup(h:TMCONTACT):bool; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=(h xor HCONTACT_ISGROUP)<(HCONTACT_ISGROUP xor HCONTACT_ISINFO); end; function IsHContactInfo(h:TMCONTACT):bool; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=(h and HCONTACT_ISINFO)=HCONTACT_ISINFO; end; function IsHContactContact(h:TMCONTACT):bool; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=(h and HCONTACT_ISGROUP)=0; end; function CLCDEFAULT_BKCOLOUR:dword; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=GetSysColor(COLOR_3DFACE); end; function CLCDEFAULT_TEXTCOLOUR:dword; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=GetSysColor(COLOR_WINDOWTEXT); end; function CLCDEFAULT_SELBKCOLOUR:dword; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=GetSysColor(COLOR_HIGHLIGHT); end; function CLCDEFAULT_SELTEXTCOLOUR:dword; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=GetSysColor(COLOR_HIGHLIGHTTEXT); end; function CLCDEFAULT_HOTTEXTCOLOUR:dword; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=RGB(0,0,255); end; function CreateVersionString(version:dword;buf:PAnsiChar):PAnsiChar; var vers:array [0..3] of integer; begin vers[0]:=(version shr 24) and $FF; vers[1]:=(version shr 16) and $FF; vers[2]:=(version shr 8) and $FF; vers[3]:=version and $FF; wvsprintfa(buf,'%d.%d.%d.%d',@vers); result:=buf; end; function CreateVersionStringPlugin(pluginInfo:PPluginInfoEx;buf:PAnsiChar):PAnsiChar; {$IFDEF AllowInline}inline;{$ENDIF} begin result:=CreateVersionString(pluginInfo^.version,buf); end; function PLUGIN_MAKE_VERSION(a,b,c,d: Cardinal): int; {$IFDEF AllowInline}inline;{$ENDIF} begin Result := (a shl 24) or (b shl 16) or (c shl 8) or d; end; function PLUGIN_CMP_VERSION(verA: LongInt; verB: LongInt): int; begin Result := 0; { could be used to compare for severity of age for positive values, if a