This repository has been archived by the owner on Apr 4, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Tagging release 0.9 of PhotoToys project.
- Loading branch information
BriceLambson_cp
authored and
BriceLambson_cp
committed
Jan 9, 2009
1 parent
67b3eab
commit 96b8268
Showing
18 changed files
with
2,242 additions
and
0 deletions.
There are no files selected for viewing
852 changes: 852 additions & 0 deletions
852
tags/ImageResizer-0.9/ImageResizerPowertoySetup/ImageResizerPowertoySetup.vdproj
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 10.00 | ||
# Visual Studio 2008 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PhotoToys", "PhotoToys\PhotoToys.csproj", "{3B6F9459-3B91-4066-B22C-1CEC9204F477}" | ||
EndProject | ||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "ImageResizerPowertoySetup", "ImageResizerPowertoySetup\ImageResizerPowertoySetup.vdproj", "{4C677FFA-B909-4B18-B2E2-283C8461E3F2}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{3B6F9459-3B91-4066-B22C-1CEC9204F477}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{3B6F9459-3B91-4066-B22C-1CEC9204F477}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{3B6F9459-3B91-4066-B22C-1CEC9204F477}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{3B6F9459-3B91-4066-B22C-1CEC9204F477}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{4C677FFA-B909-4B18-B2E2-283C8461E3F2}.Debug|Any CPU.ActiveCfg = Debug | ||
{4C677FFA-B909-4B18-B2E2-283C8461E3F2}.Release|Any CPU.ActiveCfg = Release | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><ItemProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Properties><Property><Name>svn:mime-type</Name><Value>application/octet-stream</Value></Property></Properties></ItemProperties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace PhotoToys | ||
{ | ||
/// <summary> | ||
/// Contains information needed by IContextMenu.InvokeCommand() to invoke a shortcut menu command. | ||
/// </summary> | ||
public struct CMINVOKECOMMANDINFO | ||
{ | ||
/// <summary> | ||
/// The size of this structure, in bytes. | ||
/// </summary> | ||
public uint cbSize; | ||
|
||
/// <summary> | ||
/// Indicate desired behavior and that other fields in the structure are to be used. | ||
/// </summary> | ||
public uint fMask; | ||
|
||
/// <summary> | ||
/// A handle to the window that is the owner of the shortcut menu. | ||
/// </summary> | ||
public IntPtr hwnd; | ||
|
||
/// <summary> | ||
/// A 32-bit value that contains zero in the high-order word and a menu-identifier offset of the command to carry out in the low-order word. | ||
/// If the high-order word is not zero, this member is the address of a null-terminated string specifying the language-independent name of the command to carry out. | ||
/// </summary> | ||
public IntPtr lpVerb; | ||
|
||
/// <summary> | ||
/// An optional string containing parameters that are passed to the command. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPStr)] | ||
public string lpParameters; | ||
|
||
/// <summary> | ||
/// An optional working directory name. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPStr)] | ||
public string lpDirectory; | ||
|
||
/// <summary> | ||
/// A set of SW_ values to pass to the ShowWindow function if the command displays a window or starts an application. | ||
/// </summary> | ||
public int nShow; | ||
|
||
/// <summary> | ||
/// An optional hot key to assign to any application activated by the command. | ||
/// </summary> | ||
public uint dwHotKey; | ||
|
||
/// <summary> | ||
/// An icon to use for any application activated by the command. | ||
/// </summary> | ||
public IntPtr hIcon; | ||
} | ||
} |
111 changes: 111 additions & 0 deletions
111
tags/ImageResizer-0.9/PhotoToys/CMINVOKECOMMANDINFOEX.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace PhotoToys | ||
{ | ||
/// <summary> | ||
/// This structure defines the x- and y-coordinates of a point. | ||
/// </summary> | ||
public struct POINT | ||
{ | ||
/// <summary> | ||
/// Specifies the x-coordinate of the point. | ||
/// </summary> | ||
public long x; | ||
|
||
/// <summary> | ||
/// Specifies the y-coordinate of the point. | ||
/// </summary> | ||
public long y; | ||
} | ||
|
||
/// <summary> | ||
/// Contains extended information about a shortcut menu command. | ||
/// </summary> | ||
public struct CMINVOKECOMMANDINFOEX | ||
{ | ||
/// <summary> | ||
/// The size of this structure, in bytes. | ||
/// </summary> | ||
public uint cbSize; | ||
|
||
/// <summary> | ||
/// Indicate desired behavior and that other fields in the structure are to be used. | ||
/// </summary> | ||
public uint fMask; | ||
|
||
/// <summary> | ||
/// A handle to the window that is the owner of the shortcut menu. | ||
/// </summary> | ||
public IntPtr hwnd; | ||
|
||
/// <summary> | ||
/// A 32-bit value that contains zero in the high-order word and a menu-identifier offset of the command to carry out in the low-order word. | ||
/// If the high-order word is not zero, this member is the address of a null-terminated string specifying the language-independent name of the command to carry out. | ||
/// </summary> | ||
public IntPtr lpVerb; | ||
|
||
/// <summary> | ||
/// Optional parameters. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPStr)] | ||
public string lpParameters; | ||
|
||
/// <summary> | ||
/// An optional working directory name. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPStr)] | ||
public string lpDirectory; | ||
|
||
/// <summary> | ||
/// A set of SW_ values to pass to the ShowWindow function if the command displays a window or starts an application. | ||
/// </summary> | ||
public int nShow; | ||
|
||
/// <summary> | ||
/// An optional hot key to assign to any application activated by the command. | ||
/// </summary> | ||
public uint dwHotKey; | ||
|
||
/// <summary> | ||
/// An icon to use for any application activated by the command. | ||
/// </summary> | ||
public IntPtr hIcon; | ||
|
||
/// <summary> | ||
/// An ASCII title. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPStr)] | ||
public string lpTitle; | ||
|
||
/// <summary> | ||
/// A Unicode verb, for those commands that can use it. | ||
/// </summary> | ||
public IntPtr lpVerbW; | ||
|
||
/// <summary> | ||
/// A Unicode parameters, for those commands that can use it. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string lpParametersW; | ||
|
||
/// <summary> | ||
/// A Unicode directory, for those commands that can use it. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string lpDirectoryW; | ||
|
||
/// <summary> | ||
/// A Unicode title. | ||
/// </summary> | ||
[MarshalAs(UnmanagedType.LPWStr)] | ||
public string lpTitleW; | ||
|
||
/// <summary> | ||
/// The point where the command is invoked. | ||
/// </summary> | ||
public POINT ptInvoke; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Windows.Forms; | ||
|
||
namespace PhotoToys | ||
{ | ||
/// <summary> | ||
/// Used to wrap the IntPtr returned by the Windows Shell into a usable type. | ||
/// </summary> | ||
class DummyWin32Window : IWin32Window | ||
{ | ||
private IntPtr handle; | ||
|
||
/// <summary> | ||
/// Public no argument constructor. | ||
/// </summary> | ||
public DummyWin32Window() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Constructor used to initialize the handle. | ||
/// </summary> | ||
/// <param name="handle"></param> | ||
public DummyWin32Window(IntPtr handle) | ||
{ | ||
this.handle = handle; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the handle to the window represented by the implementer. | ||
/// </summary> | ||
public IntPtr Handle | ||
{ | ||
get { return handle; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace PhotoToys | ||
{ | ||
/// <summary> | ||
/// Exposes methods that merge a shortcut menu associated with a Shell object. | ||
/// </summary> | ||
[ComImport] | ||
[Guid("000214e4-0000-0000-c000-000000000046")] | ||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | ||
public interface IContextMenu | ||
{ | ||
/// <summary> | ||
/// Adds commands to a shortcut menu. | ||
/// </summary> | ||
/// <param name="hmenu">A handle to the menu. The handler should specify this handle when adding menu items.</param> | ||
/// <param name="indexMenu">The zero-based position at which to insert the first menu item.</param> | ||
/// <param name="idCmdFirst">The minimum value that the handler can specify for a menu item identifier.</param> | ||
/// <param name="idCmdLast">The maximum value that the handler can specify for a menu item identifier.</param> | ||
/// <param name="uFlags">Optional flags specifying how the shortcut menu can be changed.</param> | ||
[PreserveSig] | ||
int QueryContextMenu(IntPtr hmenu, uint indexMenu, uint idCmdFirst, uint idCmdLast, uint uFlags); | ||
|
||
/// <summary> | ||
/// Carries out the command associated with a shortcut menu item. | ||
/// </summary> | ||
/// <param name="pici">A pointer to a CMINVOKECOMMANDINFO or CMINVOKECOMMANDINFOEX structure containing information about the command.</param> | ||
void InvokeCommand(IntPtr pici); | ||
|
||
/// <summary> | ||
/// Gets information about a shortcut menu command, including the help string and the language-independent, or canonical, name for the command. | ||
/// </summary> | ||
/// <param name="idCmd">Menu command identifier offset.</param> | ||
/// <param name="uType">Flags specifying the information to return.</param> | ||
/// <param name="pReserved">Reserved. Handlers must ignore this parameter when called.</param> | ||
/// <param name="pszName">The address of the buffer to receive the null-terminated string being retrieved.</param> | ||
/// <param name="cchMax">Size of the buffer, in characters, to receive the null-terminated string.</param> | ||
void GetCommandString(uint idCmd, uint uType, uint pReserved, [Out] IntPtr pszName, uint cchMax); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
using System.Runtime.InteropServices; | ||
using System.Runtime.InteropServices.ComTypes; | ||
|
||
namespace PhotoToys | ||
{ | ||
/// <summary> | ||
/// Exposes a method that initializes Shell extensions for shortcut menus. | ||
/// </summary> | ||
[ComImport] | ||
[Guid("000214E8-0000-0000-C000-000000000046")] | ||
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] | ||
public interface IShellExtInit | ||
{ | ||
/// <summary> | ||
/// Initializes a shortcut menu extension. | ||
/// </summary> | ||
/// <param name="pidlFolder">A pointer to an ITEMIDLIST structure that uniquely identifies a folder. For shortcut menu extensions, it is the item identifier list for the folder that contains the item whose shortcut menu is being displayed.</param> | ||
/// <param name="pdtobj">A pointer to an IDataObject interface object that can be used to retrieve the objects being acted upon.</param> | ||
/// <param name="hkeyProgID">The registry key for the file object or folder type.</param> | ||
void Initialize(IntPtr pidlFolder, [In] IDataObject pdtobj, IntPtr hkeyProgID); | ||
} | ||
} |
Oops, something went wrong.