Browse Source

Subsystems can now be selected via Application extension methods.

pull/504/head
Jason Jarvis 10 years ago
parent
commit
06b9d38858
  1. 12
      src/Gtk/Perspex.Cairo/CairoPlatform.cs
  2. 12
      src/Gtk/Perspex.Gtk/GtkPlatform.cs
  3. 12
      src/Skia/Perspex.Skia/SkiaPlatform.cs
  4. 12
      src/Windows/Perspex.Direct2D1/Direct2D1Platform.cs
  5. 12
      src/Windows/Perspex.Win32/Win32Platform.cs

12
src/Gtk/Perspex.Cairo/CairoPlatform.cs

@ -7,6 +7,18 @@ using Perspex.Cairo.Media.Imaging;
using Perspex.Media;
using Perspex.Platform;
namespace Perspex
{
public static class GtkApplicationExtensions
{
public static AppT UseCairo<AppT>(this AppT app) where AppT : Application
{
Perspex.Cairo.CairoPlatform.Initialize();
return app;
}
}
}
namespace Perspex.Cairo
{
using System.IO;

12
src/Gtk/Perspex.Gtk/GtkPlatform.cs

@ -10,6 +10,18 @@ using Perspex.Input;
using Perspex.Platform;
using Perspex.Shared.PlatformSupport;
namespace Perspex
{
public static class GtkApplicationExtensions
{
public static AppT UseGtkSubsystem<AppT>(this AppT app) where AppT : Application
{
Perspex.Gtk.GtkPlatform.Initialize();
return app;
}
}
}
namespace Perspex.Gtk
{
using Gtk = global::Gtk;

12
src/Skia/Perspex.Skia/SkiaPlatform.cs

@ -3,6 +3,18 @@ using System.Collections.Generic;
using System.Text;
using Perspex.Platform;
namespace Perspex
{
public static class SkiaApplicationExtensions
{
public static AppT UseSkia<AppT>(this AppT app) where AppT : Application
{
Perspex.Skia.SkiaPlatform.Initialize();
return app;
}
}
}
namespace Perspex.Skia
{
public static class SkiaPlatform

12
src/Windows/Perspex.Direct2D1/Direct2D1Platform.cs

@ -7,6 +7,18 @@ using Perspex.Direct2D1.Media;
using Perspex.Media;
using Perspex.Platform;
namespace Perspex
{
public static class Direct2DApplicationExtensions
{
public static AppT UseDirect2D<AppT>(this AppT app) where AppT : Application
{
Perspex.Direct2D1.Direct2D1Platform.Initialize();
return app;
}
}
}
namespace Perspex.Direct2D1
{
public class Direct2D1Platform : IPlatformRenderInterface

12
src/Windows/Perspex.Win32/Win32Platform.cs

@ -16,6 +16,18 @@ using Perspex.Shared.PlatformSupport;
using Perspex.Win32.Input;
using Perspex.Win32.Interop;
namespace Perspex
{
public static class Win32ApplicationExtensions
{
public static AppT UseWin32Subsystem<AppT>(this AppT app) where AppT : Application
{
Perspex.Win32.Win32Platform.Initialize();
return app;
}
}
}
namespace Perspex.Win32
{
public class Win32Platform : IPlatformThreadingInterface, IPlatformSettings, IWindowingPlatform

Loading…
Cancel
Save