summaryrefslogtreecommitdiff
path: root/plugins/ExternalAPI/delphi/m_tipper.inc
blob: 452904113d162e85a99775381886f160452b540b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
 Tipper API
 note: Tipper is internally unicode and requires unicows.dll to function
 correctly on 95/98/ME so you'll find a lot of wchar_t stuff in here

 translation function type
 use hContact, module and setting to read your db value(s) and put the resulting
 string into buff return buff if the translation was successful, or return 0 for failure
}
{$IFNDEF M_TIPPER}
{$DEFINE M_TIPPER}
type
  TranslateFunc = function (hContact:HCONTACT;module:PAnsiChar;setting_or_prefix:PAnsiChar;
       buff:pWideChar;bufflen:int):pWideChar; cdecl;

type
  PDBVTranslation = ^TDBVTranslation;
  TDBVTranslation = record
    tfunc:TranslateFunc; // address of your translation function (see typedef above)
    name :pWideChar;     // make sure this is unique, and DO NOT translate it
    id   :dword;         // will be overwritten by Tipper - do not use
  end;

{
  add a translation to tipper
  wParam not used
  lParam = pointer to PDBVTranslation
}
const
  MS_TIPPER_ADDTRANSLATION:PAnsiChar = 'Tipper/AddTranslation';

{
  Show tooltip
  wParam - optional (PAnsiChar) text for text-only tips
  lParam - (PCLCINFOTIP) infoTip
}
  MS_TIPPER_SHOWTIP:PAnsiChar = 'mToolTip/ShowTip';

{
  unicode extension to the basic functionality
  wParam - optional (pWideChar) text for text-only tips
  lParam - (PCLCINFOTIP) infoTip
}
  MS_TIPPER_SHOWTIPW:PAnsiChar = 'mToolTip/ShowTipW';

{
  wParam=lParam=0;
}
  MS_TIPPER_HIDETIP:PAnsiChar = 'mToolTip/HideTip';

{$ENDIF}