summaryrefslogtreecommitdiff
path: root/include/delphi/m_extraicons.inc
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-07-04 20:10:29 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-07-04 20:10:29 +0000
commit65e002b63efdb00571d0ba4ec1a73b14e1d7d3a0 (patch)
treed96b2f52ca3c89172f269cdb172c89cf6141d69c /include/delphi/m_extraicons.inc
parentd7f143dba9e53347a1d7897bcd3989751c7f45f8 (diff)
Pascal headers moved to include\delphi directory (with small updates)
removed deprecated m_mwclc.h file and link on it in AutoShutdown plugin git-svn-id: http://svn.miranda-ng.org/main/trunk@763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/delphi/m_extraicons.inc')
-rw-r--r--include/delphi/m_extraicons.inc87
1 files changed, 87 insertions, 0 deletions
diff --git a/include/delphi/m_extraicons.inc b/include/delphi/m_extraicons.inc
new file mode 100644
index 0000000000..b6c1a028df
--- /dev/null
+++ b/include/delphi/m_extraicons.inc
@@ -0,0 +1,87 @@
+{
+ Copyright (C) 2009 Ricardo Pescuma Domenecci
+
+ This is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this file; see the file license.txt. If
+ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+}
+
+{$IFNDEF M_EXTRAICONS}
+{$DEFINE M_EXTRAICONS}
+
+const
+ EXTRAICON_TYPE_CALLBACK = 0; // Similar to old clist callbacks, it fires 2 notifications
+ EXTRAICON_TYPE_ICOLIB = 1; // This extra icon will use only icons registered with icolib.
+ // No callbacks needed. Just call MS_EXTRAICON_SET_ICON passing the name of the
+ // extraicon to set one.
+
+type
+ TEXTRAICON_INFO = record
+ cbSize:int;
+ _type :int; // One of EXTRAICON_TYPE_*
+ name :PAnsiChar; // Internal name. More than one plugin can register extra icons
+ // with the same name if both have the same type. In this case,
+ // both will be handled as one. This is usefull for ex for extra
+ // status, where icq and jabber can share the same slot.
+ // If the types are different the second one will be denied.
+ description:PAnsiChar; // [Translated by plugin] Description to be used in GUI
+ descIcon :PAnsiChar; // [Optional] Name of an icon registered with icolib to be used in GUI.
+
+ // If type == EXTRAICON_TYPE_CALLBACK this two must be set
+
+ // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
+ // wParam=lParam=0
+ RebuildIcons:TMIRANDAHOOK;
+
+ // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
+ // wParam = HANDLE hContact
+ // lParam = int slot
+ ApplyIcon:TMIRANDAHOOK;
+
+ // Other optional callbacks
+
+ // [Optional] Callback called when extra icon was clicked
+ // wParam = HANDLE hContact
+ // lParam = int slot
+ // param = onClickParam
+ OnClick:TMIRANDAHOOKPARAM;
+
+ onClickParam:LPARAM;
+ end;
+
+const
+// Register an extra icon
+// wParam = (EXTRAICON_INFO *) Extra icon info
+// lParam = 0
+// Return: (HANDLE) id of extra icon on success, 0 on error
+ MS_EXTRAICON_REGISTER:PAnsiChar = 'ExtraIcon/Register';
+
+type
+ TEXTRAICON = record
+ cbSize :int;
+ hExtraIcon:THANDLE; // Value returned by MS_EXTRAICON_REGISTER
+ hContact :THANDLE; // Contact to set the extra icon
+ // The icon to be set. This depends on the type of the extra icon:
+ case boolean of
+ false:(hImage :THANDLE); // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
+ true :(icoName:PAnsiChar); // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
+ end;
+
+const
+// Set an extra icon icon
+// wParam = (EXTRAICON *) Extra icon
+// Return: 0 on success
+ MS_EXTRAICON_SET_ICON:PAnsiChar = 'ExtraIcon/SetIcon';
+
+{$ENDIF}