From 608a521de7595a6115b87040d1e38840dbd55bcc Mon Sep 17 00:00:00 2001 From: sr55 Date: Sun, 29 Aug 2010 14:59:00 +0000 Subject: WinGui: - Remove unused win32.cs file git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3498 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Functions/Win32.cs | 167 ---------------------------------------------- 1 file changed, 167 deletions(-) delete mode 100644 win/C#/Functions/Win32.cs (limited to 'win/C#') diff --git a/win/C#/Functions/Win32.cs b/win/C#/Functions/Win32.cs deleted file mode 100644 index 982ba1e95..000000000 --- a/win/C#/Functions/Win32.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* win32.cs $ - This file is part of the HandBrake source code. - Homepage: . - It may be used under the terms of the GNU General Public License. */ - -namespace Handbrake.Functions -{ - using System; - using System.Runtime.InteropServices; - - /// - /// Win32 API calls - /// - public class Win32 - { - /// - /// Set the Forground Window - /// - /// - /// The h wnd. - /// - /// - /// A Boolean true when complete. - /// - [DllImport("user32.dll")] - public static extern bool SetForegroundWindow(int hWnd); - - /// - /// Lock the workstation - /// - [DllImport("user32.dll")] - public static extern void LockWorkStation(); - - /// - /// Exit Windows - /// - /// - /// The u flags. - /// - /// - /// The dw reason. - /// - /// - /// an integer - /// - [DllImport("user32.dll")] - public static extern int ExitWindowsEx(int uFlags, int dwReason); - - /// - /// System Memory Status - /// - public struct MEMORYSTATUS // Unused var's are required here. - { - /// - /// Unknown - /// - public UInt32 dwLength; - - /// - /// Memory Load - /// - public UInt32 dwMemoryLoad; - - /// - /// Total Physical Memory - /// - public UInt32 dwTotalPhys; // Used - - /// - /// Available Physical Memory - /// - public UInt32 dwAvailPhys; - - /// - /// Total Page File - /// - public UInt32 dwTotalPageFile; - - /// - /// Available Page File - /// - public UInt32 dwAvailPageFile; - - /// - /// Total Virtual Memory - /// - public UInt32 dwTotalVirtual; - - /// - /// Available Virtual Memory - /// - public UInt32 dwAvailVirtual; - } - - /// - /// Global Memory Status - /// - /// - /// The lp buffer. - /// - [DllImport("kernel32.dll")] - public static extern void GlobalMemoryStatus(ref MEMORYSTATUS lpBuffer); - - /// - /// Generate a Console Ctrl Event - /// - /// - /// The sigevent. - /// - /// - /// The dw process group id. - /// - /// - /// Bool true is sucess - /// - [DllImport("kernel32.dll", SetLastError = true)] - public static extern bool GenerateConsoleCtrlEvent(ConsoleCtrlEvent sigevent, int dwProcessGroupId); - - /// - /// Console Ctrl Event - /// - public enum ConsoleCtrlEvent - { - /// - /// Ctrl - C - /// - CTRL_C = 0, - - /// - /// Ctrl - Break - /// - CTRL_BREAK = 1, - - /// - /// Ctrl - Close - /// - CTRL_CLOSE = 2, - } - - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - static extern EXECUTION_STATE SetThreadExecutionState(EXECUTION_STATE esFlags); - - [FlagsAttribute] - public enum EXECUTION_STATE : uint - { - ES_SYSTEM_REQUIRED = 0x00000001, - ES_CONTINUOUS = 0x80000000, - ES_AWAYMODE_REQUIRED = 0x00000040 - } - - /// - /// Prevent the system from sleeping - /// - public static void PreventSleep() - { - SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS | EXECUTION_STATE.ES_SYSTEM_REQUIRED | EXECUTION_STATE.ES_AWAYMODE_REQUIRED); - } - - /// - /// Allow the system to sleep. - /// - public static void AllowSleep() - { - SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS); - } - } -} -- cgit v1.2.3