Browse Source

Add new Tests directory with a test program for MacOS submitted by CircleOf14.

Kenneth Pouncey 13 years ago
parent
commit
3c93cb32f7
14 changed files with 814 additions and 0 deletions
  1. 37 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester.sln
  2. BIN
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Content/UiCursor.xnb
  3. BIN
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Content/fntStandard.xnb
  4. 16 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Enums.cs
  5. 175 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Game1.cs
  6. 18 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Info.plist
  7. 128 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/InputManager.cs
  8. 118 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/MainMenu.xib
  9. 74 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester.csproj
  10. 80 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Object.cs
  11. 42 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Program.cs
  12. 34 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Properties/AssemblyInfo.cs
  13. 53 0
      Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/TextManager.cs
  14. 39 0
      Tests/MonoGame.Tests.MacOS.sln

+ 37 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester.sln

@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MouseGetStateAndIsMouseVisibleTester", "MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj", "{7B2F1E86-1B56-4F78-9265-EA8852442171}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\Public\Share\MonoMacSource\kjpgit\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\Public\Share\MonoMacSource\kjpgit\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+		Distribution|Any CPU = Distribution|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|x86.Build.0 = Debug|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.ActiveCfg = Distribution|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.Build.0 = Distribution|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|x86.ActiveCfg = Release|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|x86.Build.0 = Release|Any CPU
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Debug|x86.ActiveCfg = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Debug|x86.Build.0 = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Release|x86.ActiveCfg = Release|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Release|x86.Build.0 = Release|x86
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj
+	EndGlobalSection
+EndGlobal

BIN
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Content/UiCursor.xnb


BIN
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Content/fntStandard.xnb


+ 16 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Enums.cs

@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+    public enum MsState
+    {
+        ButtonWasPressed,
+        ButtonWasDoublePressed,
+        ButtonWasReleased,
+        ButtonStillPressed,
+        ButtonStillReleased
+    }//MsState
+}

+ 175 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Game1.cs

