diff options
-rw-r--r-- | include/delphi/interfaces.inc | 5 | ||||
-rw-r--r-- | include/delphi/m_api.pas | 10 | ||||
-rw-r--r-- | include/delphi/m_button.inc | 2 | ||||
-rw-r--r-- | include/delphi/m_clistint.inc | 21 | ||||
-rw-r--r-- | include/delphi/m_core.inc | 6 | ||||
-rw-r--r-- | include/delphi/m_fontservice.inc | 2 | ||||
-rw-r--r-- | include/delphi/m_helpers.inc | 65 | ||||
-rw-r--r-- | include/delphi/m_langpack.inc | 8 | ||||
-rw-r--r-- | include/delphi/m_timezones.inc | 7 | ||||
-rw-r--r-- | include/delphi/m_toolbar.inc | 96 | ||||
-rw-r--r-- | include/delphi/m_toptoolbar.inc | 122 | ||||
-rw-r--r-- | include/delphi/m_updater.inc | 126 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/compilers.inc | 361 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/historypp.dpr | 30 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_global.pas | 8 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_richedit.pas | 8 | ||||
-rw-r--r-- | plugins/HistoryPlusPlus/m_historypp.inc | 191 | ||||
-rw-r--r-- | plugins/ImportTXT/importtxt.dpr | 31 |
18 files changed, 189 insertions, 910 deletions
diff --git a/include/delphi/interfaces.inc b/include/delphi/interfaces.inc index fd40e34582..09004fff94 100644 --- a/include/delphi/interfaces.inc +++ b/include/delphi/interfaces.inc @@ -23,8 +23,6 @@ const MIID_UIHISTORY :MUUID='{7F7E3D98-CE1F-4962-8284-968550F1D3D9}'; const MIID_AUTOAWAY :MUUID='{9C87F7DC-3BD7-4983-B7FB-B848FDBC91F0}';
const MIID_USERONLINE :MUUID='{130829E0-2463-4FF8-BBC8-CE73C0188442}';
const MIID_IDLE :MUUID='{296F9F3B-5B6F-40E5-8FB0-A6496C18BF0A}';
-const MIID_FONTSERVICE :MUUID='{56F39112-E37F-4234-A9E6-7A811745C175}';
-const MIID_UPDATENOTIFY :MUUID='{4E68B12A-6B54-44DE-8637-F1120DB68140}';
const MIID_CRYPTO :MUUID='{415CA6E1-895F-40E6-87BD-9B396016D0E5}';
// Common plugin interfaces (core plugins)
@@ -43,17 +41,16 @@ const MIID_EXTRAICONSSERVICE:MUUID='{62D80749-F169-4592-B44D-3DD6DE9D50C5}'; const MIID_VERSIONINFO :MUUID='{CFEB6325-334E-4052-A645-562193DFCC77}';
const MIID_FOLDERS :MUUID='{CFEBEC29-39EF-4B62-AD38-9A652CA324ED}';
const MIID_BIRTHDAYNOTIFY:MUUID='{CFBA5784-3701-4D83-816A-199C00D4A67A}';
-const MIID_BONSAI :MUUID='{CFAAE811-30E1-4A4F-8784-153CCCB0037A}';
const MIID_EXCHANGE :MUUID='{CFD79A89-9959-4E65-B076-413F98FE0D15}';
const MIID_MIRPY :MUUID='{CFF91A5C-1786-41C1-8886-094B14281F15}';
const MIID_SERVICESLIST :MUUID='{CF4BDF02-5D27-4241-99E5-1951AAB0C454}';
-const MIID_TRANSLATOR :MUUID='{CFB637B0-7217-4C1E-B22A-D922323A5D0B}';
const MIID_TOOLTIPS :MUUID='{BCBDA043-2716-4404-B0FA-3D2D93819E03}';
const MIID_POPUPS :MUUID='{33299069-1919-4FF8-B131-1D072178A766}';
const MIID_LOGWINDOW :MUUID='{C53AFB90-FA44-4304-BC9D-6A841C3905F5}';
const MIID_EVENTNOTIFY :MUUID='{F3D7EC5A-F7EF-45DD-8CA5-B0F6BA18647B}';
const MIID_SRCONTACTS :MUUID='{7CA6050E-BAF7-42D2-B936-0DB9DF572B95}';
const MIID_HISTORYEXPORT :MUUID='{18FA2ADE-E31B-4B5D-953D-0AB25781C604}';
+
const MIID_SMILEY :MUUID='{E03C71B2-6DEE-467E-A4F0-DD516745876A}';
const MIID_FLAGS :MUUID='{88A3B66E-C438-4381-BC17-71D99D225F9C}';
const MIID_SPELLCHECKER :MUUID='{26EED12A-7016-4D0F-9B4A-0CAA7E2229F3}';
diff --git a/include/delphi/m_api.pas b/include/delphi/m_api.pas index 56bbe9cf3b..9d04c30ff1 100644 --- a/include/delphi/m_api.pas +++ b/include/delphi/m_api.pas @@ -24,6 +24,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. {$IFDEF WIN32}{$A4}{$ENDIF}
{$IFDEF WIN64}{$A8}{$ENDIF}
{$ENDIF}
+{$IFDEF FPC}
+ {$DEFINE AllowInline}
+{$ELSE}
+ {$IFDEF NativeCode} // Delphi.NET+
+ {$DEFINE AllowInline}
+ {$ENDIF}
+{$ENDIF}
+
unit m_api;
interface
@@ -243,7 +251,6 @@ var {$include m_fontservice.inc}
{$include m_chat.inc}
{$include m_fingerprint.inc}
- {$include m_updater.inc}
{$include m_variables.inc}
{$include m_cluiframes.inc}
{$include m_popup.inc}
@@ -265,7 +272,6 @@ var {$include m_help.inc}
{$include m_proto_listeningto.inc}
{$include m_toptoolbar.inc}
- {$include m_toolbar.inc}
{$include m_msg_buttonsbar.inc}
{$include m_json.inc}
{$define M_API_UNIT}
diff --git a/include/delphi/m_button.inc b/include/delphi/m_button.inc index 7a8860a7ce..dd2c371e66 100644 --- a/include/delphi/m_button.inc +++ b/include/delphi/m_button.inc @@ -86,6 +86,6 @@ const Usage: SendMessage(hwndbutton, BUTTONSETCUSTOM, 0, (LPARAM)&CustomData);
Only works on MButtonClass buttons
}
- BUTTONSETCUSTOM = WM_USER+7;
+ BUTTONSETCUSTOM = WM_USER + 7;
{$ENDIF}
diff --git a/include/delphi/m_clistint.inc b/include/delphi/m_clistint.inc index 7a0dd226e3..4bc4b97e37 100644 --- a/include/delphi/m_clistint.inc +++ b/include/delphi/m_clistint.inc @@ -218,22 +218,13 @@ type end;
type
- PClcCacheEntryBase = pointer;
- PClcCacheEntryBaseA = ^ClcCacheEntryBaseA;
- ClcCacheEntryBaseA = record
+ PClcCacheEntryBase = ^ClcCacheEntryBase;
+ ClcCacheEntryBase = record
hContact:THANDLE;
name :TCHAR;
group :TCHAR;
isHidden:int;
end;
- PClcCacheEntryBaseW = ^ClcCacheEntryBaseW;
- ClcCacheEntryBaseW = record
- hContact:THANDLE;
- name :TCHAR;
- szName :PAnsiChar;
- group :TCHAR;
- isHidden:int;
- end;
type
PCLIST_INTERFACE = ^CLIST_INTERFACE;
@@ -479,35 +470,43 @@ var {$ELSE}
function IsHContactGroup(h:THANDLE):bool;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=(h xor HCONTACT_ISGROUP)<(HCONTACT_ISGROUP xor HCONTACT_ISINFO);
end;
function IsHContactInfo(h:THANDLE):bool;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=(h and HCONTACT_ISINFO)=HCONTACT_ISINFO;
end;
function IsHContactContact(h:THANDLE):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
{
if IsWinVer98Plus then
diff --git a/include/delphi/m_core.inc b/include/delphi/m_core.inc index 9445241e66..5036322301 100644 --- a/include/delphi/m_core.inc +++ b/include/delphi/m_core.inc @@ -463,7 +463,11 @@ function ltrimp(str:pAnsiChar):pAnsiChar; stdcall; function wildcmp(name:pAnsiChar; mask:pAnsiChar):int; stdcall;
external CoreDLL name 'wildcmp';
-
+// mir_free dest, mir_strdup src to dest
+function replaceStr(var dest:pAnsiChar; const src:pAnsiChar):pAnsiChar; stdcall;
+ external CoreDLL name 'replaceStr';
+function replaceStrW(var dest:pWideChar; const src:pWideChar):pWideChar; stdcall;
+ external CoreDLL name 'replaceStrW';
///////////////////////////////////////////////////////////////////////////////
// text conversion functions
diff --git a/include/delphi/m_fontservice.inc b/include/delphi/m_fontservice.inc index f13173ac03..4317ecf2b6 100644 --- a/include/delphi/m_fontservice.inc +++ b/include/delphi/m_fontservice.inc @@ -241,7 +241,7 @@ const // register an effect
// wparam = (EffectID *)&effect_id
// lparam = hLangpack
- MS_EFFECT_REGISTER :pAnsiChar = 'Effect/Register';
+ MS_EFFECT_REGISTERA:pAnsiChar = 'Effect/Register';
MS_EFFECT_REGISTERW:pAnsiChar = 'Effect/RegisterW';
// get a effect
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc index 8eb4aa804c..c46ad2bb5f 100644 --- a/include/delphi/m_helpers.inc +++ b/include/delphi/m_helpers.inc @@ -8,7 +8,7 @@ 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; stackSize:int; pThreadID:puint_ptr):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;
@@ -35,7 +35,7 @@ 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: String): String;{$ifdef FPC}inline;{$endif}
+function TranslateUnicodeString(sz: UnicodeString): UnicodeString;
procedure TranslateDialogDefault(hwndDlg: THandle);
procedure TranslateMenu(hMenu: HMENU);
function Langpack_Register:int_ptr;
@@ -71,6 +71,8 @@ procedure ColourRegisterW(pColorID:pColourIDW); procedure EffectRegister(pEffectID:pEffectID);
procedure EffectRegisterW(pEffectID:pEffectIDW);
+function TopToolbar_AddButton(pButton:PTTBButton):THANDLE;
+
{$ELSE}
function ProtoServiceExists(const proto,service: PAnsiChar): int;
@@ -101,11 +103,13 @@ begin 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;
@@ -122,31 +126,37 @@ begin end;
-function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE; {inline}
+function mir_forkthread(aFunc:pThreadFunc; arg:pointer):THANDLE;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=forkthread(aFunc, 0, arg);
end;
-function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; stackSize:int; pThreadID:puint_ptr):THANDLE; {inline}
+function mir_forkthreadex(aFunc:pThreadFuncEx; arg:pointer; pThreadID:puint_ptr):THANDLE;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
- result:=forkthreadex(nil, stackSize, aFunc, nil, arg, pThreadID);
+ result:=forkthreadex(nil, 0, aFunc, nil, arg, pThreadID);
end;
-function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE; {inline}
+function mir_forkthreadowner(aFunc:pThreadFuncOwner; owner:pointer; arg:pointer; pThreadID:puint_ptr):THANDLE;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=forkthreadex(nil, 0, pThreadFuncEx(aFunc), owner, arg, pThreadID);
end;
function Netlib_CloseHandle(Handle: THandle): int;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_NETLIB_CLOSEHANDLE, Handle, 0);
end;
function Netlib_GetBase64DecodedBufferSize(const cchEncoded: int): int;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := (cchEncoded shr 2) * 3;
end;
function Netlib_GetBase64EncodedBufferSize(const cbDecoded: int): int;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := (cbDecoded * 4+11) div 12*4+1;
end;
@@ -172,6 +182,7 @@ begin end;
procedure Netlib_Log(hNetLib: THandle; const sz: PAnsiChar);
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
CallService(MS_NETLIB_LOG, hNetLib, lParam(sz));
end;
@@ -188,11 +199,13 @@ begin end;
function WindowList_Remove(hList: THandle; hWnd: THandle): int_ptr;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_UTILS_REMOVEFROMWINDOWLIST, hList, hWnd);
end;
function WindowList_Find(hList: THandle; hContact: THandle): int_ptr;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_UTILS_FINDWINDOWINLIST, hList, hContact);
end;
@@ -256,18 +269,20 @@ begin end;
end;
-function lrtrim(str:pAnsiChar):pAnsiChar; {inline}
+function lrtrim(str:pAnsiChar):pAnsiChar;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=ltrim(rtrim(str));
end;
-function lrtrimp(str:pAnsiChar):pAnsiChar; {inline}
+function lrtrimp(str:pAnsiChar):pAnsiChar;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
result:=ltrimp(rtrim(str));
end;
-function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar; {inline}
+function mir_utf8decodeA(const src:pAnsiChar):pAnsiChar;
type
- ppWideChar = ^pWidechar;
+ ppWideChar = ^pWidechar;
var
tmp:pAnsiChar;
begin
@@ -289,19 +304,17 @@ end; function TranslateString(const sz:AnsiString):AnsiString;
begin
- Result:=AnsiString(PAnsiChar(
- CallService(MS_LANGPACK_TRANSLATESTRING,hLangpack,lparam(@sz))));
+ Result:=AnsiString(TranslateA_LP(PAnsiChar(sz),hLangpack));
end;
function TranslateWideString(const sz:WideString):WideString;
begin
- Result:=WideString(PWideChar(
- CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
+ Result:=WideString(TranslateW_LP(PWideChar(sz),hLangpack));
end;
-function TranslateUnicodeString(sz: String): String;{$ifdef FPC}inline;{$endif}
+function TranslateUnicodeString(sz: UnicodeString): UnicodeString;
begin
- Result := String(PChar(CallService(MS_LANGPACK_TRANSLATESTRING, LANG_UNICODE, lParam(sz))));
+ Result:=UnicodeString(TranslateW_LP(PWideChar(sz),hLangpack));
end;
procedure TranslateDialogDefault(hwndDlg: THandle);
@@ -350,11 +363,13 @@ end; function LoadSkinnedIcon(id: int): THandle;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_SKIN_LOADICON, id, 0);
end;
function LoadSkinnedProtoIcon(const szProto: PAnsiChar; status: int): THandle;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_SKIN_LOADPROTOICON, wParam(szProto), status);
end;
@@ -372,6 +387,7 @@ begin end;
function SkinPlaySound (const name: PAnsiChar): int_ptr;
+ {$IFDEF AllowInline}inline;{$ENDIF}
begin
Result := CallService(MS_SKIN_PLAYSOUND, 0, lParam(name));
end;
@@ -450,29 +466,34 @@ end; procedure FontRegister(pFontID:pFontID);
begin
- CallService('Font/Register', WPARAM(pFontID), hLangpack);
+ CallService(MS_FONT_REGISTERA, WPARAM(pFontID), hLangpack);
end;
procedure FontRegisterW(pFontID:pFontIDW);
begin
- CallService('Font/RegisterW', WPARAM(pFontID), hLangpack);
+ CallService(MS_FONT_REGISTERW, WPARAM(pFontID), hLangpack);
end;
procedure ColourRegister(pColorID:pColourID);
begin
- CallService('Colour/Register', WPARAM(pColorID), hLangpack);
+ CallService(MS_COLOUR_REGISTERA, WPARAM(pColorID), hLangpack);
end;
procedure ColourRegisterW(pColorID:pColourIDW);
begin
- CallService('Colour/RegisterW', WPARAM(pColorID), hLangpack);
+ CallService(MS_COLOUR_REGISTERW, WPARAM(pColorID), hLangpack);
end;
procedure EffectRegister(pEffectID:pEffectID);
begin
- CallService('Effect/Register', WPARAM(pEffectID), hLangpack);
+ CallService(MS_EFFECT_REGISTERA, WPARAM(pEffectID), hLangpack);
end;
procedure EffectRegisterW(pEffectID:pEffectIDW);
begin
- CallService('Effect/RegisterW', WPARAM(pEffectID), hLangpack);
+ CallService(MS_EFFECT_REGISTERW, WPARAM(pEffectID), hLangpack);
+end;
+
+function TopToolbar_AddButton(pButton:PTTBButton):THANDLE;
+begin
+ result:=CallService(MS_TTB_ADDBUTTON, WPARAM(pButton), hLangpack);
end;
{$ENDIF}
diff --git a/include/delphi/m_langpack.inc b/include/delphi/m_langpack.inc index 0db455c5b7..82ec483662 100644 --- a/include/delphi/m_langpack.inc +++ b/include/delphi/m_langpack.inc @@ -112,4 +112,12 @@ const }
MS_LANGPACK_RELOAD:PAnsiChar = 'LangPack/Reload';
+{
+ retrieves the hLangpack of a plugin by its HINSTANCE
+ wParam = 0 (ignored)
+ lParam = (LPARAM)(HINSTANCE)plugin's base address
+ returns hLangpack if found, or 0 if error occurred
+}
+ MS_LANGPACK_LOOKUPHANDLE:PAnsiChar = 'LangPack/LookupHandle';
+
{$ENDIF}
diff --git a/include/delphi/m_timezones.inc b/include/delphi/m_timezones.inc index 61bcb69a2b..f73627cea7 100644 --- a/include/delphi/m_timezones.inc +++ b/include/delphi/m_timezones.inc @@ -36,6 +36,9 @@ const UTC_TIME_HANDLE = pointer(-1);
type
+ mir_time = int_ptr;
+
+type
TIME_API = record
cbSize:size_t;
@@ -45,7 +48,7 @@ type printDateTime:function(hTZ:THANDLE; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
- printTimeStamp:function(hTZ:THANDLE; ts:time_t; szFormat:TChar; szDest:TChar;
+ printTimeStamp:function(hTZ:THANDLE; ts:mir_time; szFormat:TChar; szDest:TChar;
cbDest:int; dwFlags:dword):int; cdecl;
prepareList :function (hContact:THANDLE; hWnd:HWND; dwFlags:dword):int; cdecl;
@@ -53,7 +56,7 @@ type storeListResults:procedure(hContact:THANDLE; hWnd:HWND; dwFlags:dword); cdecl;
getTimeZoneTime:function(hTZ:THANDLE; var st:SYSTEMTIME):int; cdecl;
- timeStampToTimeZoneTimeStamp:function(hTZ:THANDLE; ts:time_t):time_t; cdecl;
+ timeStampToTimeZoneTimeStamp:function(hTZ:THANDLE; ts:mir_time):time_t; cdecl;
getTzi:function(hTZ:THANDLE):PTimeZoneInformation; cdecl;
getTzName:function(hTZ:THANDLE):TChar;
diff --git a/include/delphi/m_toolbar.inc b/include/delphi/m_toolbar.inc deleted file mode 100644 index 75d291b073..0000000000 --- a/include/delphi/m_toolbar.inc +++ /dev/null @@ -1,96 +0,0 @@ -{$IFNDEF M_TOOLBAR}
-{$DEFINE M_TOOLBAR}
-
-// Modern contact list toolbar
-
-const
- TOOLBARBUTTON_ICONIDPREFIX = 'MTB_';
- TOOLBARBUTTON_ICONIDPRIMARYSUFFIX = '_Primary';
- TOOLBARBUTTON_ICONIDSECONDARYSUFFIX = '_Secondary';
- TOOLBARBUTTON_ICONNAMEPRESSEDSUFFIX = 'Pressed';
-
-//button flags
- TBBF_DISABLED = 1 shl 0;
- TBBF_VISIBLE = 1 shl 1;
- TBBF_PUSHED = 1 shl 2;
- TBBF_SHOWTOOLTIP = 1 shl 3;
- TBBF_ISSEPARATOR = 1 shl 5;
- TBBF_ISLBUTTON = 1 shl 6;
- TBBF_FLEXSIZESEPARATOR = TBBF_ISSEPARATOR or TBBF_PUSHED;
-
-type
- _tagTBButton = record
- cbSize :int; // size of structure
- pszButtonID :pAnsiChar; // char id of button used to store button info in DB and know about icon
- pszButtonName :pAnsiChar; // name of button (not translated)
- pszServiceName :pAnsiChar; // service name to be executed
- lParam :LPARAM; // param of service to be called
- pszTooltipUp :pAnsiChar;
- pszTooltipDn :pAnsiChar;
- defPos :dword; // default order pos of button (less values are nearer to
- // edge)..please use values greater that 100. the default
- // buttons has pos: 10,20..90
- tbbFlags :dword; // combine of TBBF_ flags above
- ParamDestructor :procedure(var param); //will be called on parameters deletion
- hPrimaryIconHandle :THANDLE;
- hSecondaryIconHandle:THANDLE;
- end;
- TBButton = _tagTBButton;
-
-const
-//////////////////////////////////////////////////////////////////////////
-// Events
-// Only after this event module subscribers should register their buttons
-// wparam=lparam=0
-// don't forget to return 0 to continue processing
- ME_TB_MODULELOADED:PAnsiChar = 'ToolBar/ModuleLoaded';
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-// WPARAM = 0
-// LPARAM = (TBButton *) &description
-// LRESULT = (HANDLE) hButton
-// in order to correctly process default icons via iconlib it should be
-// registered icolib icon with id named:
-// 'TBButton_'+pszButtonID+ 'Up' or +'Down' for Push (2-state) buttons
- MS_TB_ADDBUTTON:PAnsiChar = 'ToolBar/AddButton';
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-// WPARAM = (HANDLE) hButton;
-// LPARAM = 0;
- MS_TB_REMOVEBUTTON:PAnsiChar = 'ToolBar/RemoveButton';
-
-//////////////////////////////////////////////////////////////////////////
-// SetState
-// WPARAM = (HANDLE) hButton;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
- TBST_PUSHED = 1;
- TBST_RELEASED = 0;
- MS_TB_SETBUTTONSTATE:PAnsiChar = 'ToolBar/SetButtonState';
-
-//////////////////////////////////////////////////////////////////////////
-// SetStatebyId
-// WPARAM = (char *) szButtonID;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
- MS_TB_SETBUTTONSTATEBYID:PAnsiChar = 'ToolBar/SetButtonStateId';
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (HANLDE) hButton;
-// LPARAM = 0
-// LRESULT= current state
- MS_TB_GETBUTTONSTATE:PAnsiChar = 'ToolBar/GetButtonState';
-
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (char *) szButtonID;
-// LPARAM = 0
-// LRESULT= current state
- MS_TB_GETBUTTONSTATEBYID:PAnsiChar = 'ToolBar/GetButtonStateId';
-
-{$ENDIF}
diff --git a/include/delphi/m_toptoolbar.inc b/include/delphi/m_toptoolbar.inc index d990c458e8..ab88c97822 100644 --- a/include/delphi/m_toptoolbar.inc +++ b/include/delphi/m_toptoolbar.inc @@ -1,31 +1,35 @@ {$IFNDEF M_TOPTOOLBAR}
{$DEFINE M_TOPTOOLBAR}
+const
+ TTB_OPTDIR = 'TopToolBar';
+
//button flags
const
- TTBBF_DISABLED = 1;
- TTBBF_VISIBLE = 2;
- TTBBF_PUSHED = 4;
- TTBBF_SHOWTOOLTIP = 8;
- TTBBF_ISSEPARATOR = 32;
- TTBBF_ISLBUTTON = 64;
- TTBBF_ICONBYHANDLE = 128;
- TTBBF_ISSBUTTON = 256;
- TTBBF_ASPUSHBUTTON = 512;
+ TTBBF_DISABLED = $0001;
+ TTBBF_VISIBLE = $0002;
+ TTBBF_PUSHED = $0004;
+ TTBBF_SHOWTOOLTIP = $0008;
+ TTBBF_ISSEPARATOR = $0020;
+ TTBBF_ISLBUTTON = $0040;
+ TTBBF_ISSBUTTON = $0100;
+ TTBBF_ASPUSHBUTTON = $0200;
type
PTTBButton = ^TTBButton;
TTBButton = record
- cbSize :int;
- pszService :PAnsiChar; // or program for lButtons
- dwFlags :DWORD;
- lParamUp :LPARAM;
- wParamUp :WPARAM;
- lParamDown :LPARAM;
- wParamDown :WPARAM;
- name :PAnsiChar;
- hIconUp :HICON; // or hIconHandleUp:HANDLE
- hIconDn :HICON; // or hIconHandleDn:HANDLE
+ cbSize :int;
+ pszService :PAnsiChar; // or program for lButtons
+ dwFlags :DWORD;
+ lParamUp :LPARAM;
+ wParamUp :WPARAM;
+ lParamDown :LPARAM;
+ wParamDown :WPARAM;
+ name :PAnsiChar;
+ hIconUp :HICON; // or hIconHandleUp:HANDLE
+ hIconDn :HICON; // or hIconHandleDn:HANDLE
+ pszTooltipUp :PansiChar;
+ pszTooltipDn :PansiChar;
end;
const
@@ -43,12 +47,20 @@ const }
ME_TTB_MODULELOADED:PAnsiChar = 'TopToolBar/ModuleLoaded';
+
+{
+ toptoolbar/initbuttons event
+ wParam = lParam = 0
+ Called when the toolbar needs to add default buttons
+}
+ ME_TTB_INITBUTTONS:PAnsiChar = 'TopToolBar/InitButtons';
+
{
//=== SERVICES ===
toptoolbar/addbutton service
wparam = (TTBButton*)lpTTBButton
- lparam = 0
+ lparam = (hLangpack)
returns: hTTBButton - handle of added button on success, -1 on failure.
}
MS_TTB_ADDBUTTON:PAnsiChar = 'TopToolBar/AddButton';
@@ -105,4 +117,74 @@ const }
MS_TTB_SETBUTTONOPTIONS:PAnsiChar = 'TopToolBar/SetOptions';
+{
+ toptoolbar/setcustomproc service
+ wparam = pfnCustomproc
+ lparam = procedure parameter
+ returns: always returns 0.
+}
+ MS_TTB_SETCUSTOMPROC:PAnsiChar = 'TopToolBar/SetCustomProc';
+
+const
+ TTB_WINDOW_HANDLE = THANDLE(-1);
+
+{
+ this procedure is executed on each button on toolbar
+ and on a toolbar itself with hTTButton == TTB_WINDOW_HANDLE
+ hTTButton = button handle
+ hwndBtn = button window handle
+ userInfo = lParam passed into TopToolbar_SetCustomProc
+}
+type
+ pfnCustomProc = procedure(hTTButton:THANDLE; hwndBtn:HWND; userInfo:LPARAM); cdecl;
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Toolbar internal structures
+
+type
+ TTBCtrlButton = record
+ hWindow:HWND;
+ end;
+
+type
+ pfnTTBPainterFunc = procedure(btnctrl:pointer{PTTBCtrl}; hdc:HDC); cdecl;
+
+type
+ PTTBCtrl = ^TTBCtrl;
+ TTBCtrl = record
+ hWnd :HWND;
+ hFrame :THANDLE;
+ nButtonWidth :int;
+ nButtonHeight:int;
+ nButtonSpace :int;
+ nLastHeight :int; // fix against recursion in WM_SIZE
+ bOrderChanged:boolean; // set by buttons' arrange procedure if the buttons' order was changed
+ bFlatButtons,
+ bAutoSize,
+ bSingleLine :boolean;
+
+ pButtonList :PSortedList;
+
+ lResult :LRESULT; // custom window proc result
+ fnWindowProc :TWNDPROC; // custom window proc
+ end;
+
+type
+ PTBCtrlCustomize = ^TTBCtrlCustomize;
+ TTBCtrlCustomize = record
+ cbLen :size_t; // total length of the internal data structure
+ fnWindowProc:TWNDPROC; // subclassed windows procedure for the custom button
+ end;
+
+{
+ Sets the custom painting procedure for a toolbar
+ wParam = not used
+ lParam = TTBCtrlCustomize*
+ Usage: SendMessage(hwndToolbar, TTB_SETCUSTOM, 0, (LPARAM)&CustomData);
+ Only works on TopToolbars
+}
+const
+ TTB_SETCUSTOM = WM_USER+1;
+
{$ENDIF}
diff --git a/include/delphi/m_updater.inc b/include/delphi/m_updater.inc deleted file mode 100644 index ff000f71bf..0000000000 --- a/include/delphi/m_updater.inc +++ /dev/null @@ -1,126 +0,0 @@ -{$IFNDEF M_UPDATER}
-{$DEFINE M_UPDATER}
-
-{
- if you set Update::szUpdateURL to the following value when registering, as
- well as setting your beta site and version data, updater will ignore
- szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's
- from the backend XML data. for this to work, the plugin name in
- pluginInfo.shortName must match the file listing exactly (except for case)
-}
-const
- UPDATER_AUTOREGISTER = 'UpdaterAUTOREGISTER';
-
-type
- PUpdate_tag = ^TUpdate_tag;
- TUpdate_tag = record
- cbSize : int;
- szComponentName : PAnsiChar; // component name as it will appear in the UI
- // (will be translated before displaying)
- szVersionURL : PAnsiChar; // URL where the current version can be found (NULL to disable)
-
- pbVersionPrefix : PAnsiChar; // bytes occuring in VersionURL before the version,
- // used to locate the version information within
- // the URL data (not that this URL could point at
- // a binary file - dunno why, but it could :)
- cpbVersionPrefix: int; // number of bytes pionted to by pbVersionPrefix
- szUpdateURL : PAnsiChar; // URL where dll/zip is located
- szBetaVersionURL: PAnsiChar; // URL where the beta version can be found (NULL to disable betas)
-
- pbBetaVersionPrefix:PAnsiChar; // bytes occuring in VersionURL before the
- // version, used to locate the version
- // information within the URL data
- cpbBetaVersionPrefix:int; // number of bytes pointed to by pbVersionPrefix
- szBetaUpdateURL : PAnsiChar; // URL where dll/zip is located
- pbVersion : PAnsiChar; // bytes of current version, used for comparison
- // with those in VersionURL
- cpbVersion : int; // number of bytes pionted to by pbVersion
- szBetaChangelogURL:PAnsiChar; // url for displaying changelog for beta versions
- end;
- TUpdate = TUpdate_tag;
- PUpdate = ^TUpdate;
-
-const
- {$IFNDEF WIN64}
- OLD_UPDATER_SIZE = SizeOf(TUpdate)-SizeOf(PAnsiChar);
- {$ELSE}
- OLD_UPDATER_SIZE = SizeOf(TUpdate);
- {$ENDIF}
-
-const
- {
- register a comonent with the updater
- wparam = 0
- lparam = (LPARAM)&Update
- }
- MS_UPDATE_REGISTER:PAnsiChar = 'Update/Register';
-
- {
- register the 'easy' way - use this method if you have no beta URL and the
- plugin is on the miranda file listing
- NOTE: the plugin 'short name' in pluginInfo must match the name of the
- plugin on the file listing, exactly (including case) AND the plugin version
- string on the file listing must be the string version of the version in
- pluginInfo (i.e. 0.0.0.1, so no letters, brackets, etc.)
-
- wParam = (int)fileID - this is the file ID from the file listing
- (i.e. the number at the end of the download link)
- lParam = (PLUGININFO*)&pluginInfo
- }
- MS_UPDATE_REGISTERFL:PAnsiChar = 'Update/RegisterFL';
-
- {
- this function can be used to 'unregister' components - useful for plugins
- that register non-plugin/langpack components and may need to change those
- components on the fly
- lParam = (AnsiChar *)szComponentName
- }
- MS_UPDATE_UNREGISTER:PAnsiChar = 'Update/Unregister';
-
- {
- this event is fired when the startup process is complete, but NOT if a
- restart is imminent it is designed for status managment plugins to use as a
- trigger for beggining their own startup process
- wParam = lParam = 0 (unused)
- (added in version 0.1.6.0)
- }
- ME_UPDATE_STARTUPDONE:PAnsiChar = 'Update/StartupDone';
-
- {
- this service can be used to enable/disable Updater's global status control
- it can be called from the StartupDone event handler
- wParam = (BOOL)enable
- lParam = 0
- (added in version 0.1.6.0)
- }
- MS_UPDATE_ENABLESTATUSCONTROL:PAnsiChar = 'Update/EnableStatusControl';
-
- {
- An description of usage of the above service and event:
- Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
- In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
- say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
- If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
- also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
- this service can be used to determine whether updates are possible for a component with the given name
- wParam = 0
- lParam = (AnsiChar *)szComponentName
- returns TRUE if updates are supported, FALSE otherwise
- }
- MS_UPDATE_ISUPDATESUPPORTED:PAnsiChar = 'Update/IsUpdateSupported';
-
-{
- An description of usage of the above service and event:
- Say you are a status control plugin that normally sets protocol or global
- statuses in your ModulesLoaded event handler.
- In order to make yourself 'updater compatible', you would move the status
- control code from ModulesLoaded to another function, say DoStartup. Then, in
- ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL
- service. If it does not exist, call DoStartup. If it does exist, hook the
- ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may also wish
- to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to
- disable Updater's own status control feature.
-}
-
-{$ENDIF}
diff --git a/plugins/HistoryPlusPlus/compilers.inc b/plugins/HistoryPlusPlus/compilers.inc deleted file mode 100644 index 2117ad3506..0000000000 --- a/plugins/HistoryPlusPlus/compilers.inc +++ /dev/null @@ -1,361 +0,0 @@ -//
-// This file is a copy of tntComplers.inc from TNT controls distribution
-// http://www.tntware.com/delphicontrols/unicode/
-// All copyright and stuff belongs to respective owners
-//
-//----------------------------------------------------------------------------------------------------------------------
-// Include file to determine which compiler is currently being used to build the project/component.
-// This file uses ideas from Brad Stowers DFS.inc file (www.delphifreestuff.com).
-//
-// Portions created by Mike Lischke are Copyright
-// (C) 1999-2002 Dipl. Ing. Mike Lischke. All Rights Reserved.
-//----------------------------------------------------------------------------------------------------------------------
-// The following symbols are defined:
-//
-// COMPILER_1 : Kylix/Delphi/BCB 1.x is the compiler.
-// COMPILER_1_UP : Kylix/Delphi/BCB 1.x or higher is the compiler.
-// COMPILER_2 : Kylix/Delphi 2.x or BCB 1.x is the compiler.
-// COMPILER_2_UP : Kylix/Delphi 2.x or higher, or BCB 1.x or higher is the compiler.
-// COMPILER_3 : Kylix/Delphi/BCB 3.x is the compiler.
-// COMPILER_3_UP : Kylix/Delphi/BCB 3.x or higher is the compiler.
-// COMPILER_4 : Kylix/Delphi/BCB 4.x is the compiler.
-// COMPILER_4_UP : Kylix/Delphi/BCB 4.x or higher is the compiler.
-// COMPILER_5 : Kylix/Delphi/BCB 5.x is the compiler.
-// COMPILER_5_UP : Kylix/Delphi/BCB 5.x or higher is the compiler.
-// COMPILER_6 : Kylix/Delphi/BCB 6.x is the compiler.
-// COMPILER_6_UP : Kylix/Delphi/BCB 6.x or higher is the compiler.
-// COMPILER_7 : Kylix/Delphi/BCB 7.x is the compiler.
-// COMPILER_7_UP : Kylix/Delphi/BCB 7.x or higher is the compiler.
-//
-// Only defined if Windows is the target:
-// CPPB : Any version of BCB is being used.
-// CPPB_1 : BCB v1.x is being used.
-// CPPB_3 : BCB v3.x is being used.
-// CPPB_3_UP : BCB v3.x or higher is being used.
-// CPPB_4 : BCB v4.x is being used.
-// CPPB_4_UP : BCB v4.x or higher is being used.
-// CPPB_5 : BCB v5.x is being used.
-// CPPB_5_UP : BCB v5.x or higher is being used.
-// CPPB_6 : BCB v6.x is being used.
-// CPPB_6_UP : BCB v6.x or higher is being used.
-//
-// Only defined if Windows is the target:
-// DELPHI : Any version of Delphi is being used.
-// DELPHI_1 : Delphi v1.x is being used.
-// DELPHI_2 : Delphi v2.x is being used.
-// DELPHI_2_UP : Delphi v2.x or higher is being used.
-// DELPHI_3 : Delphi v3.x is being used.
-// DELPHI_3_UP : Delphi v3.x or higher is being used.
-// DELPHI_4 : Delphi v4.x is being used.
-// DELPHI_4_UP : Delphi v4.x or higher is being used.
-// DELPHI_5 : Delphi v5.x is being used.
-// DELPHI_5_UP : Delphi v5.x or higher is being used.
-// DELPHI_6 : Delphi v6.x is being used.
-// DELPHI_6_UP : Delphi v6.x or higher is being used.
-// DELPHI_7 : Delphi v7.x is being used.
-// DELPHI_7_UP : Delphi v7.x or higher is being used.
-//
-// Only defined if Linux is the target:
-// KYLIX : Any version of Kylix is being used.
-// KYLIX_1 : Kylix 1.x is being used.
-// KYLIX_1_UP : Kylix 1.x or higher is being used.
-// KYLIX_2 : Kylix 2.x is being used.
-// KYLIX_2_UP : Kylix 2.x or higher is being used.
-// KYLIX_3 : Kylix 3.x is being used.
-// KYLIX_3_UP : Kylix 3.x or higher is being used.
-//
-// Only defined if Linux is the target:
-// QT_CLX : Trolltech's QT library is being used.
-//----------------------------------------------------------------------------------------------------------------------
-
-{$ifdef Win32}
-
- {$ifdef VER180}
- {$define COMPILER_10}
- {$define DELPHI}
- {$define DELPHI_10}
- {$endif}
-
- {$ifdef VER170}
- {$define COMPILER_9}
- {$define DELPHI}
- {$define DELPHI_9}
- {$endif}
-
- {$ifdef VER150}
- {$define COMPILER_7}
- {$define DELPHI}
- {$define DELPHI_7}
- {$endif}
-
- {$ifdef VER140}
- {$define COMPILER_6}
- {$ifdef BCB}
- {$define CPPB}
- {$define CPPB_6}
- {$else}
- {$define DELPHI}
- {$define DELPHI_6}
- {$endif}
- {$endif}
-
- {$ifdef VER130}
- {$define COMPILER_5}
- {$ifdef BCB}
- {$define CPPB}
- {$define CPPB_5}
- {$else}
- {$define DELPHI}
- {$define DELPHI_5}
- {$endif}
- {$endif}
-
- {$ifdef VER125}
- {$define COMPILER_4}
- {$define CPPB}
- {$define CPPB_4}
- {$endif}
-
- {$ifdef VER120}
- {$define COMPILER_4}
- {$define DELPHI}
- {$define DELPHI_4}
- {$endif}
-
- {$ifdef VER110}
- {$define COMPILER_3}
- {$define CPPB}
- {$define CPPB_3}
- {$endif}
-
- {$ifdef VER100}
- {$define COMPILER_3}
- {$define DELPHI}
- {$define DELPHI_3}
- {$endif}
-
- {$ifdef VER93}
- {$define COMPILER_2} // C++ Builder v1 compiler is really v2
- {$define CPPB}
- {$define CPPB_1}
- {$endif}
-
- {$ifdef VER90}
- {$define COMPILER_2}
- {$define DELPHI}
- {$define DELPHI_2}
- {$endif}
-
- {$ifdef VER80}
- {$define COMPILER_1}
- {$define DELPHI}
- {$define DELPHI_1}
- {$endif}
-
- {$ifdef DELPHI_2}
- {$define DELPHI_2_UP}
- {$endif}
-
- {$ifdef DELPHI_3}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$endif}
-
- {$ifdef DELPHI_4}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$endif}
-
- {$ifdef DELPHI_5}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$define DELPHI_5_UP}
- {$endif}
-
- {$ifdef DELPHI_6}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$define DELPHI_5_UP}
- {$define DELPHI_6_UP}
- {$endif}
-
- {$ifdef DELPHI_7}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$define DELPHI_5_UP}
- {$define DELPHI_6_UP}
- {$define DELPHI_7_UP}
- {$endif}
-
- {$ifdef DELPHI_9}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$define DELPHI_5_UP}
- {$define DELPHI_6_UP}
- {$define DELPHI_7_UP}
- {$define DELPHI_9_UP}
- {$endif}
-
- {$ifdef DELPHI_10}
- {$define DELPHI_2_UP}
- {$define DELPHI_3_UP}
- {$define DELPHI_4_UP}
- {$define DELPHI_5_UP}
- {$define DELPHI_6_UP}
- {$define DELPHI_7_UP}
- {$define DELPHI_9_UP}
- {$define DELPHI_10_UP}
- {$endif}
-
- {$ifdef CPPB_3}
- {$define CPPB_3_UP}
- {$endif}
-
- {$ifdef CPPB_4}
- {$define CPPB_3_UP}
- {$define CPPB_4_UP}
- {$endif}
-
- {$ifdef CPPB_5}
- {$define CPPB_3_UP}
- {$define CPPB_4_UP}
- {$define CPPB_5_UP}
- {$endif}
-
- {$ifdef CPPB_6}
- {$define CPPB_3_UP}
- {$define CPPB_4_UP}
- {$define CPPB_5_UP}
- {$define CPPB_6_UP}
- {$endif}
-
- {$ifdef CPPB_3_UP}
- // C++ Builder requires this if you use Delphi components in run-time packages.
- {$ObjExportAll On}
- {$endif}
-
-{$else (not Windows)}
- // Linux is the target
- {$define QT_CLX}
-
- {$define KYLIX}
- {$define KYLIX_1}
- {$define KYLIX_1_UP}
-
- {$ifdef VER150}
- {$define COMPILER_7}
- {$define KYLIX_3}
- {$endif}
-
- {$ifdef VER140}
- {$define COMPILER_6}
- {$define KYLIX_2}
- {$endif}
-
- {$ifdef KYLIX_2}
- {$define KYLIX_2_UP}
- {$endif}
-
- {$ifdef KYLIX_3}
- {$define KYLIX_2_UP}
- {$define KYLIX_3_UP}
- {$endif}
-
-{$endif}
-
-// Compiler defines common to all platforms.
-{$ifdef COMPILER_1}
- {$define COMPILER_1_UP}
-{$endif}
-
-{$ifdef COMPILER_2}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
-{$endif}
-
-{$ifdef COMPILER_3}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
-{$endif}
-
-{$ifdef COMPILER_4}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
-{$endif}
-
-{$ifdef COMPILER_5}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
- {$define COMPILER_5_UP}
-{$endif}
-
-{$ifdef COMPILER_6}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
- {$define COMPILER_5_UP}
- {$define COMPILER_6_UP}
-{$endif}
-
-{$ifdef COMPILER_7}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
- {$define COMPILER_5_UP}
- {$define COMPILER_6_UP}
- {$define COMPILER_7_UP}
-{$endif}
-
-{$ifdef COMPILER_9}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
- {$define COMPILER_5_UP}
- {$define COMPILER_6_UP}
- {$define COMPILER_7_UP}
- {$define COMPILER_9_UP}
-{$endif}
-
-{$ifdef COMPILER_10}
- {$define COMPILER_1_UP}
- {$define COMPILER_2_UP}
- {$define COMPILER_3_UP}
- {$define COMPILER_4_UP}
- {$define COMPILER_5_UP}
- {$define COMPILER_6_UP}
- {$define COMPILER_7_UP}
- {$define COMPILER_9_UP}
- {$define COMPILER_10_UP}
-{$endif}
-
-//----------------------------------------------------------------------------------------------------------------------
-
-{$ALIGN ON}
-{$BOOLEVAL OFF}
-
-{$ifdef COMPILER_7_UP}
- {$define THEME_7_UP} { Allows experimental theme support on pre-Delphi 7. }
-{$endif}
-
-{$IFDEF COMPILER_6_UP}
-{$WARN SYMBOL_PLATFORM OFF} { We are going to use Win32 specific symbols! }
-{$ENDIF}
-
-{$IFDEF COMPILER_7_UP}
-{$WARN UNSAFE_CODE OFF} { We are not going to be "safe"! }
-{$WARN UNSAFE_TYPE OFF}
-{$WARN UNSAFE_CAST OFF}
-{$ENDIF}
\ No newline at end of file diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index ecbcd05108..acde07e54d 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -241,8 +241,6 @@ end; function OnModulesLoad(awParam{0}:WPARAM; alParam{0}:LPARAM):integer; cdecl;
var
menuItem:TCLISTMENUITEM;
- upd: TUpdate;
- hppVersionStr: AnsiString;
begin
// register
hppRegisterGridOptions;
@@ -318,32 +316,6 @@ begin HookFSChanged := HookEvent(ME_FONT_RELOAD,OnFSChanged);
if MetaContactsEnabled then HookMetaDefaultChanged := HookEvent(ME_MC_DEFAULTTCHANGED,OnMetaDefaultChanged);
- // Register in updater
- if Boolean(ServiceExists(MS_UPDATE_REGISTER)) then
- begin
- ZeroMemory(@upd,SizeOf(upd));
- upd.cbSize := SizeOf(upd);
- upd.szComponentName := hppShortName;
-
- hppVersionStr := AnsiString(Format('%d.%d.%d.%d',[hppVerMajor,hppVerMinor,hppVerRelease,hppVerBuild]));
-
- upd.pbVersion := @hppVersionStr[1];
- upd.cpbVersion := Length(hppVersionStr);
- // file listing section
- //upd.szUpdateURL = UPDATER_AUTOREGISTER;
- upd.szUpdateURL := hppFLUpdateURL;
- upd.szVersionURL := hppFLVersionURL;
- upd.pbVersionPrefix := hppFLVersionPrefix;
- upd.cpbVersionPrefix := Length(hppFLVersionPrefix);
- // alpha-beta section
- upd.szBetaUpdateURL := hppUpdateURL;
- upd.szBetaVersionURL := hppVersionURL;
- upd.pbBetaVersionPrefix := hppVersionPrefix;
- upd.cpbBetaVersionPrefix := Length(hppVersionPrefix);
- upd.szBetaChangelogURL := hppChangelogURL;
- CallService(MS_UPDATE_REGISTER, 0, LPARAM(@upd));
- end;
-
// Register in dbeditor
CallService(MS_DBEDIT_REGISTERSINGLEMODULE, WPARAM(PAnsiChar(hppDBName)), 0);
@@ -364,7 +336,7 @@ begin ttb.hIconUp := hppIcons[HPP_ICON_GLOBALSEARCH].handle;
ttb.pszService := MS_HPP_SHOWGLOBALSEARCH;
ttb.dwFlags := TTBBF_VISIBLE or TTBBF_SHOWTOOLTIP;
- ttb.name := PAnsiChar(Translate('Global History Search'));
+ ttb.name := 'Global History Search';
ttb.pszTooltipUp := ttb.name;
CallService(MS_TTB_ADDBUTTON,WPARAM(@ttb), 0);
UnhookEvent(HookTTBLoaded);
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas index 2da3ce2e67..263bdc81a2 100644 --- a/plugins/HistoryPlusPlus/hpp_global.pas +++ b/plugins/HistoryPlusPlus/hpp_global.pas @@ -166,15 +166,7 @@ const hppAuthorEmail = 'themiron@mail.ru, artemf@mail.ru';
hppCopyright = '© 2006-2009 theMIROn, 2003-2006 Art Fedorov. History+ parts © 2001 Christian Kastner';
- hppFLUpdateURL = 'http://addons.miranda-im.org/feed.php?dlfile=2995';
- hppFLVersionURL = 'http://addons.miranda-im.org/details.php?action=viewfile&id=2995';
- hppFLVersionPrefix= '<span class="fileNameHeader">'+hppShortName+' ';
- hppUpdateURL = 'http://themiron.miranda.im/historypp';
- hppVersionURL = 'http://themiron.miranda.im/version';
- hppVersionPrefix = hppName+' version ';
-
hppHomePageURL = 'http://themiron.miranda.im/';
- hppChangelogURL = 'http://themiron.miranda.im/changelog';
hppIPName = 'historypp_icons.dll';
diff --git a/plugins/HistoryPlusPlus/hpp_richedit.pas b/plugins/HistoryPlusPlus/hpp_richedit.pas index ea6f2c1b79..cdfac15c79 100644 --- a/plugins/HistoryPlusPlus/hpp_richedit.pas +++ b/plugins/HistoryPlusPlus/hpp_richedit.pas @@ -1085,9 +1085,9 @@ function GetRichRTF(RichEditHandle: THandle; var RTFStream: String; SelectionOnly, PlainText, NoObjects, PlainRTF: Boolean): Integer; overload;
function GetRichRTF(RichEditHandle: THandle; var RTFStream: AnsiString;
SelectionOnly, PlainText, NoObjects, PlainRTF: Boolean): Integer; overload;
-function SetRichRTF(RichEditHandle: THandle; RTFStream: String;
+function SetRichRTF(RichEditHandle: THandle; const RTFStream: String;
SelectionOnly, PlainText, PlainRTF: Boolean): Integer; overload;
-function SetRichRTF(RichEditHandle: THandle; RTFStream: AnsiString;
+function SetRichRTF(RichEditHandle: THandle; const RTFStream: AnsiString;
SelectionOnly, PlainText, PlainRTF: Boolean): Integer; overload;
function FormatString2RTF(Source: String; Suffix: AnsiString = ''): AnsiString; overload;
function FormatString2RTF(Source: AnsiString; Suffix: AnsiString = ''): AnsiString; overload;
@@ -1328,7 +1328,7 @@ begin Result := es.dwError;
end;
-function SetRichRTF(RichEditHandle: THandle; RTFStream: String;
+function SetRichRTF(RichEditHandle: THandle; const RTFStream: String;
SelectionOnly, PlainText, PlainRTF: Boolean): Integer;
var
Stream: TTextStream;
@@ -1349,7 +1349,7 @@ begin SelectionOnly, PlainText, PlainRTF, PlainText);
end;
-function SetRichRTF(RichEditHandle: THandle; RTFStream: AnsiString;
+function SetRichRTF(RichEditHandle: THandle; const RTFStream: AnsiString;
SelectionOnly, PlainText, PlainRTF: Boolean): Integer;
var
Stream: TTextStream;
diff --git a/plugins/HistoryPlusPlus/m_historypp.inc b/plugins/HistoryPlusPlus/m_historypp.inc deleted file mode 100644 index cca7630295..0000000000 --- a/plugins/HistoryPlusPlus/m_historypp.inc +++ /dev/null @@ -1,191 +0,0 @@ -(*
- History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright (C) 2006-2009 theMIROn, 2003-2006 Art Fedorov.
- History+ parts (C) 2001 Christian Kastner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*)
-
-{-----------------------------------------------------------------------------
- m_historypp (historypp project)
-
- Version: 1.5
- Created: 06.08.2004
- Author: Oxygen
-
- [ Description ]
-
- Header with History++ services declaration
-
- [ History ]
-
- 1.5 (05.08.2004)
- First version
-
- [ Modifications ]
- none
-
- [ Known Issues ]
- none
-
- Contributors: theMIROn, Art Fedorov
------------------------------------------------------------------------------}
-
-{$IFNDEF M_HISTORYPP}
-{$DEFINE M_HISTORYPP}
-
-const
-
- //** VALUES FOR TItemRenderDetails.dwHistoryWindow
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** This is one of the following params,
- //** saying what kind of history window displays
- //** processed item.
-
- // IRDHW_CONTACTHISTORY. The window is ordinary
- // contact history.
- IRDHW_CONTACTHISTORY = $0001;
- // IRDHW_GLOBALHISTORY. The window is global
- // history (system history). Invokes by
- // Menu -> System History
- IRDHW_GLOBALHISTORY = $0002;
- // IRDHW_GLOBALSEARCH. The window is search
- // window and the processed item is the
- // result of the global search.
- IRDHW_GLOBALSEARCH = $0003;
- // IRDHW_EXTERNAL. The window is external window
- IRDHW_EXTERNALGRID = $0004;
-
- //** VALUES FOR TItemRenderDetails.dwFlags
- //** Used in ME_HPP_RICHEDIT_ITEMPROCESS event
- //** These flags inform you about what you are
- //** processing. Like saying that the item is
- //** selected or it's inline or such stuff
-
- // IRDF_SELECTED. The processed item is selected.
- // The background color will always be clHighlight
- // even if you change it (i will change it back).
- // Though, I will not touch font or font color.
- IRDF_SELECTED = $0001;
- // IRDF_INLINE. The RichEdit provided is not one
- // that is used for drawing a cell, but the one
- // used for "inline editing".
- IRDF_INLINE = $0002;
- // IRDF_EVENT. The RichEdit provided is from "Open Event"
- // window. It's the window which opens when you right-click
- // item in contact's history and select "Open"
- IRDF_EVENT = $0004;
-
-type
- TItemRenderDetails = record
- cbSize: DWord; // size of the structure in bytes
- hContact: THandle; // handle to the contact for which the event is processed
- hDBEvent: THandle; // handle to the event which is processed
- dwEventTime: DWord; // timestamp of the event
- wEventType: Word; // Event's flags (see m_database, EVENTTYPE_*; m_icq, ICQEVENTTYPE_*)
- IsEventSent: ByteBool; // Outgoing event. True if DBEF_SENT event flag is present (see m_database)
- dwFlags: DWord; // Any reasonable combination of IRDF_* flags.
- bHistoryWindow: Byte; // What kind of window history. See IRDHW_* values
- pProto: PAnsiChar; // Proto of the event, if available
- pModule: PAnsiChar; // Module of the event, if available
- pText: PWideChar; // Text of the event, not used now
- pExtended: PAnsiChar; // Extended text, used for storing urls, paths and so on
- end;
-
- PItemRenderDetails = ^TItemRenderDetails;
-
-const
- // ME_HPP_RICHEDIT_ITEMPROCESS
- // (supported from 1.5.0)
- // Called when next RichEdit history item
- // is rendered. Third-party plugins can alter it
- // like adding smileys, changing color and so on.
- // wParam - RichEdit control handle
- // lParam - pointer to TItemRenderDetails structure, information
- // about processed item, see TItemRenderDetails for details
- //
- // Note: Changing richedit background color will change the background
- // color of the whole cell! Additionally, the background color
- // of the *selected* cell and richedit is ALWAYS clHighlight,
- // no matter what you do. But font is untouched, so if your
- // plugin changes font color, you may need to handle selected
- // cells differently (use IF_SELECTED flag).
- //
- // Warn: Remeber about changing fonts. You CAN NOT have *different* fonts
- // for the *same* item, depening on your wish. For example, the
- // first time event is fired you set font for Item1 'Arial 10',
- // and the next time you set font for the same Item1 'Arial 12'.
- // Because height is calculated only once, and you may have
- // problems with text painting (when you change font text can
- // become too large and be cut or override another cell)
- //
- // See: hpp_itemprocess_samples.pas for some sample event handlers
- // like SmileyAdd and TextFormat support and special handler
- // kinda of conversation separation
- ME_HPP_RICHEDIT_ITEMPROCESS = 'History++/RichEdit/ItemProcessEvent';
-
- // MS_HPP_SHOWGLOBALSEARCH
- // (supported from 1.5.0)
- // Show Global history search window
- // If already opened, bring it to front
- // wParam - zero
- // lParam - zero
- MS_HPP_SHOWGLOBALSEARCH = 'History++/ShowGlobalSearch';
-
- type
- POpenEventParams = ^TOpenEventParams;
- TOpenEventParams = record
- cbSize: DWord;
- hContact: THandle;
- hDBEvent: THandle;
- pPassword: PAnsiChar;
- end;
-
-const
-
- // MS_HPP_OPENHISTORYEVENT
- // (supported from 1.5.0)
- // (changed in 1.5.110)
- //
- // Opens contact's history and selects
- // provided event
- // wParam - pointer to TOpenEventParams structure
- // lParam - zero
- // Return - BOOL, True if contact opened, False if password
- // field opened
- // Note: if you just want to show contact's history,
- // use system service MS_HISTORY_SHOWCONTACTHISTORY
- MS_HPP_OPENHISTORYEVENT = 'History++/OpenHistoryEvent2';
-
- // MS_HPP_GETVERSION
- // (supported from 1.5.0)
- // Get current History++ version
- // Third-party plugins can use it to know if installed
- // version of History++ supports particular feature
- // wParam - zero
- // lParam - zero
- // Return - current version, via PLUGIN_MAKE_VERSION macro
- MS_HPP_GETVERSION = 'History++/GetVersion';
-
- // MS_HPP_EMPTYHISTORY
- // (supported from 1.5.0.118)
- // Erases contact's history
- // wParam - hContact
- // lParam - zero
- // Notes - hContact can be NULL(0) to empty system history
- MS_HPP_EMPTYHISTORY = 'History++/EmptyHistory';
-
-{$ENDIF}
diff --git a/plugins/ImportTXT/importtxt.dpr b/plugins/ImportTXT/importtxt.dpr index 5cc6d12864..43d4b560e0 100644 --- a/plugins/ImportTXT/importtxt.dpr +++ b/plugins/ImportTXT/importtxt.dpr @@ -44,15 +44,6 @@ uses const MIID_IMPORTTEXT:TGUID = '{6F376B33-D3F4-4c4f-A96B-77DA08043B06}';
-// Updater compatibility data
-const
- VersionURL = 'http://abyss.web.ur.ru/itxt_ver.htm';
- VersionPrefix = 'Current version: ';
- UpdateURL = 'http://abyss.web.ur.ru/importtxt.zip';
- BetaVersionURL = nil;
- BetaVersionPrefix = nil;
- BetaUpdateURL = nil;
- BetaChangelogURL = nil;
var
hwndWizard:HWND;
@@ -113,32 +104,10 @@ begin end;
function OnModulesLoaded(wParam: wParam; lParam: lParam): int; cdecl;
-var
- upd: TUpdate;
- buf: array [0 .. 63] of char;
begin
UnhookEvent(onLoadHook);
result := 0;
EnumProtocols;
- // Register in updater
- if Boolean(ServiceExists(MS_UPDATE_REGISTER)) then
- begin
- ZeroMemory(@upd, sizeof(upd));
- upd.cpbVersion := sizeof(upd);
- upd.szComponentName := PluginInfo.shortName;;
- upd.pbVersion := CreateVersionStringPlugin(@PluginInfo, @buf);
- upd.cpbVersion := lstrlena(upd.pbVersion);
- upd.szUpdateURL := UpdateURL;
- upd.szVersionURL := VersionURL;
- upd.pbVersionPrefix := VersionPrefix;
- upd.cpbVersionPrefix := Length(VersionPrefix);
- upd.szBetaUpdateURL := BetaUpdateURL;
- upd.szBetaVersionURL := BetaVersionURL;
- upd.pbBetaVersionPrefix := BetaVersionPrefix;
- upd.cpbBetaVersionPrefix := Length(upd.pbBetaVersionPrefix);
- upd.szBetaChangelogURL := BetaChangelogURL;
- CallService(MS_UPDATE_REGISTER, 0, tlparam(@upd));
- end;
// check for AutoStart
if (DBReadByte(0, IMPORT_TXT_MODULE, IMPORT_TXT_AS) = 1) and (ProtoCount > 0) then
begin
|