mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-18 15:07:08 +00:00
Merge pull request #620 from Nihlus/cleanup-9-symbol-spacing
[Cleanup] Symbol Spacing
This commit is contained in:
commit
254f7e9bfb
|
@ -20,7 +20,6 @@ namespace Bind.Structures
|
||||||
/// Creates a new Parameter without type and name.
|
/// Creates a new Parameter without type and name.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Parameter()
|
public Parameter()
|
||||||
:base()
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -118,8 +118,8 @@ namespace OpenTK
|
||||||
// or [StructLayout(LayoutKind.Explicit)]
|
// or [StructLayout(LayoutKind.Explicit)]
|
||||||
private static bool CheckStructLayoutAttribute(Type type)
|
private static bool CheckStructLayoutAttribute(Type type)
|
||||||
{
|
{
|
||||||
StructLayoutAttribute[] attr = (StructLayoutAttribute[])
|
StructLayoutAttribute[] attr =
|
||||||
type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
|
(StructLayoutAttribute[])type.GetCustomAttributes(typeof(StructLayoutAttribute), true);
|
||||||
|
|
||||||
if ((attr == null) ||
|
if ((attr == null) ||
|
||||||
(attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1))
|
(attr != null && attr.Length > 0 && attr[0].Value != LayoutKind.Explicit && attr[0].Pack != 1))
|
||||||
|
|
|
@ -184,7 +184,7 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
return obj is Box2 && Equals((Box2) obj);
|
return obj is Box2 && Equals((Box2)obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -185,7 +185,7 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override bool Equals(object obj)
|
public override bool Equals(object obj)
|
||||||
{
|
{
|
||||||
return obj is Box2d && Equals((Box2d) obj);
|
return obj is Box2d && Equals((Box2d)obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -306,7 +306,7 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
private static unsafe int FloatToInt32Bits(float f) {
|
private static unsafe int FloatToInt32Bits(float f) {
|
||||||
return *((int*) &f);
|
return *((int*)&f);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="eulerAngles">The euler angles as a Vector3</param>
|
/// <param name="eulerAngles">The euler angles as a Vector3</param>
|
||||||
public Quaternion(Vector3 eulerAngles)
|
public Quaternion(Vector3 eulerAngles)
|
||||||
:this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
: this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -95,7 +95,7 @@ namespace OpenTK
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="eulerAngles">The euler angles as a Vector3d</param>
|
/// <param name="eulerAngles">The euler angles as a Vector3d</param>
|
||||||
public Quaterniond(Vector3d eulerAngles)
|
public Quaterniond(Vector3d eulerAngles)
|
||||||
:this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
: this(eulerAngles.X, eulerAngles.Y, eulerAngles.Z)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace OpenTK.Platform.Android
|
||||||
/// <see cref="M:OpenTK.Platform.Android.AndroidGraphicsMode(Javax.Microedition.Khronos.Egl.EGLDisplay,int,OpenTK.Graphics.ColorFormat,int,int,int,int,bool)" />
|
/// <see cref="M:OpenTK.Platform.Android.AndroidGraphicsMode(Javax.Microedition.Khronos.Egl.EGLDisplay,int,OpenTK.Graphics.ColorFormat,int,int,int,int,bool)" />
|
||||||
/// constructors (pass null to the display parameter for lazy initialization)
|
/// constructors (pass null to the display parameter for lazy initialization)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo) :
|
public AndroidGraphicsMode(ColorFormat color, int depth, int stencil, int samples, int buffers, bool stereo)
|
||||||
this(null, 1, color, depth, stencil, samples, buffers, stereo)
|
: this(null, 1, color, depth, stencil, samples, buffers, stereo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ namespace OpenTK.Platform.Android
|
||||||
/// </param>
|
/// </param>
|
||||||
/// <param name="majorVersion">Requested OpenGL version (1 or 2)</param>
|
/// <param name="majorVersion">Requested OpenGL version (1 or 2)</param>
|
||||||
/// <param name="mode">GraphicsMode to copy values from.</param>
|
/// <param name="mode">GraphicsMode to copy values from.</param>
|
||||||
public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode) :
|
public AndroidGraphicsMode(object display_ignored, int majorVersion, GraphicsMode mode)
|
||||||
this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
|
: this(display_ignored, majorVersion, mode.ColorFormat, mode.Depth, mode.Stencil, mode.Samples, mode.Buffers, mode.Stereo)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace OpenTK.Platform.Egl
|
||||||
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window,
|
public override IGraphicsContext CreateGLContext(GraphicsMode mode, IWindowInfo window,
|
||||||
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
var angle_window = (IAngleWindowInfoInternal) window;
|
var angle_window = (IAngleWindowInfoInternal)window;
|
||||||
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
||||||
var egl_context = new EglWinContext(mode, egl_window, shareContext, major, minor, flags);
|
var egl_context = new EglWinContext(mode, egl_window, shareContext, major, minor, flags);
|
||||||
angle_window.EglContext = egl_context;
|
angle_window.EglContext = egl_context;
|
||||||
|
@ -63,7 +63,7 @@ namespace OpenTK.Platform.Egl
|
||||||
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window,
|
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window,
|
||||||
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
|
||||||
{
|
{
|
||||||
var angle_window = (IAngleWindowInfoInternal) window;
|
var angle_window = (IAngleWindowInfoInternal)window;
|
||||||
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
var egl_window = CreateWindowInfo(angle_window, major, flags);
|
||||||
var egl_context = new EglWinContext(handle, egl_window, shareContext, major, minor, flags);
|
var egl_context = new EglWinContext(handle, egl_window, shareContext, major, minor, flags);
|
||||||
angle_window.EglContext = egl_context;
|
angle_window.EglContext = egl_context;
|
||||||
|
|
|
@ -152,12 +152,12 @@ namespace OpenTK.Platform.Egl
|
||||||
{
|
{
|
||||||
if (window is EglWindowInfo)
|
if (window is EglWindowInfo)
|
||||||
{
|
{
|
||||||
WindowInfo = (EglWindowInfo) window;
|
WindowInfo = (EglWindowInfo)window;
|
||||||
}
|
}
|
||||||
#if !ANDROID
|
#if !ANDROID
|
||||||
else if (window is IAngleWindowInfoInternal)
|
else if (window is IAngleWindowInfoInternal)
|
||||||
{
|
{
|
||||||
WindowInfo = ((IAngleWindowInfoInternal) window).EglWindowInfo;
|
WindowInfo = ((IAngleWindowInfoInternal)window).EglWindowInfo;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -263,9 +263,9 @@ namespace OpenTK.Platform.Egl
|
||||||
var internalContext = sharedContext as IGraphicsContextInternal;
|
var internalContext = sharedContext as IGraphicsContextInternal;
|
||||||
if (internalContext != null)
|
if (internalContext != null)
|
||||||
{
|
{
|
||||||
return (EglContext) internalContext.Implementation;
|
return (EglContext)internalContext.Implementation;
|
||||||
}
|
}
|
||||||
return (EglContext) sharedContext;
|
return (EglContext)sharedContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ namespace OpenTK.Platform.Egl
|
||||||
IntPtr[] configs = new IntPtr[1];
|
IntPtr[] configs = new IntPtr[1];
|
||||||
int[] attribList = new int[]
|
int[] attribList = new int[]
|
||||||
{
|
{
|
||||||
Egl.SURFACE_TYPE, (int) surfaceType,
|
Egl.SURFACE_TYPE, (int)surfaceType,
|
||||||
Egl.RENDERABLE_TYPE, (int)renderableFlags,
|
Egl.RENDERABLE_TYPE, (int)renderableFlags,
|
||||||
|
|
||||||
Egl.RED_SIZE, color.Red,
|
Egl.RED_SIZE, color.Red,
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace OpenTK.Platform.Egl
|
||||||
public void CreateWindowSurface(IntPtr config)
|
public void CreateWindowSurface(IntPtr config)
|
||||||
{
|
{
|
||||||
Surface = Egl.CreateWindowSurface(Display, config, Handle, IntPtr.Zero);
|
Surface = Egl.CreateWindowSurface(Display, config, Handle, IntPtr.Zero);
|
||||||
if (Surface==IntPtr.Zero)
|
if (Surface == IntPtr.Zero)
|
||||||
{
|
{
|
||||||
throw new GraphicsContextException(String.Format(
|
throw new GraphicsContextException(String.Format(
|
||||||
"[EGL] Failed to create window surface, error {0}.", Egl.GetError()));
|
"[EGL] Failed to create window surface, error {0}.", Egl.GetError()));
|
||||||
|
|
|
@ -472,7 +472,7 @@ namespace OpenTK.Platform.Linux
|
||||||
MT_TOOL_Y = 0x3d, /* Center Y tool position */
|
MT_TOOL_Y = 0x3d, /* Center Y tool position */
|
||||||
|
|
||||||
MAX = 0x3f,
|
MAX = 0x3f,
|
||||||
CNT = (MAX+1),
|
CNT = (MAX + 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum EvdevButton
|
internal enum EvdevButton
|
||||||
|
@ -579,7 +579,7 @@ namespace OpenTK.Platform.Linux
|
||||||
PWR = 0x16,
|
PWR = 0x16,
|
||||||
FF_STATUS = 0x17,
|
FF_STATUS = 0x17,
|
||||||
MAX = 0x1f,
|
MAX = 0x1f,
|
||||||
CNT = (MAX+1),
|
CNT = (MAX + 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum EvdevIoctl : uint
|
internal enum EvdevIoctl : uint
|
||||||
|
|
|
@ -3326,7 +3326,7 @@ namespace OpenTK.Platform.Windows
|
||||||
/*
|
/*
|
||||||
* NEC PC-9800 kbd definitions
|
* NEC PC-9800 kbd definitions
|
||||||
*/
|
*/
|
||||||
OEM_NEC_EQUAL= 0x92, // '=' key on numpad
|
OEM_NEC_EQUAL = 0x92, // '=' key on numpad
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fujitsu/OASYS kbd definitions
|
* Fujitsu/OASYS kbd definitions
|
||||||
|
|
|
@ -426,8 +426,8 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
if (stick.AxisCaps[i].LogicalMin > 0)
|
if (stick.AxisCaps[i].LogicalMin > 0)
|
||||||
{
|
{
|
||||||
short scaled_value = (short) HidHelper.ScaleValue(
|
short scaled_value = (short)HidHelper.ScaleValue(
|
||||||
(int) ((long) value + stick.AxisCaps[i].LogicalMin),
|
(int)((long)value + stick.AxisCaps[i].LogicalMin),
|
||||||
stick.AxisCaps[i].LogicalMin, stick.AxisCaps[i].LogicalMax,
|
stick.AxisCaps[i].LogicalMin, stick.AxisCaps[i].LogicalMax,
|
||||||
Int16.MinValue, Int16.MaxValue);
|
Int16.MinValue, Int16.MaxValue);
|
||||||
stick.SetAxis(collection, page, usage, scaled_value);
|
stick.SetAxis(collection, page, usage, scaled_value);
|
||||||
|
|
|
@ -109,7 +109,7 @@ namespace OpenTK.Platform.Windows
|
||||||
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
|
// making a guess at backwards compatability. Not sure what older windows returns in these cases...
|
||||||
if (deviceClass == null || deviceClass.Equals(string.Empty)){
|
if (deviceClass == null || deviceClass.Equals(string.Empty)){
|
||||||
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||||
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (String.IsNullOrEmpty(deviceDesc))
|
if (String.IsNullOrEmpty(deviceDesc))
|
||||||
|
|
|
@ -111,7 +111,7 @@ namespace OpenTK.Platform.Windows
|
||||||
// Added to address OpenTK issue 3198 with mouse on Windows 8
|
// Added to address OpenTK issue 3198 with mouse on Windows 8
|
||||||
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");
|
string deviceClassGUID = (string)regkey.GetValue("ClassGUID");
|
||||||
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
RegistryKey classGUIDKey = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Class\" + deviceClassGUID);
|
||||||
deviceClass = classGUIDKey != null ? (string) classGUIDKey.GetValue("Class") : string.Empty;
|
deviceClass = classGUIDKey != null ? (string)classGUIDKey.GetValue("Class") : string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deviceDesc remained null on a new Win7 system - not sure why.
|
// deviceDesc remained null on a new Win7 system - not sure why.
|
||||||
|
|
|
@ -81,7 +81,7 @@ namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
XInputButtons dir = 0;
|
XInputButtons dir = 0;
|
||||||
|
|
||||||
dir =XInputButtons.DPadUp | XInputButtons.DPadLeft;
|
dir = XInputButtons.DPadUp | XInputButtons.DPadLeft;
|
||||||
if ((buttons & dir) == dir)
|
if ((buttons & dir) == dir)
|
||||||
{
|
{
|
||||||
return HatPosition.UpLeft;
|
return HatPosition.UpLeft;
|
||||||
|
|
|
@ -677,7 +677,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
|
|
||||||
public override string ToString ()
|
public override string ToString ()
|
||||||
{
|
{
|
||||||
return string.Format("MotifWmHints <flags={0}, functions={1}, decorations={2}, input_mode={3}, status={4}", (MotifFlags) flags.ToInt32 (), (MotifFunctions) functions.ToInt32 (), (MotifDecorations) decorations.ToInt32 (), (MotifInputMode) input_mode.ToInt32 (), status.ToInt32 ());
|
return string.Format("MotifWmHints <flags={0}, functions={1}, decorations={2}, input_mode={3}, status={4}", (MotifFlags)flags.ToInt32 (), (MotifFunctions)functions.ToInt32 (), (MotifDecorations)decorations.ToInt32 (), (MotifInputMode)input_mode.ToInt32 (), status.ToInt32 ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -764,26 +764,26 @@ XF86VidModeGetGammaRampSize(
|
||||||
|
|
||||||
internal enum WindowState
|
internal enum WindowState
|
||||||
{
|
{
|
||||||
Sticky = (1<<0), /* everyone knows sticky */
|
Sticky = (1 << 0), /* everyone knows sticky */
|
||||||
Minimized = (1<<1), /* ??? */
|
Minimized = (1 << 1), /* ??? */
|
||||||
MaximizedVertically = (1<<2), /* window in maximized V state */
|
MaximizedVertically = (1 << 2), /* window in maximized V state */
|
||||||
MaximizedHorizontally = (1<<3), /* window in maximized H state */
|
MaximizedHorizontally = (1 << 3), /* window in maximized H state */
|
||||||
Hidden = (1<<4), /* not on taskbar but window visible */
|
Hidden = (1 << 4), /* not on taskbar but window visible */
|
||||||
Shaded = (1<<5), /* shaded (NeXT style), */
|
Shaded = (1 << 5), /* shaded (NeXT style), */
|
||||||
HID_WORKSPACE = (1<<6), /* not on current desktop */
|
HID_WORKSPACE = (1 << 6), /* not on current desktop */
|
||||||
HID_TRANSIENT = (1<<7), /* owner of transient is hidden */
|
HID_TRANSIENT = (1 << 7), /* owner of transient is hidden */
|
||||||
FixedPosition = (1<<8), /* window is fixed in position even */
|
FixedPosition = (1 << 8), /* window is fixed in position even */
|
||||||
ArrangeIgnore = (1<<9), /* ignore for auto arranging */
|
ArrangeIgnore = (1 << 9), /* ignore for auto arranging */
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum WindowHints
|
internal enum WindowHints
|
||||||
{
|
{
|
||||||
SkipFocus = (1<<0), /* "alt-tab" skips this win */
|
SkipFocus = (1 << 0), /* "alt-tab" skips this win */
|
||||||
SkipWinlist = (1<<1), /* not in win list */
|
SkipWinlist = (1 << 1), /* not in win list */
|
||||||
SkipTaskbar = (1<<2), /* not on taskbar */
|
SkipTaskbar = (1 << 2), /* not on taskbar */
|
||||||
GroupTransient = (1<<3), /* ??????? */
|
GroupTransient = (1 << 3), /* ??????? */
|
||||||
FocusOnClick = (1<<4), /* app only accepts focus when clicked */
|
FocusOnClick = (1 << 4), /* app only accepts focus when clicked */
|
||||||
DoNotCover = (1<<5), /* attempt to not cover this window */
|
DoNotCover = (1 << 5), /* attempt to not cover this window */
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum ErrorCodes : int
|
internal enum ErrorCodes : int
|
||||||
|
@ -811,28 +811,28 @@ XF86VidModeGetGammaRampSize(
|
||||||
[Flags]
|
[Flags]
|
||||||
internal enum CreateWindowMask : long//: ulong
|
internal enum CreateWindowMask : long//: ulong
|
||||||
{
|
{
|
||||||
CWBackPixmap = (1L<<0),
|
CWBackPixmap = (1L << 0),
|
||||||
CWBackPixel = (1L<<1),
|
CWBackPixel = (1L << 1),
|
||||||
CWSaveUnder = (1L<<10),
|
CWSaveUnder = (1L << 10),
|
||||||
CWEventMask = (1L<<11),
|
CWEventMask = (1L << 11),
|
||||||
CWDontPropagate = (1L<<12),
|
CWDontPropagate = (1L << 12),
|
||||||
CWColormap = (1L<<13),
|
CWColormap = (1L << 13),
|
||||||
CWCursor = (1L<<14),
|
CWCursor = (1L << 14),
|
||||||
CWBorderPixmap = (1L<<2),
|
CWBorderPixmap = (1L << 2),
|
||||||
CWBorderPixel = (1L<<3),
|
CWBorderPixel = (1L << 3),
|
||||||
CWBitGravity = (1L<<4),
|
CWBitGravity = (1L << 4),
|
||||||
CWWinGravity = (1L<<5),
|
CWWinGravity = (1L << 5),
|
||||||
CWBackingStore = (1L<<6),
|
CWBackingStore = (1L << 6),
|
||||||
CWBackingPlanes = (1L<<7),
|
CWBackingPlanes = (1L << 7),
|
||||||
CWBackingPixel = (1L<<8),
|
CWBackingPixel = (1L << 8),
|
||||||
CWOverrideRedirect = (1L<<9),
|
CWOverrideRedirect = (1L << 9),
|
||||||
|
|
||||||
//CWY = (1<<1),
|
//CWY = (1 << 1),
|
||||||
//CWWidth = (1<<2),
|
//CWWidth = (1 << 2),
|
||||||
//CWHeight = (1<<3),
|
//CWHeight = (1 << 3),
|
||||||
//CWBorderWidth = (1<<4),
|
//CWBorderWidth = (1 << 4),
|
||||||
//CWSibling = (1<<5),
|
//CWSibling = (1 << 5),
|
||||||
//CWStackMode = (1<<6),
|
//CWStackMode = (1 << 6),
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1197,7 +1197,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
XF86AudioPrev = 0x1008ff16,
|
XF86AudioPrev = 0x1008ff16,
|
||||||
XF86AudioNext = 0x1008ff17,
|
XF86AudioNext = 0x1008ff17,
|
||||||
XF86AudioRecord = 0x1008ff1c,
|
XF86AudioRecord = 0x1008ff1c,
|
||||||
XF86AudioPause =0x1008ff31,
|
XF86AudioPause = 0x1008ff31,
|
||||||
XF86AudioRewind = 0x1008ff3e,
|
XF86AudioRewind = 0x1008ff3e,
|
||||||
XF86AudioForward = 0x1008ff97,
|
XF86AudioForward = 0x1008ff97,
|
||||||
XF86Phone = 0x1008ff6e,
|
XF86Phone = 0x1008ff6e,
|
||||||
|
|
|
@ -553,7 +553,7 @@ namespace OpenTK.Platform.X11
|
||||||
public byte A, R, G, B;
|
public byte A, R, G, B;
|
||||||
public Pixel(byte a, byte r, byte g, byte b)
|
public Pixel(byte a, byte r, byte g, byte b)
|
||||||
{
|
{
|
||||||
A= a;
|
A = a;
|
||||||
R = r;
|
R = r;
|
||||||
G = g;
|
G = g;
|
||||||
B = b;
|
B = b;
|
||||||
|
@ -602,7 +602,7 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
for (int x = 0; x < width; ++x)
|
for (int x = 0; x < width; ++x)
|
||||||
{
|
{
|
||||||
byte bit = (byte) (1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
|
byte bit = (byte)(1 << (msbfirst ? (7 - (x & 7)) : (x & 7)));
|
||||||
int offset = y * stride + (x >> 3);
|
int offset = y * stride + (x >> 3);
|
||||||
|
|
||||||
if (image.GetPixel(x, y).A >= 128)
|
if (image.GetPixel(x, y).A >= 128)
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||||
// permit persons to whom the Software is furnished to do so, subject to
|
// permit persons to whom the Software is furnished to do so, subject to
|
||||||
// the following conditions:
|
// the following conditions:
|
||||||
//
|
//
|
||||||
// The above copyright notice and this permission notice shall be
|
// The above copyright notice and this permission notice shall be
|
||||||
// included in all copies or substantial portions of the Software.
|
// included in all copies or substantial portions of the Software.
|
||||||
//
|
//
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||||
|
@ -1050,21 +1050,21 @@ namespace OpenTK.Platform.X11
|
||||||
Sibling = 1 << 5,
|
Sibling = 1 << 5,
|
||||||
StackMode = 1 << 6,
|
StackMode = 1 << 6,
|
||||||
|
|
||||||
//BackPixmap (1L<<0)
|
//BackPixmap (1L << 0)
|
||||||
//BackPixel (1L<<1)
|
//BackPixel (1L << 1)
|
||||||
//SaveUnder (1L<<10)
|
//SaveUnder (1L << 10)
|
||||||
//EventMask (1L<<11)
|
//EventMask (1L << 11)
|
||||||
//DontPropagate (1L<<12)
|
//DontPropagate (1L << 12)
|
||||||
//Colormap (1L<<13)
|
//Colormap (1L << 13)
|
||||||
//Cursor (1L<<14)
|
//Cursor (1L << 14)
|
||||||
//BorderPixmap (1L<<2)
|
//BorderPixmap (1L << 2)
|
||||||
//BorderPixel (1L<<3)
|
//BorderPixel (1L << 3)
|
||||||
//BitGravity (1L<<4)
|
//BitGravity (1L << 4)
|
||||||
//WinGravity (1L<<5)
|
//WinGravity (1L << 5)
|
||||||
//BackingStore (1L<<6)
|
//BackingStore (1L << 6)
|
||||||
//BackingPlanes (1L<<7)
|
//BackingPlanes (1L << 7)
|
||||||
//BackingPixel (1L<<8)
|
//BackingPixel (1L << 8)
|
||||||
OverrideRedirect = 1<<9,
|
OverrideRedirect = 1 << 9,
|
||||||
}
|
}
|
||||||
|
|
||||||
internal enum StackMode
|
internal enum StackMode
|
||||||
|
@ -1816,7 +1816,7 @@ namespace OpenTK.Platform.X11
|
||||||
mask = (byte*)Marshal.AllocHGlobal(mask_len);
|
mask = (byte*)Marshal.AllocHGlobal(mask_len);
|
||||||
for (int i = 0; i < mask_len; i++)
|
for (int i = 0; i < mask_len; i++)
|
||||||
{
|
{
|
||||||
mask[i] = (byte)((uint)m >> i*8);
|
mask[i] = (byte)((uint)m >> i * 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,7 +149,7 @@ namespace OpenTK.Platform.X11
|
||||||
deviceToScreen.Add(dev, 0 /*screen.ScreenNumber*/);
|
deviceToScreen.Add(dev, 0 /*screen.ScreenNumber*/);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (devices.Count>0);
|
return (devices.Count > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool QueryXRandR(List<DisplayDevice> devices)
|
private bool QueryXRandR(List<DisplayDevice> devices)
|
||||||
|
@ -356,7 +356,7 @@ namespace OpenTK.Platform.X11
|
||||||
screen, current_resolution_index, new_resolution_index);
|
screen, current_resolution_index, new_resolution_index);
|
||||||
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
short refresh_rate =(short)(resolution != null ? resolution.RefreshRate : 0);
|
short refresh_rate = (short)(resolution != null ? resolution.RefreshRate : 0);
|
||||||
if (refresh_rate > 0)
|
if (refresh_rate > 0)
|
||||||
{
|
{
|
||||||
ret = Functions.XRRSetScreenConfigAndRate(API.DefaultDisplay,
|
ret = Functions.XRRSetScreenConfigAndRate(API.DefaultDisplay,
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly -->
|
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly -->
|
||||||
<Rule Id="SA1001" Action="Error" /> <!-- Commas must be spaced correctly -->
|
<Rule Id="SA1001" Action="Error" /> <!-- Commas must be spaced correctly -->
|
||||||
<Rule Id="SA1002" Action="Error" /> <!-- Semicolons must be spaced correctly -->
|
<Rule Id="SA1002" Action="Error" /> <!-- Semicolons must be spaced correctly -->
|
||||||
<Rule Id="SA1003" Action="None" /> <!-- Symbols must be spaced correctly -->
|
<Rule Id="SA1003" Action="Error" /> <!-- Symbols must be spaced correctly -->
|
||||||
<Rule Id="SA1004" Action="None" /> <!-- Documentation lines must begin with single space -->
|
<Rule Id="SA1004" Action="None" /> <!-- Documentation lines must begin with single space -->
|
||||||
<Rule Id="SA1005" Action="None" /> <!-- Single line comments must begin with single space -->
|
<Rule Id="SA1005" Action="None" /> <!-- Single line comments must begin with single space -->
|
||||||
<Rule Id="SA1006" Action="Error" /> <!-- Preprocessor keywords must not be preceded by space -->
|
<Rule Id="SA1006" Action="Error" /> <!-- Preprocessor keywords must not be preceded by space -->
|
||||||
|
|
Loading…
Reference in a new issue