summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-04-30 16:09:47 +0000
committerpescuma <pescuma@c086bb3d-8645-0410-b8da-73a8550f86e7>2009-04-30 16:09:47 +0000
commit1384fbb1943d788c3d81aecc979c90fd3eb8b423 (patch)
tree7767635f06dc1b5a8eea2e7fe681f0c4060d2c66
parent9451a687c9f422b54d1cbb21f6d8648dd2036845 (diff)
extraicons: better documentation in the headers
git-svn-id: http://pescuma.googlecode.com/svn/trunk/Miranda@171 c086bb3d-8645-0410-b8da-73a8550f86e7
-rw-r--r--Plugins/extraicons/m_extraicons.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/Plugins/extraicons/m_extraicons.h b/Plugins/extraicons/m_extraicons.h
index 54cc395..1e86cb1 100644
--- a/Plugins/extraicons/m_extraicons.h
+++ b/Plugins/extraicons/m_extraicons.h
@@ -20,6 +20,31 @@
#ifndef __M_EXTRAICONS_H__
#define __M_EXTRAICONS_H__
+
+/*
+
+There is 2 ways of registering with Extra Icons service:
+
+1. Using callbacks
+ This works similar to clist API. When you register you provide 2 callbacks, one to rebuild the icons
+and one to apply the icons for a contact.
+ In the RebuildIcons callback, all icons that will be used have to be registered calling
+MS_CLIST_EXTRA_ADD_ICON service. The value returned by this service has to be stored and used in the
+apply icons.
+ The ApplyIcons callback will be called for all the needed contacts. Inside it, you must call
+MS_EXTRAICON_SET_ICON to set the icon for the contact, sending the value returned by MS_CLIST_EXTRA_ADD_ICON
+as the hImage.
+
+2. Using icolib
+ In this case no callback is needed and the plugin just need to call MS_EXTRAICON_SET_ICON passing the
+icolib name in icoName when needed. If your plugin can have extra icons on startup, remember to do a loop
+over all contacts to set the initial icon.
+
+
+To register a new extra icon, you have to call MS_EXTRAICON_REGISTER passing the needed atributes.
+
+*/
+
#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
@@ -33,7 +58,6 @@ typedef struct {
int type; // One of EXTRAICON_TYPE_*
const char *name; // 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.
const char *description; // [Translated by plugin] Description to be used in GUI
const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.