Skip to content

Commit

Permalink
Added latest code from Unfuddle SVN
Browse files Browse the repository at this point in the history
  • Loading branch information
dremin committed Jan 11, 2010
1 parent cef22f9 commit 777bdd8
Show file tree
Hide file tree
Showing 277 changed files with 18,558 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/cairoMenuDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/cairoMenuPressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/controlsBack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/controlsForward.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/controlsHome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/desktopControlsBg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/menubarBackground.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/searchDefault.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/searchPressed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added art/Desktop and Menubar/taskbarCenter.png
Binary file added art/Desktop and Menubar/taskbarEdgeLeft.png
Binary file added art/Desktop and Menubar/taskbarEdgeRight.png
Binary file added art/Explorer/backGlyph.png
Binary file added art/Explorer/boltGlyph.png
Binary file added art/Explorer/cairoIconGlyph.png
Binary file added art/Explorer/dockGlyph.png
Binary file added art/Explorer/forwardGlyph.png
Binary file added art/Explorer/iconViewGlyph.png
Binary file added art/Explorer/listViewGlyph.png
Binary file added art/Explorer/previewGlyph.png
Binary file added art/Explorer/searchIconGlyph.png
Binary file added art/Explorer/stacksViewGlyph.png
Binary file added art/Explorer/tabGlyph.png
Binary file added art/Explorer/thumbnailViewGlyph.png
Binary file added art/Other/DialogueBox/buttonDefault.png
Binary file added art/Other/DialogueBox/buttonFocus.png
Binary file added art/Other/DialogueBox/buttonPressed.png
Binary file added art/Other/DialogueBox/cairoDiag.png
Binary file added art/Other/DialogueBox/extiIcon.png
Binary file added art/Other/DialogueBox/logoffIcon.png
Binary file added art/Other/DialogueBox/rstartIcon.png
Binary file added art/Other/DialogueBox/shutdownIcon.png
Binary file added art/Other/DialogueBox/sleepIcon.png
90 changes: 90 additions & 0 deletions code/Cairo Desktop/Cairo Desktop.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cairo Desktop", "Cairo Desktop\Cairo Desktop.csproj", "{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CairoDesktop.Interop", "CairoDesktop.Interop\CairoDesktop.Interop.csproj", "{233781C8-83E4-47A6-847E-FA7A31B1CC51}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CairoDesktop.AppGrabber", "CairoDesktop.AppGrabber\CairoDesktop.AppGrabber.csproj", "{DE9674CC-507E-4049-9152-5C899B9F0939}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Cairo.WindowsHooksWrapper", "Cairo.WindowsHooksWrapper\Cairo.WindowsHooksWrapper.csproj", "{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CairoDesktop.WindowsTasks", "CairoDesktop.WindowsTasks\CairoDesktop.WindowsTasks.csproj", "{5FABAD0F-D28C-4EE6-A826-77968087864E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|Win32.ActiveCfg = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Debug|x86.ActiveCfg = Debug|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|Any CPU.Build.0 = Release|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|Win32.ActiveCfg = Release|Any CPU
{F0383E91-6ADC-4016-9E21-D3DC0FFC55FF}.Release|x86.ActiveCfg = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|Any CPU.Build.0 = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|Win32.ActiveCfg = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Debug|x86.ActiveCfg = Debug|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|Any CPU.ActiveCfg = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|Any CPU.Build.0 = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|Win32.ActiveCfg = Release|Any CPU
{233781C8-83E4-47A6-847E-FA7A31B1CC51}.Release|x86.ActiveCfg = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|Win32.ActiveCfg = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Debug|x86.ActiveCfg = Debug|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|Any CPU.Build.0 = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|Win32.ActiveCfg = Release|Any CPU
{DE9674CC-507E-4049-9152-5C899B9F0939}.Release|x86.ActiveCfg = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|Any CPU.Build.0 = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|Win32.ActiveCfg = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Debug|x86.ActiveCfg = Debug|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|Any CPU.ActiveCfg = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|Any CPU.Build.0 = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|Win32.ActiveCfg = Release|Any CPU
{79B5DDAC-5102-4B11-BFA1-B16D6F6FE661}.Release|x86.ActiveCfg = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|Win32.ActiveCfg = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Debug|x86.ActiveCfg = Debug|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|Any CPU.Build.0 = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|Win32.ActiveCfg = Release|Any CPU
{5FABAD0F-D28C-4EE6-A826-77968087864E}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
5 changes: 5 additions & 0 deletions code/Cairo Desktop/Cairo Desktop/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Application x:Class="CairoDesktop.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MenuBar.xaml">
<Application.Resources></Application.Resources>
</Application>
18 changes: 18 additions & 0 deletions code/Cairo Desktop/Cairo Desktop/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Configuration;
using System.Windows;

namespace CairoDesktop
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
UnhandledExceptionFilter.UnhandledExceptionManager.AddHandler(false);
base.OnStartup(e);
}
}
}
71 changes: 71 additions & 0 deletions code/Cairo Desktop/Cairo Desktop/AppBar Helper/NativeMethods.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@

