summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-08-07 16:06:30 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-08-07 16:06:30 +0000
commitff7faa65f97479df9f27d51666afc8ac2cef0a22 (patch)
treeaf4624ee7da02fbaf9b54e73b1256df5919b1ef9
parent58d04553c7713477b077809a7f062118522665e4 (diff)
SmileyAdd NMHDR structure part fix
History++ 64 bit smileys animation fixes Delphi API updates git-svn-id: http://svn.miranda-ng.org/main/trunk@1393 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/delphi/m_fingerprint.inc12
-rw-r--r--include/delphi/m_helpers.inc13
-rw-r--r--include/delphi/m_smileyadd.inc17
-rw-r--r--plugins/ExternalAPI/m_smileyadd.h6
-rw-r--r--plugins/HistoryPlusPlus/hpp_itemprocess.pas2
-rw-r--r--plugins/HistoryPlusPlus/hpp_olesmileys.pas30
6 files changed, 34 insertions, 46 deletions
diff --git a/include/delphi/m_fingerprint.inc b/include/delphi/m_fingerprint.inc
index 73622ac6ac..293cf78f08 100644
--- a/include/delphi/m_fingerprint.inc
+++ b/include/delphi/m_fingerprint.inc
@@ -36,18 +36,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
const
{
Service SameClients MS_FP_SAMECLIENTS
- wParam - AnsiChar * first MirVer value
- lParam - AnsiChar * second MirVer value
+ wParam - TChar first MirVer value
+ lParam - TChar second MirVer value
return pointer to AnsiChar string - client desription (DO NOT DESTROY) if clients are same otherwise NULL
}
- MS_FP_SAMECLIENTS:PAnsiChar = 'Fingerprint/SameClients';
+ MS_FP_SAMECLIENTS :PAnsiChar = 'Fingerprint/SameClients';
+ MS_FP_SAMECLIENTSW:PAnsiChar = 'Fingerprint/SameClientsW';
{
ServiceGetClientIcon MS_FP_GETCLIENTICON
- wParam - AnsiChar * MirVer value to get client for.
+ wParam - TChar MirVer value to get client for.
lParam - int noCopy - if wParam is equal to "1" will return icon handler without copiing icon.
}
- MS_FP_GETCLIENTICON:PAnsiChar = 'Fingerprint/GetClientIcon';
+ MS_FP_GETCLIENTICON :PAnsiChar = 'Fingerprint/GetClientIcon';
+ MS_FP_GETCLIENTICONW:PAnsiChar = 'Fingerprint/GetClientIconW';
// Plugin UUIDs for New plugin loader
// req. 0.7.18+ core
diff --git a/include/delphi/m_helpers.inc b/include/delphi/m_helpers.inc
index c46ad2bb5f..bc1668598b 100644
--- a/include/delphi/m_helpers.inc
+++ b/include/delphi/m_helpers.inc
@@ -73,6 +73,9 @@ procedure EffectRegisterW(pEffectID:pEffectIDW);
function TopToolbar_AddButton(pButton:PTTBButton):THANDLE;
+function Options_Open(ood:POPENOPTIONSDIALOG):int_ptr;
+function Options_OpenPage(ood:POPENOPTIONSDIALOG):HWND;
+
{$ELSE}
function ProtoServiceExists(const proto,service: PAnsiChar): int;
@@ -496,4 +499,14 @@ begin
result:=CallService(MS_TTB_ADDBUTTON, WPARAM(pButton), hLangpack);
end;
+function Options_Open(ood:POPENOPTIONSDIALOG):int_ptr;
+begin
+ result:=CallService(MS_OPT_OPENOPTIONS, hLangpack, LPARAM(ood));
+end;
+
+function Options_OpenPage(ood:POPENOPTIONSDIALOG):HWND;
+begin
+ result:=CallService(MS_OPT_OPENOPTIONSPAGE, hLangpack, LPARAM(ood));
+end;
+
{$ENDIF}
diff --git a/include/delphi/m_smileyadd.inc b/include/delphi/m_smileyadd.inc
index ca53073871..ecb3ebb7d1 100644
--- a/include/delphi/m_smileyadd.inc
+++ b/include/delphi/m_smileyadd.inc
@@ -21,10 +21,11 @@
{$IFNDEF M_SMILEYADD}
{$DEFINE M_SMILEYADD}
const
- SAFLRE_INSERTEMF = 2; // insert smiley as EMF into RichEdit, otherwise bitmap
- // inserted this flag allows "true" transparency
- SAFLRE_OUTGOING = 4; // Parsing outgoing message
- SAFLRE_NOCUSTOM = 8; // Do not use custom smileys
+ SAFLRE_INSERTEMF = 2; // insert smiley as EMF into RichEdit, otherwise bitmap
+ // inserted this flag allows "true" transparency
+ SAFLRE_OUTGOING = 4; // Parsing outgoing message
+ SAFLRE_NOCUSTOM = 8; // Do not use custom smileys
+ SAFLRE_FIREVIEW = 16; // use NM_FIREVIEWCHANGE messages
type
PSMADD_RICHEDIT3 = ^TSMADD_RICHEDIT3;
@@ -109,10 +110,10 @@ const
// Message dialogs usually need to redraw it's content on reception of this event
ME_SMILEYADD_OPTIONSCHANGED:PAnsiChar = 'SmileyAdd/OptionsChanged';
- SAFL_PATH = 1; // provide smiley file path, icon otherwise
- SAFL_UNICODE = 2; // string fields in OPTIONSDIALOGPAGE are WCHAR*
- SAFL_OUTGOING = 4; // Parsing outgoing message
- SAFL_NOCUSTOM = 8; // Do not use custom smileys
+ SAFL_PATH = 1; // provide smiley file path, icon otherwise
+ SAFL_UNICODE = 2; // string fields in OPTIONSDIALOGPAGE are WCHAR*
+ SAFL_OUTGOING = 4; // Parsing outgoing message
+ SAFL_NOCUSTOM = 8; // Do not use custom smileys
type
PSMADD_BATCHPARSE2 = ^TSMADD_BATCHPARSE2;
diff --git a/plugins/ExternalAPI/m_smileyadd.h b/plugins/ExternalAPI/m_smileyadd.h
index a4821aba31..5d0984ebee 100644
--- a/plugins/ExternalAPI/m_smileyadd.h
+++ b/plugins/ExternalAPI/m_smileyadd.h
@@ -222,9 +222,9 @@ typedef struct
typedef struct
{
//NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
+ HWND hwndFrom; // Window of smiley host
+ UINT_PTR idFrom; // ignored
+ UINT code; // NM_FIREVIEWCHANGE
size_t cbSize;
BYTE bEvent; // FVCN_ value - pre- or post- painting
diff --git a/plugins/HistoryPlusPlus/hpp_itemprocess.pas b/plugins/HistoryPlusPlus/hpp_itemprocess.pas
index 137fdd28b0..c873502176 100644
--- a/plugins/HistoryPlusPlus/hpp_itemprocess.pas
+++ b/plugins/HistoryPlusPlus/hpp_itemprocess.pas
@@ -459,7 +459,7 @@ begin
sare.rangeToReplace := nil;
sare.ProtocolName := ird^.pProto;
//sare.flags := SAFLRE_INSERTEMF + mesSent[ird^.IsEventSent];
- sare.flags := mesSent[ird^.IsEventSent];
+ sare.flags := mesSent[ird^.IsEventSent] or SAFLRE_FIREVIEW;
sare.disableRedraw := True;
sare.hContact := ird^.hContact;
CallService(MS_SMILEYADD_REPLACESMILEYS,0,LPARAM(@sare));
diff --git a/plugins/HistoryPlusPlus/hpp_olesmileys.pas b/plugins/HistoryPlusPlus/hpp_olesmileys.pas
index 4a07d8259f..2aa278204f 100644
--- a/plugins/HistoryPlusPlus/hpp_olesmileys.pas
+++ b/plugins/HistoryPlusPlus/hpp_olesmileys.pas
@@ -94,40 +94,12 @@ type
*)
-const
+const // additional for animated smileys (idk where introduced)
// Type of Event one of
- FVCN_PREFIRE = 1;
- FVCN_POSTFIRE = 2;
FVCN_GETINFO = 255;
-
// Action of event are going to be done
- FVCA_NONE = 0;
- FVCA_DRAW = 1; // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
- FVCA_CUSTOMDRAW = 2;
- FVCA_INVALIDATE = 3;
- FVCA_SENDVIEWCHANGE = 4;
- FVCA_SKIPDRAW = 5;
FVCA_INFO = 255;
-type
- // Extended NMHDR structure for WM_NOTIFY
- PFVCNDATA_NMHDR= ^TFVCNDATA_NMHDR;
- TFVCNDATA_NMHDR = record
- nmhdr: TNMHdr;
- cbSize: Integer;
- bEvent: Byte;
- bAction: Byte;
- hDC: HDC;
- rcRect: TRect;
- clrBackground: COLORREF;
- fTransparent: BOOL;
- lParam: LPARAM;
- end;
-
-const
- // Code of WM_NOTIFY message (code)
- NM_FIREVIEWCHANGE = NM_FIRST+1;
-
implementation
end.