@@ -0,0 +1,175 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.GamerServices;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using System.Windows.Forms;
+
+using MonoMac.AppKit;
+using MonoMac.Foundation;
+
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+    public class Game1 : Microsoft.Xna.Framework.Game
+    {
+        GraphicsDeviceManager graphics;
+        SpriteBatch spriteBatch;
+        public TextManager aTm;
+        public InputManager cIm;
+        private SpriteFont sfStandard;
+        public MouseState mousestatus;
+        public Texture2D t2dUiCursor;
+        public Object aObjects;
+        bool bWindowIsCentered = false;
+        bool bFullScreen = false;
+
+        public Game1()
+        {
+            graphics = new GraphicsDeviceManager(this);
+            Content.RootDirectory = "Content";
+
+            cIm = new InputManager(this);
+			Window.AllowUserResizing = true;
+
+			 // Subscribe to the game window's ClientSizeChanged event.
+			Window.ClientSizeChanged += new EventHandler( Window_ClientSizeChanged );
+        }
+
+    void Window_ClientSizeChanged( object sender, EventArgs e )
+    {
+			// Make changes to handle the new window size.
+			//Console.WriteLine("Window size changed " + Window.ClientBounds);
+    }
+
+        protected override void Initialize()
+        {
+            // TODO: Add your initialization logic here
+
+            base.Initialize();
+        }
+
+
+        protected override void LoadContent()
+        {
+            // Create a new SpriteBatch, which can be used to draw textures.
+            spriteBatch = new SpriteBatch(GraphicsDevice);
+            Services.AddService(typeof(SpriteBatch), spriteBatch);
+
+            sfStandard = Content.Load<SpriteFont>("fntStandard");
+            t2dUiCursor = Content.Load<Texture2D>("UiCursor");
+
+            aTm = new TextManager(this, sfStandard);
+            Components.Add(aTm);
+
+            aObjects = new Object(this, ref t2dUiCursor);
+            Components.Add(aObjects);
+
+            aObjects.pos.X = 200;
+            aObjects.pos.Y = 200;
+        }
+
+
+        protected override void UnloadContent()
+        {
+            // TODO: Unload any non ContentManager content here
+        }
+
+        public void Toggle()
+        {
+            graphics.ToggleFullScreen();
+            
+			if(bFullScreen)
+			{
+				bFullScreen = false;
+			}//if
+			else
+			{
+				bFullScreen = true;
+			}//else
+        }//Toggle
+
+        public int GetBackBufferWidth()
+        {
+            return graphics.PreferredBackBufferWidth;
+        }//GetBackBufferWidth
+
+        public int GetBackBufferHeight()
+        {
+            return graphics.PreferredBackBufferHeight;
+        }//GetBackBufferWidth
+        
+        public String GetStyleMask()
+        {
+        	return this.Window.Window.StyleMask.ToString();
+        }//GetStyleMask
+
+
+        protected override void Update(GameTime gameTime)
+        {
+            mousestatus = Mouse.GetState();
+
+            cIm.InputHandler(mousestatus, gameTime);
+
+            aObjects.pos.X = mousestatus.X;
+            aObjects.pos.Y = mousestatus.Y;
+
+            base.Update(gameTime);
+        }
+
+
+        protected override void Draw(GameTime gameTime)
+        {
+            
+            GraphicsDevice.Clear(Color.CornflowerBlue);
+
+            spriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend);
+                base.Draw(gameTime); 
+            spriteBatch.End();
+
+       
+        }
+        
+        public void CenterWindow()
+        {
+        	if(bFullScreen) return;
+        	
+        		
+            int index;
+            int upperBound;
+            float fScreenWidth, fScreenHeight, fNewX, fNewY, fWindowWidth, fWindowHeight, fTitleBarHeight;
+	        Screen[] screens = Screen.AllScreens;
+	        
+	        fScreenWidth = fScreenHeight = 0;
+	        
+            upperBound = screens.GetUpperBound(0);
+            for (index = 0; index <= upperBound; index++)
+            {
+                if (screens[index].Primary)
+                {
+					fScreenWidth = (float)screens[index].Bounds.Width;
+                    fScreenHeight = (float)screens[index].Bounds.Height;  
+                    index = upperBound;
+                }//if
+            }//for
+            
+            fWindowWidth = graphics.PreferredBackBufferWidth;
+            fWindowHeight = graphics.PreferredBackBufferHeight;
+            	
+            fNewX = (fScreenWidth - fWindowWidth) / 2;
+            fNewY = (fScreenHeight - fWindowHeight) / 2;
+            
+            fTitleBarHeight = this.Window.Window.Frame.Height - fWindowHeight;
+            
+			System.Drawing.PointF pfLocation = new System.Drawing.PointF(fNewX,fNewY);
+			System.Drawing.PointF pfSize = new System.Drawing.PointF(fWindowWidth, fWindowHeight + fTitleBarHeight);
+			System.Drawing.SizeF sfSize = new System.Drawing.SizeF(pfSize);
+			System.Drawing.RectangleF rectTemp = new System.Drawing.RectangleF(pfLocation, sfSize);
+			this.Window.Window.SetFrame(rectTemp, true);
+        }//CenterWindow
+    }
+}

+ 18 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Info.plist

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleIdentifier</key>
+	<string>com.yourcompany.MouseGetStateAndIsMouseVisibleTester</string>
+	<key>CFBundleName</key>
+	<string>MouseGetStateAndIsMouseVisibleTester</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>10.6</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 128 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/InputManager.cs