namespace SHAppBarMessage1.Win32
{
using System;
using System.Runtime.InteropServices;

public class NativeMethods
{

[StructLayout(LayoutKind.Sequential)]
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}

[StructLayout(LayoutKind.Sequential)]
public struct APPBARDATA
{
public int cbSize;
public IntPtr hWnd;
public int uCallbackMessage;
public int uEdge;
public RECT rc;
public IntPtr lParam;
}

public enum ABMsg : int
{
ABM_NEW = 0,
ABM_REMOVE,
ABM_QUERYPOS,
ABM_SETPOS,
ABM_GETSTATE,
ABM_GETTASKBARPOS,
ABM_ACTIVATE,
ABM_GETAUTOHIDEBAR,
ABM_SETAUTOHIDEBAR,
ABM_WINDOWPOSCHANGED,
ABM_SETSTATE
}
public enum ABNotify : int
{
ABN_STATECHANGE = 0,
ABN_POSCHANGED,
ABN_FULLSCREENAPP,
ABN_WINDOWARRANGE
}
public enum ABEdge : int
{
ABE_LEFT = 0,
ABE_TOP,
ABE_RIGHT,
ABE_BOTTOM
}

[DllImport("SHELL32", CallingConvention = CallingConvention.StdCall)]
public static extern uint SHAppBarMessage(int dwMessage, ref APPBARDATA pData);

[DllImport("USER32")]
public static extern int GetSystemMetrics(int Index);

[DllImport("User32.dll", ExactSpelling = true, CharSet = System.Runtime.InteropServices.CharSet.Auto)]
public static extern bool MoveWindow(IntPtr hWnd, int x, int y, int cx, int cy, bool repaint);

[DllImport("User32.dll", CharSet = CharSet.Auto)]
public static extern int RegisterWindowMessage(string msg);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
namespace SHAppBarMessage1.Common
{
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using SHAppBarMessage1.Win32;
using System.Diagnostics;

public static class SHAppBarMessageHelper
{
//This file is from before r416
public static int RegisterBar(IntPtr handle, Size size)
{
NativeMethods.APPBARDATA abd = new NativeMethods.APPBARDATA();
abd.cbSize = Marshal.SizeOf(abd);
abd.hWnd = handle;
if (!isBarRegistered)
{
uCallBack = NativeMethods.RegisterWindowMessage("AppBarMessage" + Guid.NewGuid().ToString());
abd.uCallbackMessage = uCallBack;

uint ret = NativeMethods.SHAppBarMessage((int)NativeMethods.ABMsg.ABM_NEW, ref abd);
isBarRegistered = true;

ABSetPos(handle, size);
}
else
{
NativeMethods.SHAppBarMessage((int)NativeMethods.ABMsg.ABM_REMOVE, ref abd);
isBarRegistered = false;
}

return uCallBack;
}

private static bool isBarRegistered = false;

private static int uCallBack = 0;

public static void ABSetPos(IntPtr handle, Size size)
{
NativeMethods.APPBARDATA abd = new NativeMethods.APPBARDATA();
abd.cbSize = Marshal.SizeOf(abd);
abd.hWnd = handle;
abd.uEdge = (int)NativeMethods.ABEdge.ABE_TOP;

if (abd.uEdge == (int)NativeMethods.ABEdge.ABE_LEFT || abd.uEdge == (int)NativeMethods.ABEdge.ABE_RIGHT)
{
abd.rc.top = 0;
abd.rc.bottom = PrimaryMonitorSize.Height;
if (abd.uEdge == (int)NativeMethods.ABEdge.ABE_LEFT)
{
abd.rc.left = 0;
abd.rc.right = size.Width;
}
else
{
abd.rc.right = PrimaryMonitorSize.Width;
abd.rc.left = abd.rc.right - size.Width;
}

}
else
{
abd.rc.left = 0;
abd.rc.right = PrimaryMonitorSize.Width;
if (abd.uEdge == (int)NativeMethods.ABEdge.ABE_TOP)
{
abd.rc.top = 0;
abd.rc.bottom = size.Height;
}
else
{
abd.rc.bottom = PrimaryMonitorSize.Height;
abd.rc.top = abd.rc.bottom - size.Height;
}
}

NativeMethods.SHAppBarMessage((int)NativeMethods.ABMsg.ABM_QUERYPOS, ref abd);

switch (abd.uEdge)
{
case (int)NativeMethods.ABEdge.ABE_LEFT:
abd.rc.right = abd.rc.left + size.Width;
break;
case (int)NativeMethods.ABEdge.ABE_RIGHT:
abd.rc.left = abd.rc.right - size.Width;
break;
case (int)NativeMethods.ABEdge.ABE_TOP:
abd.rc.bottom = abd.rc.top + size.Height;
break;
case (int)NativeMethods.ABEdge.ABE_BOTTOM:
abd.rc.top = abd.rc.bottom - size.Height;
break;
}

NativeMethods.SHAppBarMessage((int)NativeMethods.ABMsg.ABM_SETPOS, ref abd);
Trace.WriteLineIf(abd.uEdge == (int)NativeMethods.ABEdge.ABE_TOP, "*** TOP EDGE - CX is: " + (abd.rc.bottom - abd.rc.top).ToString());
NativeMethods.MoveWindow(abd.hWnd, abd.rc.left, abd.rc.top, abd.rc.right - abd.rc.left, abd.rc.bottom - abd.rc.top, true);
}

private static Size PrimaryMonitorSize
{
get
{
return new Size(NativeMethods.GetSystemMetrics(0), NativeMethods.GetSystemMetrics(1));
}
}
}
}
Binary file added code/Cairo Desktop/Cairo Desktop/Application.ico
Binary file not shown.
6 changes: 6 additions & 0 deletions code/Cairo Desktop/Cairo Desktop/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//
// This file was auto-generated by a tool. Do not modify.
//
using System.Resources;

[assembly: NeutralResourcesLanguageAttribute("en-US" , UltimateResourceFallbackLocation.MainAssembly)]
Loading

0 comments on commit 777bdd8

Please sign in to comment.