Skip to content

Commit

Permalink
Update to 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr committed Feb 15, 2014
1 parent 54dbe26 commit c01d197
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 5 deletions.
6 changes: 3 additions & 3 deletions SharpShell/SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Shared Assembly Information for all projects in SharpShell.
[assembly: AssemblyCompany("Dave Kerr")]
[assembly: AssemblyProduct("SharpShell")]
[assembly: AssemblyCopyright("Copyright © Dave Kerr 2013")]
[assembly: AssemblyCopyright("Copyright © Dave Kerr 2014")]

// Version information for an assembly consists of the following four values:
//
Expand All @@ -17,5 +17,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
2 changes: 1 addition & 1 deletion SharpShell/SharpShell/Interop/IInputObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public interface IInputObject
/// <param name="msg">A pointer to an MSG structure that contains the message that caused the activation change. This value may be NULL.</param>
/// <returns>If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.</returns>
[PreserveSig]
int UIActivateIO(int fActivate, ref MSG msg);
int UIActivateIO(bool fActivate, ref MSG msg);

/// <summary>
/// Determines if one of the object's windows has the keyboard focus.
Expand Down
Binary file modified SharpShell/SharpShell/NativeBridge/SharpShellNativeBridge32.dll
Binary file not shown.
47 changes: 46 additions & 1 deletion SharpShell/SharpShell/SharpDeskBand/SharpDeskBand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace SharpShell.SharpDeskBand
{
[ServerType(ServerType.ShellDeskBand)]
public abstract class SharpDeskBand : SharpShellServer, IDeskBand2, IPersistStream, IObjectWithSite
public abstract class SharpDeskBand : SharpShellServer, IDeskBand2, IPersistStream, IObjectWithSite, IInputObject
{
protected SharpDeskBand()
{
Expand Down Expand Up @@ -372,6 +372,51 @@ int IDeskBand2.GetCompositionState(out bool pfCompositionEnabled)

#endregion

#region Implementation of IInputObject

/// <summary>
/// UI-activates or deactivates the object.
/// </summary>
/// <param name="fActivate">Indicates if the object is being activated or deactivated. If this value is nonzero, the object is being activated. If this value is zero, the object is being deactivated.</param>
/// <param name="msg">A pointer to an MSG structure that contains the message that caused the activation change. This value may be NULL.</param>
/// <returns>
/// If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
/// </returns>
int IInputObject.UIActivateIO(bool fActivate, ref MSG msg)
{
// Set the focus to the UI if requested.
if (fActivate)
lazyDeskBand.Value.Focus();

// We're done.
return WinError.S_OK;
}

/// <summary>
/// Determines if one of the object's windows has the keyboard focus.
/// </summary>
/// <returns>
/// Returns S_OK if one of the object's windows has the keyboard focus, or S_FALSE otherwise.
/// </returns>
int IInputObject.HasFocusIO()
{
return lazyDeskBand.Value.ContainsFocus ? WinError.S_OK : WinError.S_FALSE;
}

/// <summary>
/// Enables the object to process keyboard accelerators.
/// </summary>
/// <param name="msg">The address of an MSG structure that contains the keyboard message that is being translated.</param>
/// <returns>
/// Returns S_OK if the accelerator was translated, or S_FALSE otherwise.
/// </returns>
int IInputObject.TranslateAcceleratorIO(ref MSG msg)
{
return WinError.S_OK;
}

#endregion

#region Custom Registration and Unregistration

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions SharpShell/SharpShell/SharpShell.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<DocumentationFile>
</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
Expand All @@ -41,6 +43,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DocumentationFile>bin\Release\SharpShell.xml</DocumentationFile>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
Expand Down

0 comments on commit c01d197

Please sign in to comment.