#endregion
}
+ #pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
+
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+
+ #pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
}
#endregion
}
+ #pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
+
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.DebugMessageCallback"/>.
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+
+ #pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
}
Debug.Print("GraphicsContextFlags: {0}", flags);
Debug.Print("Requested version: {0}.{1}", major, minor);
- IGraphicsContext shareContext = shareContext = FindSharedContext();
+ IGraphicsContext shareContext = FindSharedContext();
// Todo: Add a DummyFactory implementing IPlatformFactory.
if (designMode)
#endregion
}
+ #pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
+
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Amd.DebugMessageCallback"/>.
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+
+ #pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
}
#endregion
}
+ #pragma warning disable 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
+
/// <summary>
/// Defines the signature of a debug callback for
/// <see cref="GL.Arb.DebugMessageCallback"/>.
DebugSource source, DebugType type, int id,
DebugSeverity severity, int length, IntPtr message,
IntPtr userParam);
+
+ #pragma warning restore 1574 // XML comment cref attribute could not be resolved, compiler bug in Mono 3.4.0
}
#region Fields
MouseButton button;
- bool pressed;
#endregion
: base(x, y)
{
this.button = button;
- this.pressed = pressed;
}
/// <summary>
#region Properties
+ #pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
+
/// <summary>
/// Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
/// </summary>
[CLSCompliant(false)]
public Vector3 Xyz { get { return xyz; } set { xyz = value; } }
+ #pragma warning restore 3005
+
/// <summary>
/// Gets or sets the X component of this instance.
/// </summary>
#region Properties
+ #pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
+
/// <summary>
/// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
/// </summary>
/// </summary>
public Vector3d Xyz { get { return xyz; } set { xyz = value; } }
+ #pragma warning restore 3005
+
/// <summary>
/// Gets or sets the X component of this instance.
/// </summary>
// Disable momentum scrolling and long-press key pop-ups
IntPtr settings = Cocoa.SendIntPtr(Class.NSDictionary, Selector.Alloc);
- IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
+ //IntPtr momentum_scrolling = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
IntPtr press_and_hold = Cocoa.SendIntPtr(Class.NSNumber, Selector.Get("numberWithBool:"), false);
// Initialize and register the settings dictionary
for (int i = 0; i < element_array.Count; i++)
{
IOHIDElementRef element_ref = element_array[i];
- IOHIDElementType type = NativeMethods.IOHIDElementGetType(element_ref);
HIDPage page = NativeMethods.IOHIDElementGetUsagePage(element_ref);
int usage = NativeMethods.IOHIDElementGetUsage(element_ref);
using System.Security;
using System.Runtime.InteropServices;
+#pragma warning disable 0169
+
namespace OpenTK.Platform.SDL2
{
using Surface = IntPtr;
{
class Sdl2Keyboard : IKeyboardDriver2
{
+ #pragma warning disable 649 // Field never assigned to, compiler bug in Mono 3.4.0
KeyboardState state;
-
- readonly List<KeyboardDevice> keyboards =
- new List<KeyboardDevice>();
+ #pragma warning restore 649
public Sdl2Keyboard()
{
bool pressed = e.State != 0;
var scancode = e.Keysym.Scancode;
Key key = Sdl2KeyMap.GetKey(scancode);
- KeyModifiers mods = Sdl2KeyMap.GetModifiers(e.Keysym.Mod);
if (key != Key.Unknown)
{
Icon icon;
MouseCursor cursor = MouseCursor.Default;
IntPtr sdl_cursor = IntPtr.Zero;
- string window_title;
// Used in KeyPress event to decode SDL UTF8 text strings
// to .Net UTF16 strings
window = new Sdl2WindowInfo(handle, null);
window_id = SDL.GetWindowID(handle);
windows.Add(window_id, this);
- window_title = title;
}
}
if (Exists)
{
SDL.SetWindowTitle(window.Handle, value);
- window_title = value;
}
}
}
int device_count = 0, mode_count = 0;
// Get available video adapters and enumerate all monitors
- WindowsDisplayDevice dev1 = new WindowsDisplayDevice(), dev2 = new WindowsDisplayDevice();
+ WindowsDisplayDevice dev1 = new WindowsDisplayDevice();
while (Functions.EnumDisplayDevices(null, device_count++, dev1, 0))
{
if ((dev1.StateFlags & DisplayDeviceStateFlags.AttachedToDesktop) == DisplayDeviceStateFlags.None)
ICD,
}
- static readonly object SyncRoot = new object();
readonly IntPtr Device;
- readonly List<GraphicsMode> modes = new List<GraphicsMode>();
#region Constructors
readonly object sync = new object();
List<JoystickDevice> sticks = new List<JoystickDevice>();
- IList<JoystickDevice> sticks_readonly;
// Matches a WinMM device index to a specific stick above
readonly Dictionary<int, int> index_to_stick =
public WinMMJoystick()
{
- sticks_readonly = sticks.AsReadOnly();
RefreshDevices();
}
// Input event data.
static RawInput data = new RawInput();
- static readonly int rawInputStructSize = API.RawInputSize;
WinRawKeyboard keyboard_driver;
WinRawMouse mouse_driver;
using System.Diagnostics;
using System.Runtime.InteropServices;
+#pragma warning disable 0169
+
namespace OpenTK.Platform.X11
{
using Atom = IntPtr;
{
int width = image.Width;
int height = image.Height;
- int size = width * height;
BitmapData data = image.LockBits(new Rectangle(0, 0, width, height),
ImageLockMode.ReadOnly,
XFreeGC(display, gc);
image.UnlockBits(data);
-
+
return pixmap;
}
{
short rate = 0;
IntPtr screen_config = Functions.XRRGetScreenInfo(API.DefaultDisplay, Functions.XRootWindow(API.DefaultDisplay, screen));
- ushort rotation = 0;
- int size = Functions.XRRConfigCurrentConfiguration(screen_config, out rotation);
rate = Functions.XRRConfigCurrentRate(screen_config);
Functions.XRRFreeScreenConfigInfo(screen_config);
return (float)rate;
IntPtr _atom_net_wm_state_fullscreen;
IntPtr _atom_net_wm_state_maximized_horizontal;
IntPtr _atom_net_wm_state_maximized_vertical;
-
+
+ #pragma warning disable 414 // assigned but never used
IntPtr _atom_net_wm_allowed_actions;
IntPtr _atom_net_wm_action_resize;
IntPtr _atom_net_wm_action_maximize_horizontally;
IntPtr _atom_net_wm_action_maximize_vertically;
+ #pragma warning restore 414
IntPtr _atom_net_wm_icon;
static readonly IntPtr _atom_add = (IntPtr)1;
static readonly IntPtr _atom_toggle = (IntPtr)2;
+ #pragma warning disable 649 // never assigned, compiler bug in Mono 3.4.0
Rectangle bounds, client_rectangle;
+ #pragma warning restore 649
int border_left, border_right, border_top, border_bottom;
Icon icon;
bool has_focus;
readonly IntPtr EmptyCursor;
+ #pragma warning disable 414 // Field assigned but never used, we do that on purpose
readonly bool xi2_supported;
readonly int xi2_opcode;
readonly int xi2_version;
+ #pragma warning restore 414
#endregion
bool IsWindowBorderHidden
{
get
- {
- //IntPtr actual_atom;
- //int actual_format;
- //IntPtr nitems;
- //IntPtr bytes_after;
- IntPtr prop = IntPtr.Zero;
- //IntPtr atom;
- //XWindowAttributes attributes;
-
+ {
using (new XLock(window.Display))
{
// Test if decorations have been disabled through Motif.
Debug.Print("Selecting FB config for {0}", mode);
List<int> visualAttributes = new List<int>();
- IntPtr visual = IntPtr.Zero;
if (mode.ColorFormat.BitsPerPixel > 0)
{