From 69409021aced78b31da0c9f2def7332a4c4b973e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Sep 2017 12:14:57 +0300 Subject: Revert "Merge branch 'master' of https://github.com/miranda-ng/miranda-ng" This reverts commit e09448dd03e3647717166e92ee818e395041993a, reversing changes made to b0f44b16bd1138de85a5d17bb42151742f9c8298. --- include/delphi/m_helpers.inc | 21 ++++++++++++++++ include/delphi/m_skin.inc | 57 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) (limited to 'include/delphi') diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index f155f94866..d5160da04c 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -33,6 +33,9 @@ function Langpack_Register:int_ptr; function CreateProtoServiceFunction(const szModule, szService: PAnsiChar; serviceProc: TMIRANDASERVICE): int_ptr; +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; @@ -273,6 +276,24 @@ begin Result := CreateServiceFunction(szStr, @serviceProc); end; +function SkinAddNewSound(const name, description, defaultFile: PAnsiChar): int_ptr; +var + ssd: TSKINSOUNDDESCEX; +begin + FillChar(ssd,SizeOf(ssd),0); + ssd.cbSize := sizeof(ssd); + ssd.pszName := name; + ssd.pszDescription.a := description; + ssd.pszDefaultFile.a := defaultFile; + Result := CallService(MS_SKIN_ADDNEWSOUND, hLangpack, lParam(@ssd)); +end; + +function SkinPlaySound (const name: PAnsiChar): int_ptr; + {$IFDEF AllowInline}inline;{$ENDIF} +begin + Result := CallService(MS_SKIN_PLAYSOUND, 0, lParam(name)); +end; + function Menu_AddContextFrameMenuItem(mi:PMO_MenuItem):HGENMENU; begin diff --git a/include/delphi/m_skin.inc b/include/delphi/m_skin.inc index 0aa6d537e9..5c07d87008 100644 --- a/include/delphi/m_skin.inc +++ b/include/delphi/m_skin.inc @@ -114,6 +114,19 @@ const function Skin_LoadProtoIcon(protoName:PAnsiChar; iconId:int; big:byte) : HICON; stdcall; external AppDLL name 'Skin_LoadProtoIcon'; +const + SSDF_UNICODE = $0001; +type + PSKINSOUNDDESCEX = ^TSKINSOUNDDESCEX; + TSKINSOUNDDESCEX = record + cbSize : int; + pszName : PAnsiChar; // name to refer to sound when playing and in DB + pszDescription: TChar; // [TRANSLATED-BY-CORE] description to use for it in options dialog + pszDefaultFile: TChar; // the default sound file to use, WITHOUT path + pszSection : TChar; // [TRANSLATED-BY-CORE] section name used to group sounds (NULL is acceptable) + dwFlags : dword; // if Miranda ver >=9.0 + end; + const { Affect : Load an icon from the user's custom skin lib, or from the exe @@ -123,6 +136,40 @@ const } MS_SKIN_LOADICON:PAnsiChar = 'Skin/Icons/Load'; + { + Affect : Load an icon representing the status_wanted for a particular protocol, see notes + Returns: an HICON for the new icon, do NOT DestroyIcon() the return value + returns NULL(0) on failure. + Notes : If wParam is NULL(0) the service will load the user's selected + 'all protocols' status icon + } + + { + wParam : hLangpack + lParam : Pointer to a initialised SKINSOUNDDESC + Affect : Add a new sound so it has a default and can be changed in the + options dialog + Returns: 0 on success, [non zero] on failure + } + MS_SKIN_ADDNEWSOUND:PAnsiChar = 'Skin/Sounds/AddNew'; + + { + wParam : 0 + lParam : Pointer to a null terminated string containing the name of the + sound to play + Affect : plays a named sound event, play name should of been added + with MS_SKIN_ADDNEWSOUND, see notes + Notes : function will not fail, it will play the Windows + } + MS_SKIN_PLAYSOUND:PAnsiChar = 'Skin/Sounds/Play'; + + { + wParam = 0 + lParam = (WideChar *) ptszFileName + Affect: plays any sound file + } + MS_SKIN_PLAYSOUNDFILE:PAnsiChar = 'Skin/Sounds/PlayFile'; + { wParam : 0 lParam : 0 @@ -131,4 +178,14 @@ const } ME_SKIN_ICONSCHANGED:PAnsiChar = 'Skin/IconsChanged'; + { + wParam: 0 when playing sound (1 when sound is being previewed) + lParam: (AnsiChar*) pszSoundFile + Affect: This hook is fired when the sound module needs to play a sound + Note : This event has default processing, if no one HookEvent()'s this + event then it will use the default hook code, which uses PlaySound() + Version: 0.3.4a (2004/09/15) + } + ME_SKIN_PLAYINGSOUND:PAnsiChar = 'Skin/Sounds/Playing'; + {$ENDIF} -- cgit v1.2.3