@@ -0,0 +1,128 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Net;
+using Microsoft.Xna.Framework.Storage;
+using Microsoft.Xna.Framework.Media;
+using System.IO;
+using Microsoft.Xna.Framework.GamerServices;
+
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+    public class InputManager
+    {
+        private Game1 cG;
+        private MouseState mousestatus;
+        private MsState mssButtonLeft;
+        public TimeSpan tsTimeSinceLastClick;
+        private int nClicksForDoubleClick;
+
+
+        public InputManager(Game game)
+        {
+            cG = (Game1)game;
+            mssButtonLeft = MsState.ButtonWasReleased;
+            tsTimeSinceLastClick = TimeSpan.Zero;
+            nClicksForDoubleClick = 0;
+
+        }//InputManger
+
+        public void InputHandler(MouseState mst, GameTime gameTime)
+        {
+            if (!cG.IsActive) return;
+            
+            mousestatus = mst;
+
+            HandleMouseLeftButton(gameTime);
+
+            if (mssButtonLeft == MsState.ButtonWasPressed)
+            {
+                if (mousestatus.X >= 0 && mousestatus.X <= 405)
+                {
+                    if (mousestatus.Y >= 209 && mousestatus.Y <= 250)
+                    {
+                        cG.Toggle();
+                    }//if
+                }//if
+            }//if
+            
+            if (mssButtonLeft == MsState.ButtonWasPressed)
+            {
+                if (mousestatus.X >= 0 && mousestatus.X <= 628)
+                {
+                    if (mousestatus.Y >= 304 && mousestatus.Y <= 350)
+                    {
+                        cG.CenterWindow();
+                    }//if
+                }//if
+            }//if
+        }//InputHandler
+
+        private void HandleMouseLeftButton(GameTime gTime)
+        {
+            tsTimeSinceLastClick += gTime.ElapsedGameTime;
+
+            if (tsTimeSinceLastClick >= TimeSpan.FromMilliseconds(250))
+            {
+                nClicksForDoubleClick = 0;
+            }//if
+
+            if (mousestatus.LeftButton == ButtonState.Pressed)
+            {
+                if (mssButtonLeft == MsState.ButtonWasReleased)
+                {
+                    if (GetMouseX() >= 0 && GetMouseX() <= cG.GetBackBufferWidth())
+                    {
+                        if (GetMouseY() >= 0 && GetMouseY() <= cG.GetBackBufferHeight())
+                        {
+                            mssButtonLeft = MsState.ButtonWasPressed;
+                            nClicksForDoubleClick++;
+
+                            if (nClicksForDoubleClick == 1)
+                            {
+                                tsTimeSinceLastClick = TimeSpan.Zero;
+                            }//if
+
+                            if (nClicksForDoubleClick == 2)
+                            {
+                                if (tsTimeSinceLastClick < TimeSpan.FromMilliseconds(250))
+                                {
+                                    nClicksForDoubleClick = 0;
+                                    mssButtonLeft = MsState.ButtonWasDoublePressed;
+                                }//if
+                            }//if
+
+                            if (nClicksForDoubleClick == 3) nClicksForDoubleClick = 0;
+
+                        }//if
+                    }//if
+                }//if
+                else
+                {
+                    if (mssButtonLeft == MsState.ButtonWasPressed || mssButtonLeft == MsState.ButtonWasDoublePressed)
+                    {
+                        mssButtonLeft = MsState.ButtonStillPressed;
+                    }//if
+                }//else
+            }//if
+
+            if (mousestatus.LeftButton == ButtonState.Released)
+            {
+                mssButtonLeft = MsState.ButtonWasReleased;
+            }//if
+        }//HandleMouseLeftButton
+
+        public float GetMouseX()
+        {
+            return mousestatus.X;
+        }//GetMouseX
+
+        public float GetMouseY()
+        {
+            return mousestatus.Y;
+        }//GetMouseY
+    }
+}

+ 118 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/MainMenu.xib

@@ -0,0 +1,118 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
+	<data>
+		<int key="IBDocument.SystemTarget">1060</int>
+		<string key="IBDocument.SystemVersion">10D573</string>
+		<string key="IBDocument.InterfaceBuilderVersion">762</string>
+		<string key="IBDocument.AppKitVersion">1038.29</string>
+		<string key="IBDocument.HIToolboxVersion">460.00</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
+			<string key="NS.object.0">762</string>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+		</object>
+		<object class="NSArray" key="IBDocument.PluginDependencies">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+		</object>
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys" id="0">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+		</object>
+		<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSCustomObject" id="1001">
+				<string key="NSClassName">NSObject</string>
+			</object>
+			<object class="NSCustomObject" id="1003">
+				<string key="NSClassName">FirstResponder</string>
+			</object>
+			<object class="NSCustomObject" id="1004">
+				<string key="NSClassName">NSApplication</string>
+			</object>
+		</object>
+		<object class="IBObjectContainer" key="IBDocument.Objects">
+			<object class="NSMutableArray" key="connectionRecords">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+			</object>
+			<object class="IBMutableOrderedSet" key="objectRecords">
+				<object class="NSArray" key="orderedObjects">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBObjectRecord">
+						<int key="objectID">0</int>
+						<reference key="object" ref="0" />
+						<reference key="children" ref="1000" />
+						<nil key="parent" />
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-2</int>
+						<reference key="object" ref="1001" />
+						<reference key="parent" ref="0" />
+						<string key="objectName">File's Owner</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-1</int>
+						<reference key="object" ref="1003" />
+						<reference key="parent" ref="0" />
+						<string key="objectName">First Responder</string>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">-3</int>
+						<reference key="object" ref="1004" />
+						<reference key="parent" ref="0" />
+						<string key="objectName">Application</string>
+					</object>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="flattenedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<object class="NSArray" key="dict.sortedKeys">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>-1.IBPluginDependency</string>
+					<string>-2.IBPluginDependency</string>
+					<string>-3.IBPluginDependency</string>
+				</object>
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+					<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+				</object>
+			</object>
+			<object class="NSMutableDictionary" key="unlocalizedProperties">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0" />
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="activeLocalization" />
+			<object class="NSMutableDictionary" key="localizations">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<reference key="dict.sortedKeys" ref="0" />
+				<object class="NSMutableArray" key="dict.values">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+				</object>
+			</object>
+			<nil key="sourceID" />
+			<int key="maxID">0</int>
+		</object>
+		<object class="IBClassDescriber" key="IBDocument.Classes" />
+		<int key="IBDocument.localizationMode">0</int>
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
+			<integer value="3000" key="NS.object.0" />
+		</object>
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
+		<nil key="IBDocument.LastKnownRelativeProjectPath" />
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
+	</data>
+</archive>

