diff options
author | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2009-06-23 05:49:14 +0000 |
---|---|---|
committer | (no author) <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> | 2009-06-23 05:49:14 +0000 |
commit | 8be72996c3d3ea0c1d2c42327b958d39e2c7bdba (patch) | |
tree | 027d07eaad9d6e2510c861b1c95e4f644d46fa96 | |
parent | 758f2c5c1f81cd566e65df9b851874525b5091fc (diff) |
patch for changes to m_skin_eng.h (thanks Uwe)
some fixes to include paths
vc 8 & 9 project files
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@465 4f64403b-2f21-0410-a795-97e2b3489a10
-rw-r--r-- | worldtime/WorldTime.cpp | 2 | ||||
-rw-r--r-- | worldtime/WorldTime.h | 16 | ||||
-rw-r--r-- | worldtime/WorldTime_8.sln (renamed from worldtime/WorldTime.sln) | 2 | ||||
-rw-r--r-- | worldtime/WorldTime_8.vcproj (renamed from worldtime/WorldTime.vcproj) | 0 | ||||
-rw-r--r-- | worldtime/WorldTime_9.sln | 20 | ||||
-rw-r--r-- | worldtime/WorldTime_9.vcproj | 427 | ||||
-rw-r--r-- | worldtime/m_skin_eng.h | 434 | ||||
-rw-r--r-- | worldtime/plugwin.h | 3 | ||||
-rw-r--r-- | worldtime/resource.h | 3 |
9 files changed, 895 insertions, 12 deletions
diff --git a/worldtime/WorldTime.cpp b/worldtime/WorldTime.cpp index 7e46359..5978cba 100644 --- a/worldtime/WorldTime.cpp +++ b/worldtime/WorldTime.cpp @@ -7,7 +7,7 @@ PLUGINLINK *pluginLink; PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
"World Time",
- PLUGIN_MAKE_VERSION(0, 4, 0, 0),
+ PLUGIN_MAKE_VERSION(0, 4, 0, 2),
"Display world times.",
"Scott Ellis",
"mail@scottellis.com.au",
diff --git a/worldtime/WorldTime.h b/worldtime/WorldTime.h index b0205b5..595f20f 100644 --- a/worldtime/WorldTime.h +++ b/worldtime/WorldTime.h @@ -18,14 +18,14 @@ #include "timezone.h"
//#include "../../include/newpluginapi.h"
-#include "../../include/m_clui.h"
-#include "../../include/m_system.h"
-#include "../../include/m_options.h"
-#include "../../include/m_protocols.h"
-#include "../../include/m_protomod.h"
-#include "../../include/m_protosvc.h"
-
-#include "../../include/m_updater.h"
+#include <m_clui.h>
+#include <m_system.h>
+#include <m_options.h>
+#include <m_protocols.h>
+#include <m_protomod.h>
+#include <m_protosvc.h>
+
+#include <m_updater.h>
//#include "../../include/m_clist.h"
//#include "../../include/m_skin.h"
diff --git a/worldtime/WorldTime.sln b/worldtime/WorldTime_8.sln index 34702e9..ef037cd 100644 --- a/worldtime/WorldTime.sln +++ b/worldtime/WorldTime_8.sln @@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 9.00
# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorldTime", "WorldTime.vcproj", "{5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorldTime", "WorldTime_8.vcproj", "{5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/worldtime/WorldTime.vcproj b/worldtime/WorldTime_8.vcproj index 578a340..578a340 100644 --- a/worldtime/WorldTime.vcproj +++ b/worldtime/WorldTime_8.vcproj diff --git a/worldtime/WorldTime_9.sln b/worldtime/WorldTime_9.sln new file mode 100644 index 0000000..4de1626 --- /dev/null +++ b/worldtime/WorldTime_9.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual Studio 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WorldTime", "WorldTime_9.vcproj", "{5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}.Debug|Win32.ActiveCfg = Debug|Win32
+ {5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}.Debug|Win32.Build.0 = Debug|Win32
+ {5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}.Release|Win32.ActiveCfg = Release|Win32
+ {5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/worldtime/WorldTime_9.vcproj b/worldtime/WorldTime_9.vcproj new file mode 100644 index 0000000..276b992 --- /dev/null +++ b/worldtime/WorldTime_9.vcproj @@ -0,0 +1,427 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9.00"
+ Name="WorldTime"
+ ProjectGUID="{5F370DEE-3F8E-4BA1-BC2C-2B040691BD18}"
+ RootNamespace="WorldTime"
+ Keyword="MFCProj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/WorldTime.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WORLDTIME_EXPORTS"
+ StringPooling="true"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="true"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="comctl32.lib odbc32.lib odbccp32.lib"
+ LinkIncremental="1"
+ SuppressStartupBanner="true"
+ ProgramDatabaseFile=".\Release/WorldTime.pdb"
+ BaseAddress="0x22070000"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Release/WorldTime.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="false"
+ CharacterSet="2"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="true"
+ SuppressStartupBanner="true"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/WorldTime.tlb"
+ HeaderFileName=""
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../include"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WORLDTIME_EXPORTS"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderThrough="common.h"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ WarningLevel="3"
+ SuppressStartupBanner="true"
+ DebugInformationFormat="4"
+ DisableSpecificWarnings="4996"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="3081"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="user32.lib gdi32.lib shell32.lib advapi32.lib comctl32.lib"
+ LinkIncremental="2"
+ SuppressStartupBanner="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile=".\Debug/WorldTime.pdb"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ ImportLibrary="$(IntDir)/$(TargetName).lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ SuppressStartupBanner="true"
+ OutputFile=".\Debug/WorldTime.bsc"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+ >
+ <File
+ RelativePath="options.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="plugwin.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="time_convert.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="timezone.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="WorldTime.cpp"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ PreprocessorDefinitions=""
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl"
+ >
+ <File
+ RelativePath=".\common.h"
+ >
+ </File>
+ <File
+ RelativePath="plugwin.h"
+ >
+ </File>
+ <File
+ RelativePath="time_convert.h"
+ >
+ </File>
+ <File
+ RelativePath="timezone.h"
+ >
+ </File>
+ <File
+ RelativePath="WorldTime.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+ >
+ <File
+ RelativePath="1_night.ico"
+ >
+ </File>
+ <File
+ RelativePath="2_sunrise.ico"
+ >
+ </File>
+ <File
+ RelativePath="3_day.ico"
+ >
+ </File>
+ <File
+ RelativePath="4_sunset.ico"
+ >
+ </File>
+ <File
+ RelativePath="day.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon_moon.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon_sun.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon_sunrise.ico"
+ >
+ </File>
+ <File
+ RelativePath="icon_sunset.ico"
+ >
+ </File>
+ <File
+ RelativePath="night.ico"
+ >
+ </File>
+ <File
+ RelativePath="sunrise.ico"
+ >
+ </File>
+ <File
+ RelativePath="sunset.ico"
+ >
+ </File>
+ <File
+ RelativePath="WorldTime.rc"
+ >
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <File
+ RelativePath="ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/worldtime/m_skin_eng.h b/worldtime/m_skin_eng.h new file mode 100644 index 0000000..da9a717 --- /dev/null +++ b/worldtime/m_skin_eng.h @@ -0,0 +1,434 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2008 Miranda ICQ/IM project,
+all portions of this codebase are copyrighted to the people
+listed in contributors.txt.
+
+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; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef M_ske_H_INC
+#define M_ske_H_INC
+
+//#include "newpluginapi.h"
+//#include "m_clui.h"
+//#include "../hdr/modern_commonheaders.h"
+
+
+/*defaults*/
+#define DEFAULT_FIT_MODE FM_STRETCH
+#define DEFAULT_STYLE ST_BRUSH
+#define DEFAULT_BKCOLOUR GetSysColor(COLOR_3DFACE)
+#define DEFAULT_SELBKCOLOUR GetSysColor(COLOR_HIGHLIGHT)
+#define SIZING_MARGIN 3
+
+/* Fit mode */
+#define FM_STRETCH 0
+#define FM_TILE_HORZ 1
+#define FM_TILE_VERT 2
+#define FM_TILE_BOTH 3
+
+/*Object types*/
+#define OT_ANY 0
+#define OT_GLYPHOBJECT 1
+#define OT_FONTOBJECT 2
+
+/*STYLE INDEXEX*/
+#define ST_SKIP 0
+#define ST_PARENT 1
+#define ST_BRUSH 2
+#define ST_IMAGE 3
+#define ST_SOLARIZE 4 //Not used yet.
+#define ST_FRAGMENT 5
+#define ST_GRADIENT 6
+
+//formats:
+#define ADT_TOP 0x00000000
+#define ADT_LEFT 0x00000000
+#define ADT_HCENTER 0x00000001
+#define ADT_RIGHT 0x00000002
+#define ADT_VCENTER 0x00000004
+#define ADT_BOTTOM 0x00000008
+//#define ADT_ECLIPSE 64
+
+
+/*SERVICES*/
+
+//toggle the 'hide offline contacts' flag and call CLUI
+//wParam=0
+//lParam=0
+#define MS_CLIST_TOGGLEHIDEOFFLINE "CList/ToggleHideOffline"
+
+#define MS_CLIST_TOGGLEGROUPS "CList/ToggleGroups"
+
+#define MS_CLIST_TOGGLESOUNDS "CList/ToggleSounds"
+
+// Add new object to skin object list.
+// wParam = pointer to SKINOBJECTDESCRIPTOR structure
+// lParam = 0 ( used for internal purposes: pointer to skin object list)
+#define MS_SKIN_REGISTEROBJECT "ModernList/RegisterObject"
+
+// Add new object to skin object list.
+// wParam = pointer to DEF_SKIN_OBJECT_PARAMS structure
+// lParam = 0 ( used for internal purposes: pointer to skin object list)
+#define MS_SKIN_REGISTERDEFOBJECT "ModernList/RegisterDefObject"
+
+typedef struct s_DEF_SKIN_OBJECT_PARAMS
+{
+ char * szObjectID;
+ BYTE defStyle;
+ DWORD defColor;
+ // SKINOBJECTSLIST * Skin;
+} DEF_SKIN_OBJECT_PARAMS;
+
+
+// Request painting glyph object
+// wParam = pointer to SKINDRAWREQUEST structure
+// lParam = 0
+#define MS_SKIN_DRAWGLYPH "ModernList/DrawGlyph"
+
+
+
+/* EVENTS */
+#define ME_SKIN_SERVICESCREATED "ModernList/ServicesCreated"
+
+/* DRAWGLYPH Request structure */
+typedef struct s_SKINDRAWREQUEST
+{
+ char szObjectID[255]; // Unic Object ID (path) to paint
+ RECT rcDestRect; // Rectangle to fit
+ RECT rcClipRect; // Rectangle to paint in.
+ HDC hDC; // Handler to device context to paint in.
+} SKINDRAWREQUEST,*LPSKINDRAWREQUEST;
+
+/* SKINOBJECTDESCRIPTOR opbject descriptor structure */
+typedef struct tagSKINOBJECTDESCRIPTOR
+{
+ BYTE bType; // One of OT_* values.
+ char* szObjectID; // Unic Object ID (path) [255] max
+ LPVOID Data; // Pointer to GLYPHOBJECT strycture if bType==OT_GLYPHOBJECT
+} SKINOBJECTDESCRIPTOR, *LPSKINOBJECTDESCRIPTOR;
+
+/* SKINOBJECTDESCRIPTOR opbject descriptor structure */
+typedef struct s_GLYPHOBJECT
+{
+ BYTE Style; // One of ST_* values
+ HBITMAP hGlyph; // Bitmap handler (for internal use only)
+ DWORD dwTop, dwLeft, dwBottom, dwRight; // Margins
+ char* szFileName; // FileName of image
+ DWORD dwColor; // Fill color
+ BYTE dwAlpha; // Constant alpha-transparency level
+ BYTE FitMode; // One of FM_* values
+ POINT clipArea; // Object image rect on full image
+ SIZE szclipArea; // Object image rect on full image
+ SortedList * plTextList; // List of GLYPHTEXT
+ LONG bmWidth;
+ LONG bmHeight;
+ BYTE bmBitsPixel;
+} GLYPHOBJECT,*LPGLYPHOBJECT;
+
+/* SKINTEXTDESCRIPTOR opbject descriptor structure */
+typedef struct s_GLYPHTEXT
+{
+ char * szGlyphTextID;
+ TCHAR * stText;
+ TCHAR * stValueText;
+ DWORD dwFlags;
+ DWORD dwColor; // Color (InvAA)(RR)(GG)(BB)
+ DWORD dwShadow; //ToDo: Color2/Shaddow
+ int iLeft,iTop,iRight,iBottom;
+ BYTE RelativeFlags;
+ char * szFontID;
+ HFONT hFont;
+ char * szObjectName;
+}GLYPHTEXT,*LPGLYPHTEXT;
+
+/* SKINTEXTDESCRIPTOR opbject descriptor structure */
+typedef struct s_SKINFONT
+{
+ char * szFontID;
+ HFONT hFont;
+}SKINFONT, *LPSKINFONT;
+
+/* HELPER FUNCTIONS */
+
+//Paint ObjectID as parent background for frame hwndIn
+int __inline SkinDrawWindowBack(HWND hwndIn, HDC hdc, RECT * rcClip, char * objectID);
+//Paint ObjectID
+int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID);
+//Register object with predefined style
+int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle);
+int __inline CreateGlyphedObjectDefColor(char * ObjID,DWORD defColor);
+//Register default object
+int __inline CreateGlyphedObject(char * ObjID);
+
+
+
+//// Creating and registering objects
+//int __inline CreateGlyphedObject(char * ObjID)
+//{
+// DEF_SKIN_OBJECT_PARAMS prm={0};
+// prm.defColor=DEFAULT_BKCOLOUR;
+// prm.defStyle=DEFAULT_STYLE;
+// prm.szObjectID=ObjID;
+// return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+//}
+static BOOL __inline ScreenToClientRect(HWND hWnd, LPRECT lpRect)
+{
+ BOOL ret;
+
+ POINT pt;
+
+ pt.x = lpRect->left;
+ pt.y = lpRect->top;
+
+ ret = ScreenToClient(hWnd, &pt);
+
+ if (!ret) return ret;
+
+ lpRect->left = pt.x;
+ lpRect->top = pt.y;
+
+
+ pt.x = lpRect->right;
+ pt.y = lpRect->bottom;
+
+ ret = ScreenToClient(hWnd, &pt);
+
+ lpRect->right = pt.x;
+ lpRect->bottom = pt.y;
+
+ return ret;
+}
+
+int __inline CreateGlyphedObjectDefStyle(char * ObjID,BYTE defStyle)
+{
+ DEF_SKIN_OBJECT_PARAMS prm={0};
+ prm.defColor=DEFAULT_BKCOLOUR;
+ prm.defStyle=defStyle;
+ prm.szObjectID=ObjID;
+ return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+}
+int __inline CreateGlyphedObjectDefColor(char * ObjID,DWORD defColor)
+{
+ DEF_SKIN_OBJECT_PARAMS prm={0};
+ prm.defColor=defColor;
+ prm.defStyle=ST_BRUSH;
+ prm.szObjectID=ObjID;
+ return CallService(MS_SKIN_REGISTERDEFOBJECT,(WPARAM)&prm,0);
+}
+INT_PTR ske_Service_DrawGlyph(WPARAM wParam,LPARAM lParam);
+int __inline SkinDrawGlyph(HDC hdc, RECT * rcSize, RECT * rcClip, char * objectID)
+{
+ SKINDRAWREQUEST rq;
+ if (!objectID) return 0;
+ rq.hDC=hdc;
+ rq.rcDestRect=*rcSize;
+ rq.rcClipRect=*rcClip;
+ strncpy(rq.szObjectID,objectID,sizeof(rq.szObjectID));
+ //return ske_Service_DrawGlyph((WPARAM)&rq,0);
+ return CallService(MS_SKIN_DRAWGLYPH,(WPARAM)&rq,0);
+}
+//#include "../hdr/modern_skin_selector.h"
+
+//////////////////////////////////////////////
+// //
+// New Painting sequence servises //
+// //
+//////////////////////////////////////////////
+
+typedef struct sPAINT_REQUEST
+{
+ DWORD dStructSize; //size of structure
+ HWND hWnd; //called by window
+ HDC hDC; //context to draw on
+ RECT rcUpdate; //rectangle to be painted in (relative to Top-Left corner of Main window)
+ DWORD dwFlags; //drawing flags
+ void * CallbackData; //Data for passing to callback procedure
+ char Reserved[16]; //reserved for farther usage;
+} sPaintRequest;
+
+// Request to register sub for callback painting frame area
+// wParam = hWnd of called frame
+// lParam = pointer to tPaintCallBackProc (or NULL to remove)
+// return 1 - succes, 0 - failure
+#define MS_SKINENG_REGISTERPAINTSUB "SkinEngine/ske_Service_RegisterFramePaintCallbackProcedure"
+
+// Request to repaint frame or change/drop callback data immeadeately
+// wParam = hWnd of called frame
+// lParam = pointer to sPaintRequest (or NULL to redraw all)
+#define MS_SKINENG_UPTATEFRAMEIMAGE "SkinEngine/ske_Service_UpdateFrameImage"
+
+// Request to repaint frame or change/drop callback data
+// wParam = hWnd of called frame
+// lParam = pointer to sPaintRequest (or NULL to redraw all)
+// return 2 - already queued, data updated, 1-have been queued, 0 - failure
+#define MS_SKINENG_INVALIDATEFRAMEIMAGE "SkinEngine/ske_Service_InvalidateFrameImage"
+
+// Callback proc type
+typedef int (/*__stdcall*/ *tPaintCallbackProc)(HWND hWnd, HDC hDC, RECT * rcPaint, HRGN rgnUpdate, DWORD dFlags, void * CallBackData);
+//tPaintCallbackProc PaintCallbackProc;
+
+// HELPER TO UPDATEIMAGEFRAME
+
+int __inline SkinEngUpdateImageFrame(HWND hwnd, RECT * rcUpdate, DWORD dwFlags, void * CallBackData)
+{
+ sPaintRequest sr={0};
+ sr.dStructSize=sizeof(sPaintRequest);
+ sr.hWnd=hwnd;
+ if (rcUpdate)
+ sr.rcUpdate=*rcUpdate;
+ sr.dwFlags=dwFlags;
+ sr.CallbackData=CallBackData;
+ return CallService(MS_SKINENG_UPTATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
+}
+/*
+int __inline SkinEngInvalidateImageFrame(HWND hwnd, CONST RECT * rcUpdate, DWORD dwFlags, void * CallBackData)
+{
+ sPaintRequest sr={0};
+ if (hwnd && (!g_CluiData.fLayered)) return InvalidateRect(hwnd,rcUpdate,dwFlags);
+ sr.dStructSize=sizeof(sPaintRequest);
+ sr.hWnd=hwnd;
+ if (rcUpdate)
+ sr.rcUpdate=*rcUpdate;
+ sr.dwFlags=dwFlags;
+ sr.CallbackData=CallBackData;
+ return CallService(MS_SKINENG_INVALIDATEFRAMEIMAGE,(WPARAM)hwnd,(LPARAM)&sr);
+}
+
+int __inline SkinInvalidateFrame(HWND hWnd, CONST RECT* lpRect)
+{
+ return SkinEngInvalidateImageFrame(hWnd,lpRect,0,0);
+}
+*/
+// Alpha channel GDI replacements/helpers
+
+//
+// Paints text with correct alpha channel
+// wParam - pointer to AlphaTextOutParams
+#define MS_SKINENG_ALPHATEXTOUT "SkinEngine/ske_AlphaTextOut"
+typedef struct _AlphaTextOutParams
+{
+ HDC hDC;
+ LPCTSTR lpString;
+ int nCount;
+ RECT * lpRect;
+ UINT format;
+ DWORD ARGBcolor;
+ char reserv[16];
+}AlphaTextOutParams;
+
+int __inline AlphaText(HDC hDC, LPCTSTR lpString, int nCount, RECT * lpRect, UINT format, DWORD ARGBcolor)
+{
+ AlphaTextOutParams ap={0};
+ ap.hDC=hDC;
+ ap.lpString=lpString;
+ ap.nCount=nCount;
+ ap.lpRect=lpRect;
+ ap.format=format;
+ ap.ARGBcolor=ARGBcolor;
+ return CallService(MS_SKINENG_ALPHATEXTOUT,(WPARAM)&ap,0);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// Paints text with correct alpha channel and effect, alternative to DrawText
+// wParam - pointer to DrawTextWithEffectParam
+
+typedef struct MODERNFONTEFFECT_tag
+{
+ BYTE effectIndex;
+ DWORD baseColour; // ARGB
+ DWORD secondaryColour; // ARGB
+}
+MODERNFONTEFFECT;
+
+typedef struct DrawTextWithEffectParam_tag
+{
+ int cbSize;
+ HDC hdc; // handle to DC
+ LPCTSTR lpchText; // text to draw
+ int cchText; // length of text to draw
+ LPRECT lprc; // rectangle coordinates
+ UINT dwDTFormat; // formatting options
+ MODERNFONTEFFECT * pEffect; // effect to be drawn on
+} DrawTextWithEffectParam;
+
+#define MS_DRAW_TEXT_WITH_EFFECTA "Modern/SkinEngine/DrawTextWithEffectA"
+#define MS_DRAW_TEXT_WITH_EFFECTW "Modern/SkinEngine/DrawTextWithEffectW"
+
+#ifdef UNICODE
+ #define MS_DRAW_TEXT_WITH_EFFECT MS_DRAW_TEXT_WITH_EFFECTW
+#else
+ #define MS_DRAW_TEXT_WITH_EFFECT MS_DRAW_TEXT_WITH_EFFECTA
+#endif
+
+// Helper
+int __inline DrawTextWithEffect( HDC hdc, LPCTSTR lpchText, int cchText, RECT * lprc, UINT dwDTFormat, MODERNFONTEFFECT * pEffect )
+{
+ DrawTextWithEffectParam params;
+ static BYTE bIfServiceExists = ServiceExists( MS_DRAW_TEXT_WITH_EFFECT ) ? 1 : 0;
+ if ( bIfServiceExists == 0 ) return DrawText ( hdc, lpchText, cchText, lprc, dwDTFormat );
+
+ // else
+ params.cbSize = sizeof( DrawTextWithEffectParam );
+ params.hdc = hdc;
+ params.lpchText = lpchText;
+ params.cchText = cchText;
+ params.lprc = lprc;
+ params.dwDTFormat = dwDTFormat;
+ params.pEffect = pEffect;
+ return CallService( MS_DRAW_TEXT_WITH_EFFECT, (WPARAM)¶ms, 0 );
+}
+
+
+typedef struct _ImageListFixParam
+{
+ HIMAGELIST himl;
+ int index;
+ HICON hicon;
+}ImageListFixParam;
+
+typedef struct _DrawIconFixParam
+{
+ HDC hdc;
+ int xLeft;
+ int yTop;
+ HICON hIcon;
+ int cxWidth;
+ int cyWidth;
+ UINT istepIfAniCur;
+ HBRUSH hbrFlickerFreeDraw;
+ UINT diFlags;
+} DrawIconFixParam;
+//wParam - pointer to DrawIconFixParam
+#define MS_SKINENG_DRAWICONEXFIX "SkinEngine/DrawIconEx_Fix"
+
+int __inline mod_DrawIconEx_helper(HDC hdc,int xLeft,int yTop,HICON hIcon,int cxWidth,int cyWidth, UINT istepIfAniCur, HBRUSH hbrFlickerFreeDraw, UINT diFlags)
+{
+ DrawIconFixParam p={0};
+ p.hdc=hdc;
+ p.xLeft=xLeft;
+ p.yTop=yTop;
+ p.hIcon=hIcon;
+ p.cxWidth=cxWidth;
+ p.cyWidth=cyWidth;
+ p.istepIfAniCur=istepIfAniCur;
+ p.hbrFlickerFreeDraw=hbrFlickerFreeDraw;
+ p.diFlags=diFlags;
+ return CallService(MS_SKINENG_DRAWICONEXFIX,(WPARAM)&p,0);
+}
+#endif
diff --git a/worldtime/plugwin.h b/worldtime/plugwin.h index 822fa51..1229909 100644 --- a/worldtime/plugwin.h +++ b/worldtime/plugwin.h @@ -24,7 +24,8 @@ //#include "../mwclist/m_clc.h"
#include <m_clc.h>
#include <m_fontservice.h>
-#include <m_skin_eng.h>
+//#include <m_skin_eng.h>
+#include "m_skin_eng.h"
#include <m_icolib.h>
diff --git a/worldtime/resource.h b/worldtime/resource.h index e061f35..1b77d1c 100644 --- a/worldtime/resource.h +++ b/worldtime/resource.h @@ -51,13 +51,14 @@ #define IDC_TIME_SUNRISE 1041
#define IDC_TIME_SUNSET 1042
#define POPUP_TESTING 40001
+#define ID_Menu 40002
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 121
-#define _APS_NEXT_COMMAND_VALUE 40002
+#define _APS_NEXT_COMMAND_VALUE 40003
#define _APS_NEXT_CONTROL_VALUE 1042
#define _APS_NEXT_SYMED_VALUE 101
#endif
|