Use explicit modifiers for iOS code.
This commit is contained in:
parent
e7620a11b4
commit
016799060a
8 changed files with 64 additions and 66 deletions
|
@ -9,7 +9,7 @@ namespace OpenTK.Graphics.ES11
|
|||
public sealed partial class GL : GraphicsBindingsBase
|
||||
{
|
||||
#if IPHONE
|
||||
const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
private const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
#else
|
||||
private const string Library = "GLESv1_CM";
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenTK.Graphics.ES20
|
|||
public sealed partial class GL : GraphicsBindingsBase
|
||||
{
|
||||
#if IPHONE
|
||||
const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
private const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
#else
|
||||
private const string Library = "libGLESv2.dll";
|
||||
#endif
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace OpenTK.Graphics.ES30
|
|||
public sealed partial class GL : GraphicsBindingsBase
|
||||
{
|
||||
#if IPHONE
|
||||
const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
private const string Library = "/System/Library/Frameworks/OpenGLES.framework/OpenGLES";
|
||||
#else
|
||||
private const string Library = "libGLESv2.dll";
|
||||
#endif
|
||||
|
|
|
@ -86,25 +86,25 @@ namespace OpenTK
|
|||
#endif
|
||||
|
||||
// System.Xml.XmlIgnoreAttribute
|
||||
class XmlIgnoreAttribute : Attribute
|
||||
internal class XmlIgnoreAttribute : Attribute
|
||||
{
|
||||
}
|
||||
|
||||
// System.ComponentModel.EditorBrowrableAttribute
|
||||
class EditorBrowsableAttribute : Attribute
|
||||
internal class EditorBrowsableAttribute : Attribute
|
||||
{
|
||||
public EditorBrowsableAttribute(EditorBrowsableState state) { }
|
||||
}
|
||||
|
||||
// System.ComponentModel.EditorBrowsableState
|
||||
enum EditorBrowsableState
|
||||
internal enum EditorBrowsableState
|
||||
{
|
||||
Always = 0,
|
||||
Never = 1,
|
||||
Advanced = 2,
|
||||
}
|
||||
|
||||
class RegistryKey
|
||||
internal class RegistryKey
|
||||
{
|
||||
public RegistryKey OpenSubKey(string name)
|
||||
{
|
||||
|
@ -117,14 +117,14 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
class Registry
|
||||
internal class Registry
|
||||
{
|
||||
public static readonly RegistryKey LocalMachine = new RegistryKey();
|
||||
}
|
||||
|
||||
public struct PointF : IEquatable<PointF>
|
||||
{
|
||||
float x, y;
|
||||
private float x, y;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new PointF instance.
|
||||
|
@ -265,7 +265,7 @@ namespace OpenTK
|
|||
|
||||
public struct SizeF : IEquatable<SizeF>
|
||||
{
|
||||
float width, height;
|
||||
private float width, height;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new SizeF instance.
|
||||
|
@ -397,8 +397,8 @@ namespace OpenTK
|
|||
|
||||
public struct RectangleF : IEquatable<RectangleF>
|
||||
{
|
||||
PointF location;
|
||||
SizeF size;
|
||||
private PointF location;
|
||||
private SizeF size;
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a new RectangleF instance.
|
||||
|
@ -625,7 +625,7 @@ namespace OpenTK
|
|||
|
||||
public sealed class Icon : IDisposable
|
||||
{
|
||||
IntPtr handle;
|
||||
private IntPtr handle;
|
||||
|
||||
public Icon(Icon icon, int width, int height)
|
||||
{
|
||||
|
@ -665,8 +665,8 @@ namespace OpenTK
|
|||
|
||||
public sealed class Bitmap : Image
|
||||
{
|
||||
int width;
|
||||
int height;
|
||||
private int width;
|
||||
private int height;
|
||||
|
||||
public Bitmap() { }
|
||||
|
||||
|
@ -1549,7 +1549,7 @@ namespace OpenTK
|
|||
}
|
||||
}
|
||||
|
||||
sealed class BitmapData
|
||||
internal sealed class BitmapData
|
||||
{
|
||||
internal BitmapData(int width, int height, int stride)
|
||||
{
|
||||
|
@ -1564,7 +1564,7 @@ namespace OpenTK
|
|||
public int Stride { get; private set; }
|
||||
}
|
||||
|
||||
enum ImageLockMode
|
||||
internal enum ImageLockMode
|
||||
{
|
||||
ReadOnly,
|
||||
WriteOnly,
|
||||
|
@ -1572,16 +1572,16 @@ namespace OpenTK
|
|||
UserInputBuffer
|
||||
}
|
||||
|
||||
enum PixelFormat
|
||||
internal enum PixelFormat
|
||||
{
|
||||
Format32bppArgb
|
||||
}
|
||||
|
||||
enum ImageFormat {
|
||||
internal enum ImageFormat {
|
||||
Png
|
||||
}
|
||||
|
||||
sealed class SystemEvents
|
||||
internal sealed class SystemEvents
|
||||
{
|
||||
public static event EventHandler DisplaySettingsChanged;
|
||||
}
|
||||
|
@ -1590,7 +1590,7 @@ namespace OpenTK
|
|||
// Need a different namespace to avoid clash with OpenTK.Graphics.
|
||||
namespace OpenTK.Minimal
|
||||
{
|
||||
sealed class Graphics : IDisposable
|
||||
internal sealed class Graphics : IDisposable
|
||||
{
|
||||
public static Graphics FromImage(OpenTK.Image img)
|
||||
{
|
||||
|
|
|
@ -5,9 +5,9 @@ using OpenTK.Platform;
|
|||
|
||||
namespace OpenTK.Platform.iPhoneOS
|
||||
{
|
||||
class AndroidDisplayDeviceDriver : IDisplayDeviceDriver
|
||||
internal class AndroidDisplayDeviceDriver : IDisplayDeviceDriver
|
||||
{
|
||||
static DisplayDevice dev;
|
||||
private static DisplayDevice dev;
|
||||
static AndroidDisplayDeviceDriver()
|
||||
{
|
||||
dev = new DisplayDevice();
|
||||
|
|
|
@ -34,7 +34,7 @@ using OpenTK.Graphics;
|
|||
|
||||
namespace OpenTK.Platform.iPhoneOS
|
||||
{
|
||||
class iPhoneFactory : PlatformFactoryBase
|
||||
internal class iPhoneFactory : PlatformFactoryBase
|
||||
{
|
||||
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ using ES30 = OpenTK.Graphics.ES30;
|
|||
|
||||
namespace OpenTK.Platform.iPhoneOS
|
||||
{
|
||||
sealed class GLCalls {
|
||||
internal sealed class GLCalls {
|
||||
public delegate void glBindFramebuffer(All target, int framebuffer);
|
||||
public delegate void glBindRenderbuffer(All target, int renderbuffer);
|
||||
public delegate void glDeleteFramebuffers(int n, ref int framebuffers);
|
||||
|
@ -69,7 +69,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
throw new ArgumentException("api");
|
||||
}
|
||||
|
||||
static GLCalls CreateES1()
|
||||
private static GLCalls CreateES1()
|
||||
{
|
||||
return new GLCalls() {
|
||||
BindFramebuffer = (t, f) => ES11.GL.Oes.BindFramebuffer(t, f),
|
||||
|
@ -88,7 +88,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
};
|
||||
}
|
||||
|
||||
static GLCalls CreateES2()
|
||||
private static GLCalls CreateES2()
|
||||
{
|
||||
return new GLCalls() {
|
||||
BindFramebuffer = (t, f) => ES20.GL.BindFramebuffer((ES20.FramebufferTarget) t, f),
|
||||
|
@ -107,7 +107,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
};
|
||||
}
|
||||
|
||||
static GLCalls CreateES3()
|
||||
private static GLCalls CreateES3()
|
||||
{
|
||||
return new GLCalls() {
|
||||
BindFramebuffer = (t, f) => ES30.GL.BindFramebuffer((ES30.FramebufferTarget) t, f),
|
||||
|
@ -127,7 +127,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
interface ITimeSource {
|
||||
internal interface ITimeSource {
|
||||
void Suspend ();
|
||||
void Resume ();
|
||||
|
||||
|
@ -135,12 +135,12 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
|
||||
[Register]
|
||||
class CADisplayLinkTimeSource : NSObject, ITimeSource {
|
||||
const string selectorName = "runIteration:";
|
||||
static Selector selRunIteration = new Selector (selectorName);
|
||||
internal class CADisplayLinkTimeSource : NSObject, ITimeSource {
|
||||
private const string selectorName = "runIteration:";
|
||||
private static Selector selRunIteration = new Selector (selectorName);
|
||||
|
||||
iPhoneOSGameView view;
|
||||
CADisplayLink displayLink;
|
||||
private iPhoneOSGameView view;
|
||||
private CADisplayLink displayLink;
|
||||
|
||||
public CADisplayLinkTimeSource (iPhoneOSGameView view, int frameInterval)
|
||||
{
|
||||
|
@ -177,18 +177,17 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
|
||||
[Export (selectorName)]
|
||||
[Preserve (Conditional = true)]
|
||||
void RunIteration (NSObject parameter)
|
||||
private void RunIteration (NSObject parameter)
|
||||
{
|
||||
view.RunIteration (null);
|
||||
}
|
||||
}
|
||||
|
||||
class NSTimerTimeSource : ITimeSource {
|
||||
internal class NSTimerTimeSource : ITimeSource {
|
||||
private TimeSpan timeout;
|
||||
private NSTimer timer;
|
||||
|
||||
TimeSpan timeout;
|
||||
NSTimer timer;
|
||||
|
||||
iPhoneOSGameView view;
|
||||
private iPhoneOSGameView view;
|
||||
|
||||
public NSTimerTimeSource (iPhoneOSGameView view, double updatesPerSecond)
|
||||
{
|
||||
|
@ -227,19 +226,19 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
|
||||
public class iPhoneOSGameView : UIView, IGameWindow
|
||||
{
|
||||
bool suspended;
|
||||
bool disposed;
|
||||
private bool suspended;
|
||||
private bool disposed;
|
||||
|
||||
int framebuffer, renderbuffer;
|
||||
private int framebuffer, renderbuffer;
|
||||
|
||||
GLCalls gl;
|
||||
private GLCalls gl;
|
||||
|
||||
ITimeSource timesource;
|
||||
System.Diagnostics.Stopwatch stopwatch;
|
||||
TimeSpan prevUpdateTime;
|
||||
TimeSpan prevRenderTime;
|
||||
private ITimeSource timesource;
|
||||
private System.Diagnostics.Stopwatch stopwatch;
|
||||
private TimeSpan prevUpdateTime;
|
||||
private TimeSpan prevRenderTime;
|
||||
|
||||
IWindowInfo windowInfo = Utilities.CreateDummyWindowInfo();
|
||||
private IWindowInfo windowInfo = Utilities.CreateDummyWindowInfo();
|
||||
|
||||
[Export("initWithCoder:")]
|
||||
public iPhoneOSGameView(NSCoder coder)
|
||||
|
@ -261,7 +260,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
return new Class (typeof (CAEAGLLayer));
|
||||
}
|
||||
|
||||
void AssertValid()
|
||||
private void AssertValid()
|
||||
{
|
||||
if (disposed)
|
||||
{
|
||||
|
@ -269,7 +268,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
void AssertContext()
|
||||
private void AssertContext()
|
||||
{
|
||||
if (GraphicsContext == null)
|
||||
{
|
||||
|
@ -277,7 +276,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
EAGLRenderingAPI api;
|
||||
private EAGLRenderingAPI api;
|
||||
public EAGLRenderingAPI ContextRenderingApi {
|
||||
get {
|
||||
AssertValid();
|
||||
|
@ -315,7 +314,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
bool retainedBacking;
|
||||
private bool retainedBacking;
|
||||
public bool LayerRetainsBacking {
|
||||
get {
|
||||
AssertValid();
|
||||
|
@ -331,7 +330,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
NSString colorFormat;
|
||||
private NSString colorFormat;
|
||||
public NSString LayerColorFormat {
|
||||
get {
|
||||
AssertValid();
|
||||
|
@ -357,7 +356,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
|
||||
public bool AutoResize {get; set;}
|
||||
|
||||
UIViewController GetViewController()
|
||||
private UIViewController GetViewController()
|
||||
{
|
||||
UIResponder r = this;
|
||||
while (r != null) {
|
||||
|
@ -505,7 +504,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
set {throw new NotSupportedException();}
|
||||
}
|
||||
|
||||
Size size;
|
||||
private Size size;
|
||||
public Size Size {
|
||||
get {
|
||||
AssertValid();
|
||||
|
@ -648,7 +647,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
CreateFrameBuffer(eaglLayer);
|
||||
}
|
||||
|
||||
void CreateFrameBuffer(CAEAGLLayer eaglLayer)
|
||||
private void CreateFrameBuffer(CAEAGLLayer eaglLayer)
|
||||
{
|
||||
int oldRenderbuffer = 1;
|
||||
gl.GetInteger(All.RenderbufferBindingOes, out oldRenderbuffer);
|
||||
|
@ -773,8 +772,8 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
GraphicsContext.SwapBuffers();
|
||||
}
|
||||
|
||||
WeakReference frameBufferWindow;
|
||||
WeakReference frameBufferLayer;
|
||||
private WeakReference frameBufferWindow;
|
||||
private WeakReference frameBufferLayer;
|
||||
|
||||
public void Run()
|
||||
{
|
||||
|
@ -832,7 +831,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
Start ();
|
||||
}
|
||||
|
||||
void Start ()
|
||||
private void Start ()
|
||||
{
|
||||
prevUpdateTime = TimeSpan.Zero;
|
||||
prevRenderTime = TimeSpan.Zero;
|
||||
|
@ -850,7 +849,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
OnUnload(EventArgs.Empty);
|
||||
}
|
||||
|
||||
void Suspend ()
|
||||
private void Suspend ()
|
||||
{
|
||||
if (timesource != null)
|
||||
{
|
||||
|
@ -860,7 +859,7 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
suspended = true;
|
||||
}
|
||||
|
||||
void Resume ()
|
||||
private void Resume ()
|
||||
{
|
||||
if (timesource != null)
|
||||
{
|
||||
|
@ -950,8 +949,8 @@ namespace OpenTK.Platform.iPhoneOS
|
|||
}
|
||||
}
|
||||
|
||||
FrameEventArgs updateEventArgs = new FrameEventArgs();
|
||||
FrameEventArgs renderEventArgs = new FrameEventArgs();
|
||||
private FrameEventArgs updateEventArgs = new FrameEventArgs();
|
||||
private FrameEventArgs renderEventArgs = new FrameEventArgs();
|
||||
|
||||
internal void RunIteration (NSTimer timer)
|
||||
{
|
||||
|
|
|
@ -13,8 +13,7 @@ using OpenGLES;
|
|||
using OpenTK.Graphics;
|
||||
|
||||
namespace OpenTK.Platform.iPhoneOS {
|
||||
|
||||
class iPhoneOSGraphicsContext : EmbeddedGraphicsContext
|
||||
internal class iPhoneOSGraphicsContext : EmbeddedGraphicsContext
|
||||
{
|
||||
public EAGLContext EAGLContext {get; private set;}
|
||||
|
||||
|
|
Loading…
Reference in a new issue