summaryrefslogtreecommitdiff
path: root/plugins/Watrack/global.pas
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 18:43:29 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 18:43:29 +0000
commit864081102a5f252415f41950b3039a896b4ae9c5 (patch)
treec6b764651e9dd1f8f53b98eab05f16ba4a492a79 /plugins/Watrack/global.pas
parentdb5149b48346c417e18add5702a9dfe7f6e28dd0 (diff)
Awkwars's plugins - welcome to our trunk
git-svn-id: http://svn.miranda-ng.org/main/trunk@1822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Watrack/global.pas')
-rw-r--r--plugins/Watrack/global.pas86
1 files changed, 86 insertions, 0 deletions
diff --git a/plugins/Watrack/global.pas b/plugins/Watrack/global.pas
new file mode 100644
index 0000000000..14d915a973
--- /dev/null
+++ b/plugins/Watrack/global.pas
@@ -0,0 +1,86 @@
+{WATrack global datas}
+unit Global;
+
+interface
+
+uses windows,messages,wat_api;
+
+const
+ hwndTooltip:HWND=0;
+
+var
+ UserCP:dword;
+
+const
+ DLGED_INIT = $1000; // dialog init, not activate Apply button
+
+const
+ dsWait = -1;
+ dsEnabled = 0;
+ dsTemporary = 1;
+ dsPermanent = 2;
+
+// --- type definition ---
+type
+ pwModule = ^twModule;
+ twModule = record
+ Next :pwModule;
+ Init :function(aGetStatus:boolean=false):integer;
+ DeInit :procedure(aSetDisable:boolean);
+ AddOption :function(var tmpl:pAnsiChar;var proc:pointer;var name:pAnsiChar):integer;
+ ModuleName:pWideChar;
+ ModuleStat:integer; // filling by the way
+ Button :HWND; // checkboxes for switch on/off
+// AddOption:function(parent:HWND;var Dlg:integer;var name:pWideChar):integer;
+ end;
+
+const
+ PluginName = 'Winamp Track';
+ PluginShort:PAnsiChar = 'WATrack';
+
+const
+ ModuleLink:pwModule=nil;
+
+const
+ DisablePlugin :integer=0;
+ hHookWATStatus:THANDLE=0;
+
+// --- global functions ---
+
+procedure MakeHint (wnd:HWND;id:integer;txt:pAnsiChar);
+procedure MakeHintW(wnd:HWND;id:integer;txt:pWideChar);
+
+implementation
+
+uses common,commctrl,mirutils,m_api;//,templates;
+
+procedure MakeHint(wnd:HWND;id:integer;txt:pAnsiChar);
+var
+ ti:TTOOLINFOW;
+begin
+// FillChar(ti,SizeOf(ti),0);
+ ti.cbSize :=sizeof(TTOOLINFOW);
+ ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
+ ti.hwnd :=wnd;
+ ti.hinst :=hInstance;
+ ti.uId :=GetDlgItem(wnd,id);
+ ti.lpszText:=TranslateA2W(txt);
+ SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
+ mFreeMem(ti.lpszText);
+end;
+
+procedure MakeHintW(wnd:HWND;id:integer;txt:pWideChar);
+var
+ ti:TTOOLINFOW;
+begin
+// FillChar(ti,SizeOf(ti),0);
+ ti.cbSize :=sizeof(TTOOLINFOW);
+ ti.uFlags :=TTF_IDISHWND or TTF_SUBCLASS;
+ ti.hwnd :=wnd;
+ ti.hinst :=hInstance;
+ ti.uId :=GetDlgItem(wnd,id);
+ ti.lpszText:=TranslateW(txt);
+ SendMessageW(hwndTooltip,TTM_ADDTOOLW,0,lparam(@ti));
+end;
+
+end.