+ 74 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester.csproj

@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{7B2F1E86-1B56-4F78-9265-EA8852442171}</ProjectGuid>
+    <ProjectTypeGuids>{948B3504-5B70-4649-8FE4-BDE1FB46EC69};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>MouseGetStateAndIsMouseVisibleTester</RootNamespace>
+    <AssemblyName>MouseGetStateAndIsMouseVisibleTester</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <PlatformTarget>x86</PlatformTarget>
+    <ConsolePause>false</ConsolePause>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="MonoMac" />
+    <Reference Include="System.Windows.Forms" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="Info.plist" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />
+  <ItemGroup>
+    <Folder Include="Properties\" />
+    <Folder Include="Content\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Enums.cs" />
+    <Compile Include="Game1.cs" />
+    <Compile Include="InputManager.cs" />
+    <Compile Include="Object.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="TextManager.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Content\fntStandard.xnb" />
+    <Content Include="Content\UiCursor.xnb" />
+  </ItemGroup>
+  <ItemGroup>
+    <InterfaceDefinition Include="MainMenu.xib" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj">
+      <Project>{36C538E6-C32A-4A8D-A39C-566173D7118E}</Project>
+      <Name>MonoGame.Framework.MacOS</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>

+ 80 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Object.cs

@@ -0,0 +1,80 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.GamerServices;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Net;
+using Microsoft.Xna.Framework.Storage;
+
+
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+    public class Object : Microsoft.Xna.Framework.DrawableGameComponent
+    {
+        public Vector2 pos;
+        protected Texture2D texture;
+        private Vector2 v2Temp;
+        protected Rectangle recCurrentFrame;
+        public int nAlpha;
+        public float fRotation;
+        public Vector2 vecRotationCenter;
+        private List<Rectangle> frames;
+
+        public Object(Game game, ref Texture2D theTexture)
+            : base(game)
+        {
+            texture = theTexture;
+            v2Temp = new Vector2();
+            fRotation = 0;
+            
+            pos = new Vector2();
+            pos.X = 0;
+            pos.Y = 0;
+
+            vecRotationCenter.X = 0;
+            vecRotationCenter.Y = 0;
+
+            Frames = new List<Rectangle>();
+            Rectangle frame = new Rectangle();
+
+            //Extract the frames from the texture
+            frame.X = 0;
+            frame.Y = 0;
+            frame.Width = texture.Width;
+            frame.Height = texture.Height;
+
+            Frames.Add(frame);
+        }
+
+        public override void Update(GameTime gameTime)
+        {
+            recCurrentFrame = frames[0];
+            
+            base.Update(gameTime);
+        }
+
+        public override void Draw(GameTime gameTime)
+        {
+            v2Temp.X = pos.X - (texture.Width / 2);
+            v2Temp.Y = pos.Y - texture.Height;
+
+            // Get the current spritebatch
+            SpriteBatch sBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
+
+            sBatch.Draw(texture, v2Temp, recCurrentFrame, new Color(255, 255, 255, (byte)nAlpha), fRotation, vecRotationCenter, 1f, SpriteEffects.None, 0);
+
+            base.Draw(gameTime);
+        }
+
+        public List<Rectangle> Frames
+        {
+            get { return frames; }
+            set { frames = value; }
+        }//Frames
+    }
+}

+ 42 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Program.cs

@@ -0,0 +1,42 @@
+using MonoMac.AppKit;
+using MonoMac.Foundation;
+
+
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+	class Program
+	{
+		static void Main (string [] args)
+		{
+			NSApplication.Init ();
+			
+			using (var p = new NSAutoreleasePool ()) {
+				NSApplication.SharedApplication.Delegate = new AppDelegate();
+				NSApplication.Main(args);
+			}
+		}
+	}
+	
+	
+	class AppDelegate : NSApplicationDelegate
+	{
+		Game1 game; 
+		
+		public override void FinishedLaunching (MonoMac.Foundation.NSObject notification)
+		{			
+			using (game = new Game1()) {
+				game.Run ();
+			}
+		}
+		
+		public override bool ApplicationShouldTerminateAfterLastWindowClosed (NSApplication sender)
+		{
+			return true;
+		}
+	}
+	
+	
+	
+
+}
+

