diff options
Diffstat (limited to 'MirandaPlugin/Templates')
-rw-r--r-- | MirandaPlugin/Templates/1033/Templates.inf | 26 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/base.cpp | 95 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/base.rc | 82 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/common.cpp | 1 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/common.h | 70 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/filter.cpp | 87 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/filter.h | 9 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/menu.cpp | 87 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/menu.h | 7 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/menu.ico | bin | 0 -> 2550 bytes | |||
-rw-r--r-- | MirandaPlugin/Templates/1033/net.cpp | 20 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/net.h | 10 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/options.cpp | 64 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/options.h | 13 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/readme.txt | 51 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/resource.h | 21 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/resource.rc | 2 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/version.h | 26 | ||||
-rw-r--r-- | MirandaPlugin/Templates/1033/version.rc | 33 |
19 files changed, 704 insertions, 0 deletions
diff --git a/MirandaPlugin/Templates/1033/Templates.inf b/MirandaPlugin/Templates/1033/Templates.inf new file mode 100644 index 0000000..8094d44 --- /dev/null +++ b/MirandaPlugin/Templates/1033/Templates.inf @@ -0,0 +1,26 @@ +readme.txt
+common.h
+common.cpp
+version.h
+version.rc
+base.rc
+resource.rc
+resource.h
+base.cpp
+[!if OPTIONS_PAGE]
+options.cpp
+options.h
+[!endif]
+[!if FILTER_CODE]
+filter.cpp
+filter.h
+[!endif]
+[!if USE_NETLIB]
+net.cpp
+net.h
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+menu.cpp
+menu.h
+menu.ico
+[!endif]
diff --git a/MirandaPlugin/Templates/1033/base.cpp b/MirandaPlugin/Templates/1033/base.cpp new file mode 100644 index 0000000..d0cb971 --- /dev/null +++ b/MirandaPlugin/Templates/1033/base.cpp @@ -0,0 +1,95 @@ +/* Replace "dll.h" with the name of your header */
+#include "common.h"
+#include "version.h"
+#include "resource.h"
+[!if OPTIONS_PAGE]
+#include "options.h"
+[!endif]
+[!if FILTER_CODE]
+#include "filter.h"
+[!endif]
+[!if USE_NETLIB]
+#include "net.h"
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+#include "menu.h"
+[!endif]
+
+///////////////////////////////////////////////
+// Common Plugin Stuff
+///////////////////////////////////////////////
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+
+PLUGININFO pluginInfo={
+ sizeof(PLUGININFO),
+ //META_PROTO,
+ __PLUGIN_NAME, // altered here and on file listing, so as not to match original
+ PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
+ __DESC,
+ __AUTHOR,
+ __AUTHOREMAIL,
+ __COPYRIGHT,
+ __AUTHORWEB,
+ 0,
+ 0
+};
+
+
+extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) {
+ hInst=hinstDLL;
+ return TRUE;
+}
+
+extern "C" __declspec (dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) {
+ return &pluginInfo;
+}
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
+[!if USE_NETLIB]
+ InitNetlib();
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+ InitMenu();
+[!endif]
+
+ return 0;
+}
+
+HANDLE hModulesLoaded;
+extern "C" __declspec (dllexport) int Load(PLUGINLINK *link) {
+ pluginLink=link;
+
+[!if OPTIONS_PAGE]
+ InitOptions();
+[!endif]
+[!if FILTER_CODE]
+
+ /////////////
+ ////// init filter
+ RegisterFilter();
+ AddFilterToContacts();
+[!endif]
+
+ // hook modules loaded
+ hModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ return 0;
+}
+
+extern "C" __declspec (dllexport) int Unload(void) {
+ UnhookEvent(hModulesLoaded);
+[!if MAIN_MENU || CONTACT_MENU]
+ DeinitMenu();
+[!endif]
+[!if USE_NETLIB]
+ DeinitNetlib();
+[!endif]
+[!if FILTER_CODE]
+ DeinitFilter();
+[!endif]
+[!if OPTIONS_PAGE]
+ DeinitOptions();
+[!endif]
+
+ return 0;
+}
diff --git a/MirandaPlugin/Templates/1033/base.rc b/MirandaPlugin/Templates/1033/base.rc new file mode 100644 index 0000000..93bad1c --- /dev/null +++ b/MirandaPlugin/Templates/1033/base.rc @@ -0,0 +1,82 @@ +// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// Neutral (Default) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
+#ifdef _WIN32
+LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
+#pragma code_page(1252)
+#endif //_WIN32
+
+[!if OPTIONS_PAGE]
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_OPT1 DIALOGEX 0, 0, 246, 179
+STYLE DS_SETFONT | WS_POPUP
+FONT 8, "MS Sans Serif", 0, 0, 0x0
+BEGIN
+END
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+IDI_MENU ICON "menu.ico"
+
+[!endif]
+#endif //!defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_NEUD)
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/MirandaPlugin/Templates/1033/common.cpp b/MirandaPlugin/Templates/1033/common.cpp new file mode 100644 index 0000000..3324856 --- /dev/null +++ b/MirandaPlugin/Templates/1033/common.cpp @@ -0,0 +1 @@ +#include "common.h"
diff --git a/MirandaPlugin/Templates/1033/common.h b/MirandaPlugin/Templates/1033/common.h new file mode 100644 index 0000000..8680d6a --- /dev/null +++ b/MirandaPlugin/Templates/1033/common.h @@ -0,0 +1,70 @@ +#ifndef _COMMON_INC
+#define _COMMON_INC
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER // Allow use of features specific to Windows XP or later.
+#define WINVER 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINNT // Allow use of features specific to Windows XP or later.
+#define _WIN32_WINNT 0x0501 // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE // Allow use of features specific to IE 6.0 or later.
+#define _WIN32_IE 0x0600 // Change this to the appropriate value to target other versions of IE.
+#endif
+
+#if defined( UNICODE ) && !defined( _UNICODE )
+#define _UNICODE
+#endif
+
+#include <tchar.h>
+
+#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+
+#include <windows.h>
+#include <commctrl.h>
+
+#include <newpluginapi.h>
+#include <m_system.h>
+#include <m_database.h>
+#include <m_langpack.h>
+[!if OPTIONS_PAGE]
+#include <m_options.h>
+[!endif]
+[!if FILTER_CODE]
+#include <m_protomod.h>
+#include <m_protosvc.h>
+[!endif]
+[!if USE_NETLIB]
+#include <stdio.h> // for m_utils
+#include <winsock2.h> // for FD_SETSIZE
+#include <m_netlib.h>
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+#include <m_clist.h>
+
+////////////
+// included for backward compatibility
+#ifndef CMIF_UNICODE
+#define CMIF_UNICODE 512 //will return TCHAR* instead of char*
+#if defined( _UNICODE )
+ #define CMIF_TCHAR CMIF_UNICODE //will return TCHAR* instead of char*
+#else
+ #define CMIF_TCHAR 0 //will return char*, as usual
+#endif
+#endif
+////////////
+[!endif]
+
+#define MODULE "[!output PROJECT_NAME]"
+
+extern HINSTANCE hInst;
+extern PLUGINLINK *pluginLink;
+
+#endif
diff --git a/MirandaPlugin/Templates/1033/filter.cpp b/MirandaPlugin/Templates/1033/filter.cpp new file mode 100644 index 0000000..56543b3 --- /dev/null +++ b/MirandaPlugin/Templates/1033/filter.cpp @@ -0,0 +1,87 @@ +#include "common.h"
+#include "filter.h"
+
+int FilterSendMessage(WPARAM wParam, LPARAM lParam) {
+ CCSDATA *ccs = (CCSDATA *) lParam;
+ char *message = (char *)ccs->lParam;
+
+ // TODO: process 'message' and/or 'messagew' below
+ if(ccs->wParam & PREF_UNICODE) {
+ wchar_t *messagew = (wchar_t *)&message[strlen(message)+1];
+ } else {
+ }
+
+ return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
+}
+
+int FilterSendMessageW(WPARAM wParam, LPARAM lParam) {
+ CCSDATA *ccs = (CCSDATA *) lParam;
+ ccs->wParam |= PREF_UNICODE;
+
+ return FilterSendMessage(wParam, lParam);
+}
+
+int FilterRecvMessage(WPARAM wParam, LPARAM lParam) {
+ CCSDATA *ccs = (CCSDATA *) lParam;
+ PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
+
+ char *message = pre->szMessage;
+
+ // TODO: process 'message' and/or 'messagew' below
+ if(ccs->wParam & PREF_UNICODE) {
+ wchar_t *messagew = (wchar_t *)&message[strlen(message)+1];
+ } else {
+ }
+
+ return CallService(MS_PROTO_CHAINRECV, wParam, lParam);
+}
+
+int NewContact(WPARAM wParam, LPARAM lParam) {
+ // add filter
+ HANDLE hContact = (HANDLE)wParam;
+ CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )MODULE );
+
+ return 0;
+}
+
+void RegisterFilter() {
+ PROTOCOLDESCRIPTOR pd = {0};
+ pd.cbSize = sizeof(pd);
+ pd.szName = MODULE "Filter";
+ // TODO: modify this to reflect the purpose of your plugin
+ pd.type = PROTOTYPE_FILTER;
+ CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
+}
+
+HANDLE hEventNewContact;
+#define NUM_FILTER_SERVICES 3
+HANDLE hServices[NUM_FILTER_SERVICES];
+
+void AddFilterToContacts() {
+ // this adds us as a filter to all existing and new contacts
+ // TODO: modify this (and the NewContact function above) to include only the contacts required
+ HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
+ while ( hContact != NULL ) {
+ CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )(MODULE "Filter"));
+ hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
+ }
+
+ hEventNewContact = HookEvent(ME_DB_CONTACT_ADDED, NewContact);
+}
+
+void CreateFilterServices() {
+ // create our services
+ int i = 0;
+ hServices[i++] = CreateProtoServiceFunction(MODULE "Filter", PSS_MESSAGE, FilterSendMessage);
+ hServices[i++] = CreateProtoServiceFunction(MODULE "Filter", PSS_MESSAGE"W", FilterSendMessageW);
+ hServices[i++] = CreateProtoServiceFunction(MODULE "Filter", PSR_MESSAGE, FilterRecvMessage);
+
+ // remember to modify the NUM_FILTER_SERVICES #define above if you add more services!
+}
+
+void DeinitFilter() {
+ UnhookEvent(hEventNewContact);
+
+ for(int i = 0; i < NUM_FILTER_SERVICES; i++)
+ DestroyServiceFunction(hServices[i]);
+}
\ No newline at end of file diff --git a/MirandaPlugin/Templates/1033/filter.h b/MirandaPlugin/Templates/1033/filter.h new file mode 100644 index 0000000..0a42110 --- /dev/null +++ b/MirandaPlugin/Templates/1033/filter.h @@ -0,0 +1,9 @@ +#ifndef _FILTER_INC
+#define _FILTER_INC
+
+void RegisterFilter();
+void AddFilterToContacts();
+void CreateFilterServices();
+void DeinitFilter();
+
+#endif
diff --git a/MirandaPlugin/Templates/1033/menu.cpp b/MirandaPlugin/Templates/1033/menu.cpp new file mode 100644 index 0000000..b252fad --- /dev/null +++ b/MirandaPlugin/Templates/1033/menu.cpp @@ -0,0 +1,87 @@ +#include "common.h"
+#include "menu.h"
+#include "resource.h"
+[!if MAIN_MENU]
+
+HANDLE hMenuMain = 0, hServiceMenuMain = 0;
+
+int MainMenuService(WPARAM wParam, LPARAM lParam) {
+ // TODO: add code here that executes when the menu item is chosen
+
+ // e.g. modify main menu item - see m_clist.h
+ //CLISTMENUITEM menu = {0};
+ //menu.cbSize=sizeof(menu);
+ //menu.flags = CMIM_NAME | CMIF_TCHAR;
+ //menu.ptszName = (char *)TranslateT("Changed menu text");
+ //CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuMain, (LPARAM)&menu);
+
+ return 0;
+}
+[!endif]
+[!if CONTACT_MENU]
+
+HANDLE hMenuContact = 0, hServiceMenuContact = 0, hEventMenuBuild = 0;
+
+int ContactMenuService(WPARAM wParam, LPARAM lParam) {
+ HANDLE hContact = (HANDLE)wParam;
+ // TODO: add code here that executes when the menu item is chosen
+
+ // e.g. you could modify the menu item here - see below
+ return 0;
+}
+
+// this function is called when the contact's menu is about to be shown - you can e.g.
+// modify the menu here using the MS_CLIST_MODIFYMENUITEM service
+int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
+ HANDLE hContact = (HANDLE)wParam;
+ // TODO: add code here that executes when the menu is constructed
+
+ // e.g. modify menu item - see m_clist.h
+ //CLISTMENUITEM menu = {0};
+ //menu.cbSize=sizeof(menu);
+ //menu.flags = CMIM_NAME | CMIF_TCHAR;
+ //menu.ptszName = (char *)TranslateT("Changed menu text");
+ //CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)hMenuContact, (LPARAM)&menu);
+
+ return 0;
+}
+[!endif]
+
+void InitMenu() {
+ CLISTMENUITEM menu = {0};
+ menu.cbSize=sizeof(menu);
+
+ menu.flags = CMIM_ALL | CMIF_TCHAR;
+ menu.hIcon = (HICON)LoadImage(hInst, MAKEINTRESOURCE(IDI_MENU), IMAGE_ICON, 0, 0, 0);
+[!if MAIN_MENU]
+
+ // main menu item
+ hServiceMenuMain = CreateServiceFunction(MODULE "/MainMenu", MainMenuService);
+ menu.ptszName = TranslateT(MODULE);
+ menu.pszService = MODULE "/MainMenu";
+ menu.position = 0;
+ hMenuMain = (HANDLE)CallService(MS_CLIST_ADDMAINMENUITEM,0,(LPARAM)&menu);
+[!endif]
+[!if CONTACT_MENU]
+
+ // contact menu item
+ hServiceMenuContact = CreateServiceFunction(MODULE "/ContactMenu", ContactMenuService);
+ menu.ptszName = TranslateT(MODULE);
+ menu.pszService = MODULE "/ContactMenu";
+ menu.position = 0;
+ menu.flags = CMIF_NOTOFFLINE; // only show for not-offline contacts
+ hMenuContact = (HANDLE)CallService(MS_CLIST_ADDCONTACTMENUITEM,0,(LPARAM)&menu);
+
+ hEventMenuBuild = HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
+[!endif]
+}
+
+void DeinitMenu() {
+[!if CONTACT_MENU]
+ UnhookEvent(hEventMenuBuild);
+ DestroyServiceFunction(hServiceMenuContact);
+[!endif]
+[!if MAIN_MENU]
+ DestroyServiceFunction(hServiceMenuMain);
+[!endif]
+}
\ No newline at end of file diff --git a/MirandaPlugin/Templates/1033/menu.h b/MirandaPlugin/Templates/1033/menu.h new file mode 100644 index 0000000..0add0ed --- /dev/null +++ b/MirandaPlugin/Templates/1033/menu.h @@ -0,0 +1,7 @@ +#ifndef _MENU_INC
+#define _MENU_INC
+
+void InitMenu();
+void DeinitMenu();
+
+#endif
diff --git a/MirandaPlugin/Templates/1033/menu.ico b/MirandaPlugin/Templates/1033/menu.ico Binary files differnew file mode 100644 index 0000000..94f62a2 --- /dev/null +++ b/MirandaPlugin/Templates/1033/menu.ico diff --git a/MirandaPlugin/Templates/1033/net.cpp b/MirandaPlugin/Templates/1033/net.cpp new file mode 100644 index 0000000..e7beb8a --- /dev/null +++ b/MirandaPlugin/Templates/1033/net.cpp @@ -0,0 +1,20 @@ +#include "common.h"
+#include "net.h"
+
+HANDLE hNetlibUser = 0;
+
+void InitNetlib() {
+ NETLIBUSER nl_user = {0};
+ nl_user.cbSize = sizeof(nl_user);
+ nl_user.szSettingsModule = MODULE;
+ nl_user.flags = NUF_OUTGOING | NUF_HTTPCONNS;
+ nl_user.szDescriptiveName = "Updater";
+
+ hNetlibUser = (HANDLE)CallService(MS_NETLIB_REGISTERUSER, 0, (LPARAM)&nl_user);
+}
+
+void DeinitNetlib() {
+ if(hNetlibUser)
+ CallService(MS_NETLIB_CLOSEHANDLE, (WPARAM)hNetlibUser, 0);
+}
+
diff --git a/MirandaPlugin/Templates/1033/net.h b/MirandaPlugin/Templates/1033/net.h new file mode 100644 index 0000000..95a5009 --- /dev/null +++ b/MirandaPlugin/Templates/1033/net.h @@ -0,0 +1,10 @@ +#ifndef _NET_INC
+#define _NET_INC
+
+// uncomment this if you need access elsewhere
+//extern HANDLE hNetlibUser;
+
+void InitNetlib();
+void DeinitNetlib();
+
+#endif
\ No newline at end of file diff --git a/MirandaPlugin/Templates/1033/options.cpp b/MirandaPlugin/Templates/1033/options.cpp new file mode 100644 index 0000000..593846a --- /dev/null +++ b/MirandaPlugin/Templates/1033/options.cpp @@ -0,0 +1,64 @@ +#include "common.h"
+#include "options.h"
+#include "resource.h"
+
+void LoadOptions() {
+ //DBWriteContactSettingDword(0, MODULE, "Dummy", options.dummy);
+}
+
+void SaveOptions() {
+ //options.dummy = DBGetContactSettingDword(0, MODULE, "Dummy", 0);
+}
+
+BOOL CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) {
+ static HANDLE hItemAll;
+
+ switch ( msg ) {
+ case WM_INITDIALOG:
+ TranslateDialogDefault( hwndDlg );
+ return FALSE;
+ case WM_COMMAND:
+ break;
+ case WM_NOTIFY:
+ switch(((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ switch (((LPNMHDR)lParam)->code)
+ {
+ case PSN_APPLY:
+ SaveOptions();
+ }
+ break;
+ }
+ break;
+ }
+
+ return 0;
+}
+
+int OptInit(WPARAM wParam, LPARAM lParam) {
+ OPTIONSDIALOGPAGE odp = { 0 };
+ odp.cbSize = sizeof(odp);
+ odp.flags = ODPF_BOLDGROUPS;
+ odp.flags |= ODPF_TCHAR;
+ odp.position = -790000000;
+ odp.hInstance = hInst;
+
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT1);
+ odp.ptszTitle = TranslateT(MODULE);
+ odp.ptszGroup = TranslateT("Plugins");
+ odp.nIDBottomSimpleControl = 0;
+ odp.pfnDlgProc = DlgProcOpts;
+ CallService( MS_OPT_ADDPAGE, wParam,( LPARAM )&odp );
+
+ return 0;
+}
+
+HANDLE hEventOptInit;
+void InitOptions() {
+ hEventOptInit = HookEvent(ME_OPT_INITIALISE, OptInit);
+ LoadOptions();
+}
+
+void DeinitOptions() {
+ UnhookEvent(hEventOptInit);
+}
diff --git a/MirandaPlugin/Templates/1033/options.h b/MirandaPlugin/Templates/1033/options.h new file mode 100644 index 0000000..82c90c7 --- /dev/null +++ b/MirandaPlugin/Templates/1033/options.h @@ -0,0 +1,13 @@ +#ifndef _OPTIONS_INC
+#define _OPTIONS_INC
+
+typedef struct {
+ int dummy;
+} Options;
+
+extern Options options;
+
+void InitOptions();
+void DeinitOptions();
+
+#endif
diff --git a/MirandaPlugin/Templates/1033/readme.txt b/MirandaPlugin/Templates/1033/readme.txt new file mode 100644 index 0000000..e3a656a --- /dev/null +++ b/MirandaPlugin/Templates/1033/readme.txt @@ -0,0 +1,51 @@ +========================================================================
+ Miranda Plugin : [!output PROJECT_NAME] Project Overview
+========================================================================
+
+Miranda Plugin has created this [!output PROJECT_NAME] project for you as a starting point.
+
+This file contains a summary of what you will find in each of the files that make up your project.
+
+[!output PROJECT_NAME].vcproj
+ This is the main project file for projects generated using an Application Wizard.
+ It contains information about the version of the product that generated the file, and
+ information about the platforms, configurations, and project features selected with the
+ Application Wizard.
+
+[!output PROJECT_NAME].cpp
+ Main plugin file. Contains the functions necessary for the plugin to load.
+
+[!output PROJECT_NAME].rc
+ Project resources - this is the the only resource file that should require editing on your part!
+[!if OPTIONS_PAGE]
+ This file contains for example the options dialog page.
+[!endif]
+
+version.h
+ Version information
+
+version.rc
+ Version resource - do not edit!
+
+common.h
+ Common includes - also acts as the procompiled header file for the project.
+
+common.cpp
+ Just includes the common.h header file.
+
+resource.h
+ Resource defines
+
+resource.rc
+ Binds together the version and plugin resources - do not edit!
+
+[!if OPTIONS_PAGE]
+options.cpp
+options.h
+ These files contain the dialog procedure for the options page, and placeholders for options including save and load routines.
+[!endif]
+
+/////////////////////////////////////////////////////////////////////////////
+Other notes:
+
+/////////////////////////////////////////////////////////////////////////////
diff --git a/MirandaPlugin/Templates/1033/resource.h b/MirandaPlugin/Templates/1033/resource.h new file mode 100644 index 0000000..b18d761 --- /dev/null +++ b/MirandaPlugin/Templates/1033/resource.h @@ -0,0 +1,21 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by MetaContacts.rc
+//
+[!if OPTIONS_PAGE]
+#define IDD_OPT1 109
+[!endif]
+[!if MAIN_MENU || CONTACT_MENU]
+#define IDI_MENU 110
+[!endif]
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 120
+#define _APS_NEXT_COMMAND_VALUE 40001
+#define _APS_NEXT_CONTROL_VALUE 1001
+#define _APS_NEXT_SYMED_VALUE 101
+#endif
+#endif
diff --git a/MirandaPlugin/Templates/1033/resource.rc b/MirandaPlugin/Templates/1033/resource.rc new file mode 100644 index 0000000..37de854 --- /dev/null +++ b/MirandaPlugin/Templates/1033/resource.rc @@ -0,0 +1,2 @@ +#include "version.rc"
+#include "[!output PROJECT_NAME].rc"
diff --git a/MirandaPlugin/Templates/1033/version.h b/MirandaPlugin/Templates/1033/version.h new file mode 100644 index 0000000..089b09f --- /dev/null +++ b/MirandaPlugin/Templates/1033/version.h @@ -0,0 +1,26 @@ +// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
+// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not
+// take effect within the version resource)
+
+#define __MAJOR_VERSION 0
+#define __MINOR_VERSION 0
+#define __RELEASE_NUM 0
+#define __BUILD_NUM 1
+
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
+#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
+#define __STRINGIFY(x) #x
+#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
+
+#ifdef _UNICODE
+#define __PLUGIN_NAME "[!output PROJECT_NAME] (Unicode)"
+#else
+#define __PLUGIN_NAME "[!output PROJECT_NAME]"
+#endif
+#define __FILENAME "[!output PROJECT_NAME].dll"
+
+#define __DESC "[!output PLUGIN_DESC]"
+#define __AUTHOR "[!output AUTHOR_NAME]"
+#define __AUTHOREMAIL "[!output AUTHOR_EMAIL]"
+#define __AUTHORWEB "[!output AUTHOR_WEB]"
+#define __COPYRIGHT "[!output COPYRIGHT]"
diff --git a/MirandaPlugin/Templates/1033/version.rc b/MirandaPlugin/Templates/1033/version.rc new file mode 100644 index 0000000..0bb7a49 --- /dev/null +++ b/MirandaPlugin/Templates/1033/version.rc @@ -0,0 +1,33 @@ +
+#include <windows.h>
+#include "version.h"
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION __FILEVERSION_STRING
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "000004b0"
+ BEGIN
+ VALUE "Author", __AUTHOR
+ VALUE "FileDescription", __DESC
+ VALUE "InternalName", __PLUGIN_NAME
+ VALUE "LegalCopyright", __COPYRIGHT
+ VALUE "OriginalFilename", __FILENAME
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0, 1200
+ END
+END
|