From d79b254cc7961696ac92ab470dbc37ef147838f3 Mon Sep 17 00:00:00 2001 From: mataes2007 Date: Sat, 26 Nov 2011 17:09:41 +0000 Subject: api files moved to EXternalAPI folder git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@218 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb --- ExternalAPI/m_flags.inc | 74 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 ExternalAPI/m_flags.inc (limited to 'ExternalAPI/m_flags.inc') diff --git a/ExternalAPI/m_flags.inc b/ExternalAPI/m_flags.inc new file mode 100644 index 0000000..f3dc0e8 --- /dev/null +++ b/ExternalAPI/m_flags.inc @@ -0,0 +1,74 @@ +{ +Miranda IM Country Flags Plugin +Copyright (C) 2006-2007 H. Herkenrath + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program 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 General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program (Flags-License.txt); if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +} + +{$ifndef M_FLAGS_H} +{$define M_FLAGS_H} + +const + +{ + Country Flags Plugin v0.1.0.3 +} + +{ interface id } +MIID_FLAGS: TGUID = '{88A3B66E-C438-4381-BC17-71D99D225F9C}'; + +{ Load a country flag icon from the skin library. v0.1.0.0+ +The retrieved icon should be released using MS_SKIN2_RELEASEICON after use. +The country numbers can be retrieved using MS_UTILS_GETCOUNTRYLIST. +Another way to get the country numbers are the CTRY_* constants in winnls.h of WinAPI. +To retrieve the country number from a locale, call GetLocaleInfo(). +with LOCALE_ICOUNTRY. + wParam : countryNumber + lParam : (BOOL)fReturnHandle (nonzero to to retrieve the icolib handle instead of the icon) +Returns a icon handle (HICON) on success, NULL on error. +} +MS_FLAGS_LOADCOUNTRYFLAGICON = 'Flags/LoadCountryFlagIcon'; + +{ Create a merged country flag icon. v0.1.0.0+ +The retrieved icon should be released using DestroyIcon() after use. + wParam : countryNumberUpper + lParam : countryNumberLower +Returns a icon handle (HICON) on success, NULL on error. +} +MS_FLAGS_CREATEMERGEDFLAGICON = 'Flags/CreateMergedFlagIcon'; + +{ Get a corresponding country given an (external) IP address. v0.1.0.0+ +The retrieved number can be converted to a normal country name +using MS_UTILS_GETCOUNTRYBYNUMBER. + wParam : dwExternalIP (same format as used Netlib) + lParam : 0 +Returns a country number on success, +or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this). +} +MS_FLAGS_IPTOCOUNTRY = 'Flags/IpToCountry'; + +{ Detect the origin country of a contact. v0.1.0.0+ +This uses the contacts's IP first, and falls back on using +CNF_COUNTRY and CNF_COCOUNTRY of contact details. +To get the contact's IP it relies on the db setting +"RealIP" in the proto module. + wParam : (WPARAM)(HANDLE)hContact + lParam : 0 +Returns a country number on success, +or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this). +} +MS_FLAGS_DETECTCONTACTORIGINCOUNTRY = 'Flags/DetectContactOriginCountry'; + +{$endif} // M_FLAGS_H -- cgit v1.2.3