+ 34 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/Properties/AssemblyInfo.cs

@@ -0,0 +1,34 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("MouseGetStateAndIsMouseVisibleTester")]
+[assembly: AssemblyProduct("MouseGetStateAndIsMouseVisibleTester")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyCompany("Microsoft")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type. Only Windows
+// assemblies support COM.
+[assembly: ComVisible(false)]
+
+// On Windows, the following GUID is for the ID of the typelib if this
+// project is exposed to COM. On other platforms, it unique identifies the
+// title storage container when deploying this assembly to the device.
+[assembly: Guid("9484ea83-c718-46a9-97f8-fefd52842c19")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+[assembly: AssemblyVersion("1.0.0.0")]

+ 53 - 0
Tests/MacOS/MouseGetStateAndIsMouseVisibleTester/MouseGetStateAndIsMouseVisibleTester/TextManager.cs

@@ -0,0 +1,53 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.GamerServices;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Media;
+using Microsoft.Xna.Framework.Net;
+using Microsoft.Xna.Framework.Storage;
+namespace MouseGetStateAndIsMouseVisibleTester
+{
+    public class TextManager : Microsoft.Xna.Framework.DrawableGameComponent
+    {
+        public SpriteFont sfStandard;
+        protected SpriteBatch spriteBatch = null;
+        private Game1 cG;
+        
+        public TextManager(Game game, SpriteFont sfStandardFont)
+            : base(game)
+        {
+            cG = (Game1)game;
+            spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
+            sfStandard = sfStandardFont;
+
+        }//TextManager
+
+        public override void Draw(GameTime gameTime)
+        {
+            spriteBatch.DrawString(sfStandard, "LeftMouse = " + cG.mousestatus.LeftButton.ToString(), new Vector2(0, 50), Color.White);
+
+			try
+			{
+	            spriteBatch.DrawString(sfStandard, "MouseX = " + cG.Window.Window.MouseLocationOutsideOfEventStream.X.ToString(), new Vector2(0, 100), Color.White);
+	            spriteBatch.DrawString(sfStandard, "MouseY = " + cG.Window.Window.MouseLocationOutsideOfEventStream.Y.ToString(), new Vector2(0, 130), Color.White);
+			}//try
+			catch(Exception ex)
+			{
+			
+			}
+            
+
+            
+            spriteBatch.DrawString(sfStandard, "Click here to Toggle Full Screen", new Vector2(0, 200), Color.White);
+            
+            spriteBatch.DrawString(sfStandard, "Click here to center window if in windowed mode", new Vector2(0, 300), Color.White);
+
+
+        }//Draw
+    }
+}

+ 39 - 0
Tests/MonoGame.Tests.MacOS.sln

@@ -0,0 +1,39 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MouseGetStateAndIsMouseVisibleTester", "MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj", "{7B2F1E86-1B56-4F78-9265-EA8852442171}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGame.Framework.MacOS", "..\..\MonoGame\MonoGame.Framework\MonoGame.Framework.MacOS.csproj", "{36C538E6-C32A-4A8D-A39C-566173D7118E}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lidgren.Network.MacOS", "..\..\MonoGame\ThirdParty\Lidgren.Network\Lidgren.Network.MacOS.csproj", "{AE483C29-042E-4226-BA52-D247CE7676DA}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+		Distribution|Any CPU = Distribution|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Debug|x86.Build.0 = Debug|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.ActiveCfg = Distribution|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Distribution|Any CPU.Build.0 = Distribution|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|x86.ActiveCfg = Release|Any CPU
+		{36C538E6-C32A-4A8D-A39C-566173D7118E}.Release|x86.Build.0 = Release|Any CPU
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Debug|x86.ActiveCfg = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Debug|x86.Build.0 = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Distribution|Any CPU.ActiveCfg = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Distribution|Any CPU.Build.0 = Debug|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Release|x86.ActiveCfg = Release|x86
+		{7B2F1E86-1B56-4F78-9265-EA8852442171}.Release|x86.Build.0 = Release|x86
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Debug|x86.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.ActiveCfg = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Distribution|Any CPU.Build.0 = Debug|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.ActiveCfg = Release|Any CPU
+		{AE483C29-042E-4226-BA52-D247CE7676DA}.Release|x86.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = MacOS\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester\MouseGetStateAndIsMouseVisibleTester.csproj
+	EndGlobalSection
+EndGlobal