mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 11:35:39 +00:00
Set XVisualInfo to public.
This commit is contained in:
parent
5dce9161bd
commit
f5acd206d7
|
@ -1,39 +0,0 @@
|
||||||
//
|
|
||||||
// XVisualClass.cs
|
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
|
||||||
//
|
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
// the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
//
|
|
||||||
|
|
||||||
namespace OpenTK.X11
|
|
||||||
{
|
|
||||||
public enum XVisualClass
|
|
||||||
{
|
|
||||||
StaticGray = 0,
|
|
||||||
GrayScale = 1,
|
|
||||||
StaticColor = 2,
|
|
||||||
PseudoColor = 3,
|
|
||||||
TrueColor = 4,
|
|
||||||
DirectColor = 5
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,52 +0,0 @@
|
||||||
//
|
|
||||||
// XVisualInfo.cs
|
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
|
||||||
//
|
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
// the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Runtime.InteropServices;
|
|
||||||
|
|
||||||
namespace OpenTK.X11
|
|
||||||
{
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
|
||||||
public struct XVisualInfo
|
|
||||||
{
|
|
||||||
public IntPtr Visual;
|
|
||||||
public IntPtr VisualID;
|
|
||||||
public int Screen;
|
|
||||||
public int Depth;
|
|
||||||
public XVisualClass Class;
|
|
||||||
public long RedMask;
|
|
||||||
public long GreenMask;
|
|
||||||
public long blueMask;
|
|
||||||
public int ColormapSize;
|
|
||||||
public int BitsPerRgb;
|
|
||||||
|
|
||||||
public override string ToString()
|
|
||||||
{
|
|
||||||
return $"id ({this.VisualID}), screen ({this.Screen}), depth ({this.Depth}), class ({this.Class})";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,47 +0,0 @@
|
||||||
//
|
|
||||||
// XVisualInfoMask.cs
|
|
||||||
//
|
|
||||||
// The Open Toolkit Library License
|
|
||||||
//
|
|
||||||
// Copyright (c) 2006 - 2009 the Open Toolkit library, except where noted.
|
|
||||||
//
|
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
// of this software and associated documentation files (the "Software"), to deal
|
|
||||||
// in the Software without restriction, including without limitation the rights to
|
|
||||||
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
||||||
// the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
// so, subject to the following conditions:
|
|
||||||
//
|
|
||||||
// The above copyright notice and this permission notice shall be included in all
|
|
||||||
// copies or substantial portions of the Software.
|
|
||||||
//
|
|
||||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
||||||
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
||||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
||||||
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
||||||
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
||||||
// OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
//
|
|
||||||
|
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace OpenTK.X11
|
|
||||||
{
|
|
||||||
[Flags]
|
|
||||||
public enum XVisualInfoMask
|
|
||||||
{
|
|
||||||
No = 0x0,
|
|
||||||
ID = 0x1,
|
|
||||||
Screen = 0x2,
|
|
||||||
Depth = 0x4,
|
|
||||||
Class = 0x8,
|
|
||||||
Red = 0x10,
|
|
||||||
Green = 0x20,
|
|
||||||
Blue = 0x40,
|
|
||||||
ColormapSize = 0x80,
|
|
||||||
BitsPerRGB = 0x100,
|
|
||||||
All = 0x1FF
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -70,7 +70,7 @@ namespace OpenTK.Platform.X11
|
||||||
static int DefaultScreen { get { return defaultScreen; } }
|
static int DefaultScreen { get { return defaultScreen; } }
|
||||||
//internal static Window RootWindow { get { return rootWindow; } }
|
//internal static Window RootWindow { get { return rootWindow; } }
|
||||||
internal static int ScreenCount { get { return screenCount; } }
|
internal static int ScreenCount { get { return screenCount; } }
|
||||||
|
|
||||||
internal static object Lock = new object();
|
internal static object Lock = new object();
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -79,9 +79,9 @@ namespace OpenTK.Platform.X11
|
||||||
{
|
{
|
||||||
int has_threaded_x = Functions.XInitThreads();
|
int has_threaded_x = Functions.XInitThreads();
|
||||||
Debug.Print("Initializing threaded X11: {0}.", has_threaded_x.ToString());
|
Debug.Print("Initializing threaded X11: {0}.", has_threaded_x.ToString());
|
||||||
|
|
||||||
defaultDisplay = Functions.XOpenDisplay(IntPtr.Zero);
|
defaultDisplay = Functions.XOpenDisplay(IntPtr.Zero);
|
||||||
|
|
||||||
if (defaultDisplay == IntPtr.Zero)
|
if (defaultDisplay == IntPtr.Zero)
|
||||||
throw new PlatformException("Could not establish connection to the X-Server.");
|
throw new PlatformException("Could not establish connection to the X-Server.");
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ namespace OpenTK.Platform.X11
|
||||||
/// If a window is not interested in a device event,
|
/// If a window is not interested in a device event,
|
||||||
/// it usually propagates to the closest ancestor that is interested,
|
/// it usually propagates to the closest ancestor that is interested,
|
||||||
/// unless the do_not_propagate mask prohibits it.
|
/// unless the do_not_propagate mask prohibits it.
|
||||||
/// Setting the event-mask attribute of a window overrides any previous call for the same window but not for other clients. Multiple clients can select for the same events on the same window with the following restrictions:
|
/// Setting the event-mask attribute of a window overrides any previous call for the same window but not for other clients. Multiple clients can select for the same events on the same window with the following restrictions:
|
||||||
/// <para>Multiple clients can select events on the same window because their event masks are disjoint. When the X server generates an event, it reports it to all interested clients. </para>
|
/// <para>Multiple clients can select events on the same window because their event masks are disjoint. When the X server generates an event, it reports it to all interested clients. </para>
|
||||||
/// <para>Only one client at a time can select CirculateRequest, ConfigureRequest, or MapRequest events, which are associated with the event mask SubstructureRedirectMask. </para>
|
/// <para>Only one client at a time can select CirculateRequest, ConfigureRequest, or MapRequest events, which are associated with the event mask SubstructureRedirectMask. </para>
|
||||||
/// <para>Only one client at a time can select a ResizeRequest event, which is associated with the event mask ResizeRedirectMask. </para>
|
/// <para>Only one client at a time can select a ResizeRequest event, which is associated with the event mask ResizeRedirectMask. </para>
|
||||||
|
@ -343,7 +343,7 @@ namespace OpenTK.Platform.X11
|
||||||
public short htotal;
|
public short htotal;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short hskew;
|
public short hskew;
|
||||||
|
|
||||||
|
@ -368,7 +368,7 @@ namespace OpenTK.Platform.X11
|
||||||
public short vtotal;
|
public short vtotal;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short vskew;
|
public short vskew;
|
||||||
|
|
||||||
|
@ -580,26 +580,26 @@ XF86VidModeGetGammaRampSize(
|
||||||
public XcursorUInt delay;
|
public XcursorUInt delay;
|
||||||
public XcursorPixel* pixels;
|
public XcursorPixel* pixels;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
unsafe struct XcursorImages
|
unsafe struct XcursorImages
|
||||||
{
|
{
|
||||||
public int nimage;
|
public int nimage;
|
||||||
public XcursorImage **images;
|
public XcursorImage **images;
|
||||||
public char *name;
|
public char *name;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
unsafe struct XcursorCursors
|
unsafe struct XcursorCursors
|
||||||
{
|
{
|
||||||
public Display dpy;
|
public Display dpy;
|
||||||
public int refcount;
|
public int refcount;
|
||||||
public int ncursor;
|
public int ncursor;
|
||||||
public Cursor *cursors;
|
public Cursor *cursors;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
unsafe struct XcursorAnimate
|
unsafe struct XcursorAnimate
|
||||||
{
|
{
|
||||||
public XcursorCursors *cursors;
|
public XcursorCursors *cursors;
|
||||||
public int sequence;
|
public int sequence;
|
||||||
|
@ -607,10 +607,10 @@ XF86VidModeGetGammaRampSize(
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region internal class XVisualInfo
|
#region public class XVisualInfo
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
struct XVisualInfo
|
public struct XVisualInfo
|
||||||
{
|
{
|
||||||
public IntPtr Visual;
|
public IntPtr Visual;
|
||||||
public VisualID VisualID;
|
public VisualID VisualID;
|
||||||
|
@ -755,7 +755,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
UIntPtr black_pixel; /* White and Black pixel values */ // unsigned long
|
UIntPtr black_pixel; /* White and Black pixel values */ // unsigned long
|
||||||
int max_maps, min_maps; /* max and min color maps */
|
int max_maps, min_maps; /* max and min color maps */
|
||||||
int backing_store; /* Never, WhenMapped, Always */
|
int backing_store; /* Never, WhenMapped, Always */
|
||||||
Bool save_unders;
|
Bool save_unders;
|
||||||
long root_input_mask; /* initial root input mask */
|
long root_input_mask; /* initial root input mask */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -773,9 +773,9 @@ XF86VidModeGetGammaRampSize(
|
||||||
};
|
};
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Motif
|
#region Motif
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[StructLayout(LayoutKind.Sequential)]
|
||||||
internal struct MotifWmHints
|
internal struct MotifWmHints
|
||||||
{
|
{
|
||||||
|
@ -790,7 +790,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
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 ());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
internal enum MotifFlags
|
internal enum MotifFlags
|
||||||
{
|
{
|
||||||
|
@ -821,7 +821,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
Menu = 0x10,
|
Menu = 0x10,
|
||||||
Minimize = 0x20,
|
Minimize = 0x20,
|
||||||
Maximize = 0x40,
|
Maximize = 0x40,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
|
@ -832,7 +832,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
SystemModal = 2,
|
SystemModal = 2,
|
||||||
FullApplicationModal = 3
|
FullApplicationModal = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -985,7 +985,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
SingleCandidate = 0xff3c,
|
SingleCandidate = 0xff3c,
|
||||||
MultipleCandidate = 0xff3d,
|
MultipleCandidate = 0xff3d,
|
||||||
PreviousCandidate = 0xff3e,
|
PreviousCandidate = 0xff3e,
|
||||||
|
|
||||||
/* Japanese keyboard support */
|
/* Japanese keyboard support */
|
||||||
|
|
||||||
Kanji = 0xff21, /* Kanji, Kanji convert */
|
Kanji = 0xff21, /* Kanji, Kanji convert */
|
||||||
|
@ -1367,7 +1367,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
#pragma warning restore 1591
|
#pragma warning restore 1591
|
||||||
|
|
||||||
[Flags]
|
[Flags]
|
||||||
internal enum XVisualInfoMask
|
public enum XVisualInfoMask
|
||||||
{
|
{
|
||||||
No = 0x0,
|
No = 0x0,
|
||||||
ID = 0x1,
|
ID = 0x1,
|
||||||
|
@ -1437,7 +1437,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
/// <param name="attributes">Specifies the structure from which the values (as specified by the value mask) are to be taken. The value mask should have the appropriate bits set to indicate which attributes have been set in the structure.</param>
|
/// <param name="attributes">Specifies the structure from which the values (as specified by the value mask) are to be taken. The value mask should have the appropriate bits set to indicate which attributes have been set in the structure.</param>
|
||||||
/// <returns>The window ID of the created window.</returns>
|
/// <returns>The window ID of the created window.</returns>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside, upper-left corner.
|
/// The coordinate system has the X axis horizontal and the Y axis vertical with the origin [0, 0] at the upper-left corner. Coordinates are integral, in terms of pixels, and coincide with pixel centers. Each window and pixmap has its own coordinate system. For a window, the origin is inside the border at the inside, upper-left corner.
|
||||||
/// <para>The border_width for an InputOnly window must be zero, or a BadMatch error results. For class InputOutput, the visual type and depth must be a combination supported for the screen, or a BadMatch error results. The depth need not be the same as the parent, but the parent must not be a window of class InputOnly, or a BadMatch error results. For an InputOnly window, the depth must be zero, and the visual must be one supported by the screen. If either condition is not met, a BadMatch error results. The parent window, however, may have any depth and class. If you specify any invalid window attribute for a window, a BadMatch error results. </para>
|
/// <para>The border_width for an InputOnly window must be zero, or a BadMatch error results. For class InputOutput, the visual type and depth must be a combination supported for the screen, or a BadMatch error results. The depth need not be the same as the parent, but the parent must not be a window of class InputOnly, or a BadMatch error results. For an InputOnly window, the depth must be zero, and the visual must be one supported by the screen. If either condition is not met, a BadMatch error results. The parent window, however, may have any depth and class. If you specify any invalid window attribute for a window, a BadMatch error results. </para>
|
||||||
/// <para>The created window is not yet displayed (mapped) on the user's display. To display the window, call XMapWindow(). The new window initially uses the same cursor as its parent. A new cursor can be defined for the new window by calling XDefineCursor(). The window will not be visible on the screen unless it and all of its ancestors are mapped and it is not obscured by any of its ancestors. </para>
|
/// <para>The created window is not yet displayed (mapped) on the user's display. To display the window, call XMapWindow(). The new window initially uses the same cursor as its parent. A new cursor can be defined for the new window by calling XDefineCursor(). The window will not be visible on the screen unless it and all of its ancestors are mapped and it is not obscured by any of its ancestors. </para>
|
||||||
/// <para>XCreateWindow can generate BadAlloc BadColor, BadCursor, BadMatch, BadPixmap, BadValue, and BadWindow errors. </para>
|
/// <para>XCreateWindow can generate BadAlloc BadColor, BadCursor, BadMatch, BadPixmap, BadValue, and BadWindow errors. </para>
|
||||||
|
@ -1488,7 +1488,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
internal static unsafe extern void XcursorImageDestroy(XcursorImage* image);
|
internal static unsafe extern void XcursorImageDestroy(XcursorImage* image);
|
||||||
|
|
||||||
[DllImport(XcursorLibrary)]
|
[DllImport(XcursorLibrary)]
|
||||||
internal static unsafe extern Cursor XcursorImageLoadCursor(Display dpy, XcursorImage* image);
|
internal static unsafe extern Cursor XcursorImageLoadCursor(Display dpy, XcursorImage* image);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -1538,7 +1538,7 @@ XF86VidModeGetGammaRampSize(
|
||||||
/// <param name="event">Specifies the event.</param>
|
/// <param name="event">Specifies the event.</param>
|
||||||
[DllImport(X11Library, EntryPoint = "XPutBackEvent")]
|
[DllImport(X11Library, EntryPoint = "XPutBackEvent")]
|
||||||
public static extern void XPutBackEvent(IntPtr display, ref XEvent @event);
|
public static extern void XPutBackEvent(IntPtr display, ref XEvent @event);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Xrandr
|
#region Xrandr
|
||||||
|
|
Loading…
Reference in a new issue