svn path=/trunk/tao/; revision=85014
This commit is contained in:
Родитель
77b33f99d3
Коммит
51ad3d7ee1
|
@ -40,7 +40,7 @@ SOFTWARE.
|
|||
//-----------------------------------------------------------------------------
|
||||
/* Ported from C to C# by Marek Wyborski for the Tao Framework.
|
||||
02/05/07
|
||||
*/
|
||||
*/
|
||||
//-----------------------------------------------------------------------------
|
||||
#endregion Porting Credits
|
||||
|
||||
|
@ -61,21 +61,22 @@ namespace CgExamples
|
|||
myCgFragmentProfile;
|
||||
static IntPtr myCgVertexProgram,
|
||||
myCgFragmentProgram,
|
||||
myCgLightVertexProgram,
|
||||
myCgLightFragmentProgram;
|
||||
static IntPtr myCgVertexParam_modelViewProj,
|
||||
myCgVertexParam_time,
|
||||
myCgVertexParam_frequency,
|
||||
myCgVertexParam_scaleFactor,
|
||||
myCgVertexParam_Kd,
|
||||
myCgVertexParam_shininess,
|
||||
myCgVertexParam_eyePosition,
|
||||
myCgVertexParam_lightPosition,
|
||||
myCgVertexParam_lightColor,
|
||||
myCgLightVertexParam_modelViewProj;
|
||||
myCgLightVertexProgram/*,
|
||||
myCgLightFragmentProgram*/
|
||||
;
|
||||
static IntPtr myCgVertexParam_modelViewProj = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_time = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_frequency = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_scaleFactor = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_Kd = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_shininess = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_eyePosition = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_lightPosition = IntPtr.Zero;
|
||||
static IntPtr myCgVertexParam_lightColor = IntPtr.Zero;
|
||||
static IntPtr myCgLightVertexParam_modelViewProj = IntPtr.Zero;
|
||||
|
||||
static string myProgramName = "14_bulge",
|
||||
// myVertexProgramFileName = "C6E1v_bulge.cg",
|
||||
// myVertexProgramFileName = "C6E1v_bulge.cg",
|
||||
/* Page 146 */ myVertexProgramName = "C6E1v_bulge";
|
||||
|
||||
static bool animating = false;
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
<File>../Tao.Platform.Windows/Tao.Platform.Windows.snk</File>
|
||||
<File>../Tao.Platform.Windows/Tao.Platform.Windows.dll.config</File>
|
||||
<File>../Tao.Platform.Windows/TaoButton.jpg</File>
|
||||
<File>../Tao.Platform.X11/Tao.Platform.X11.License.txt</File>
|
||||
<File>../Tao.Platform.X11/Tao.Platform.X11.Readme.txt</File>
|
||||
<File>../Tao.Platform.X11/Tao.Platform.X11.snk</File>
|
||||
<File>../Tao.Platform.X11/Tao.Platform.X11.dll.config</File>
|
||||
<File>../Tao.OpenAl/Tao.OpenAl.License.txt</File>
|
||||
<File>../Tao.OpenAl/Tao.OpenAl.Readme.txt</File>
|
||||
<File>../Tao.OpenAl/Tao.OpenAl.snk</File>
|
||||
|
@ -216,6 +220,38 @@
|
|||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="Tao.OpenGl" localCopy="true"/>
|
||||
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
</Project>
|
||||
<Project name="Tao.Platform.X11" path="../Tao.Platform.X11" language="C#" type="Library" designerFolder="Properties">
|
||||
<Configuration name="Debug">
|
||||
<Options>
|
||||
<CompilerDefines>DEBUG;TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>false</OptimizeCode>
|
||||
<OutputPath>bin/Debug</OutputPath>
|
||||
<XmlDocFile>Tao.Platform.X11.xml</XmlDocFile>
|
||||
<KeyFile>../Tao.Platform.X11/Tao.Platform.X11.snk</KeyFile>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
<DebugInformation>true</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Configuration name="Release">
|
||||
<Options>
|
||||
<CompilerDefines>TRACE;WIN32</CompilerDefines>
|
||||
<OptimizeCode>true</OptimizeCode>
|
||||
<OutputPath>bin/Release</OutputPath>
|
||||
<XmlDocFile>Tao.Platform.X11.xml</XmlDocFile>
|
||||
<KeyFile>../Tao.Platform.X11/Tao.Platform.X11.snk</KeyFile>
|
||||
<AllowUnsafe>true</AllowUnsafe>
|
||||
<DebugInformation>false</DebugInformation>
|
||||
</Options>
|
||||
</Configuration>
|
||||
<Reference name="System" />
|
||||
<Reference name="System.Drawing" />
|
||||
<Reference name="System.Windows.Forms" />
|
||||
<Reference name="Tao.OpenGl" localCopy="true"/>
|
||||
|
||||
<Files>
|
||||
<Match path="." pattern="*.cs" recurse="true"/>
|
||||
</Files>
|
||||
|
|
|
@ -198,6 +198,73 @@ namespace Tao.Platform.Windows {
|
|||
/// </summary>
|
||||
public const int ENUM_CURRENT_SETTINGS = -1;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[CLSCompliant(false)]
|
||||
public enum SHOWWINDOW : uint
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_HIDE = 0,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWNORMAL = 1,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_NORMAL = 1,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWMINIMIZED = 2,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWMAXIMIZED = 3,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_MAXIMIZE = 3,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWNOACTIVATE = 4,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOW = 5,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_MINIMIZE = 6,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWMINNOACTIVE = 7,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWNA = 8,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_RESTORE = 9,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_SHOWDEFAULT = 10,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_FORCEMINIMIZE = 11,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
SW_MAX = 11,
|
||||
}
|
||||
|
||||
#endregion Public Constants
|
||||
|
||||
|
@ -988,5 +1055,48 @@ namespace Tao.Platform.Windows {
|
|||
[DllImport(USER_NATIVE_LIBRARY, CallingConvention=CALLING_CONVENTION), SuppressUnmanagedCodeSecurity]
|
||||
public static extern bool ReleaseDC(IntPtr windowHandle, IntPtr deviceContext);
|
||||
#endregion bool ReleaseDC(IntPtr windowHandle, IntPtr deviceContext)
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hWndChild"></param>
|
||||
/// <param name="hWndNewParent"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport(USER_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION), SuppressUnmanagedCodeSecurity]
|
||||
public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="lpClassName"></param>
|
||||
/// <param name="lpWindowName"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport(USER_NATIVE_LIBRARY, CallingConvention=CALLING_CONVENTION, SetLastError = true)]
|
||||
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="nCmdShow"></param>
|
||||
/// <returns></returns>
|
||||
[DllImport(USER_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION)]
|
||||
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="hWnd"></param>
|
||||
/// <param name="hWndInsertAfter"></param>
|
||||
/// <param name="X"></param>
|
||||
/// <param name="Y"></param>
|
||||
/// <param name="cx"></param>
|
||||
/// <param name="cy"></param>
|
||||
/// <param name="uFlags"></param>
|
||||
/// <returns></returns>
|
||||
[CLSCompliant(false)]
|
||||
[DllImport(USER_NATIVE_LIBRARY, CallingConvention = CALLING_CONVENTION)]
|
||||
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1420,7 +1420,7 @@ namespace Tao.Platform.Windows {
|
|||
/// The <b>wglUseFontBitmaps</b> function defines <i>count</i> display lists in
|
||||
/// the current OpenGL rendering context. Each display list has an identifying
|
||||
/// number, starting at <i>listBase</i>. Each display list consists of a single
|
||||
/// call to <see cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, object)" />. The definition of bitmap
|
||||
/// call to <see cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, byte[])" />. The definition of bitmap
|
||||
/// <i>listBase + i</i> is taken from the glyph <i>first + i</i> of the font
|
||||
/// currently selected in the device context specified by <i>deviceContext</i>.
|
||||
/// If a glyph is not defined, then the function defines an empty display list
|
||||
|
@ -1440,7 +1440,7 @@ namespace Tao.Platform.Windows {
|
|||
/// </para>
|
||||
/// <para>
|
||||
/// The function determines the parameters of each call to
|
||||
/// <see cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, object)" /> as follows:
|
||||
/// <see cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, ref byte)" /> as follows:
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <list type="table">
|
||||
|
@ -1540,7 +1540,7 @@ namespace Tao.Platform.Windows {
|
|||
/// </para>
|
||||
/// </remarks>
|
||||
/// /* seealso cref="Gdi.GetGlyphOutline" />*/
|
||||
/// <seealso cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, object)" />
|
||||
/// <seealso cref="Tao.OpenGl.Gl.glBitmap(int, int, float, float, float, float, ref byte)" />
|
||||
/// <seealso cref="Tao.OpenGl.Gl.glCallLists(int, int, object)" />
|
||||
/// <seealso cref="Tao.OpenGl.Gl.glListBase" />
|
||||
/// /* seealso cref="Gdi.GLYPHMETRICS" />*/
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,344 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2006 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace Tao.Platform.X11
|
||||
{
|
||||
class Functions
|
||||
{
|
||||
[DllImport("libX11", EntryPoint = "XOpenDisplay")]
|
||||
internal extern static IntPtr XOpenDisplay(IntPtr display);
|
||||
[DllImport("libX11", EntryPoint = "XCloseDisplay")]
|
||||
internal extern static int XCloseDisplay(IntPtr display);
|
||||
[DllImport("libX11", EntryPoint = "XSynchronize")]
|
||||
internal extern static IntPtr XSynchronize(IntPtr display, bool onoff);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCreateWindow")]
|
||||
internal extern static IntPtr XCreateWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, int depth, int xclass, IntPtr visual, UIntPtr valuemask, ref XSetWindowAttributes attributes);
|
||||
[DllImport("libX11", EntryPoint = "XCreateSimpleWindow")]
|
||||
internal extern static IntPtr XCreateSimpleWindow(IntPtr display, IntPtr parent, int x, int y, int width, int height, int border_width, UIntPtr border, UIntPtr background);
|
||||
[DllImport("libX11", EntryPoint = "XMapWindow")]
|
||||
internal extern static int XMapWindow(IntPtr display, IntPtr window);
|
||||
[DllImport("libX11", EntryPoint = "XUnmapWindow")]
|
||||
internal extern static int XUnmapWindow(IntPtr display, IntPtr window);
|
||||
[DllImport("libX11", EntryPoint = "XMapSubwindows")]
|
||||
internal extern static int XMapSubindows(IntPtr display, IntPtr window);
|
||||
[DllImport("libX11", EntryPoint = "XUnmapSubwindows")]
|
||||
internal extern static int XUnmapSubwindows(IntPtr display, IntPtr window);
|
||||
[DllImport("libX11", EntryPoint = "XRootWindow")]
|
||||
internal extern static IntPtr XRootWindow(IntPtr display, int screen_number);
|
||||
[DllImport("libX11", EntryPoint = "XNextEvent")]
|
||||
internal extern static IntPtr XNextEvent(IntPtr display, ref XEvent xevent);
|
||||
[DllImport("libX11")]
|
||||
internal extern static int XConnectionNumber(IntPtr diplay);
|
||||
[DllImport("libX11")]
|
||||
internal extern static int XPending(IntPtr diplay);
|
||||
[DllImport("libX11", EntryPoint = "XSelectInput")]
|
||||
internal extern static IntPtr XSelectInput(IntPtr display, IntPtr window, IntPtr mask);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDestroyWindow")]
|
||||
internal extern static int XDestroyWindow(IntPtr display, IntPtr window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XReparentWindow")]
|
||||
internal extern static int XReparentWindow(IntPtr display, IntPtr window, IntPtr parent, int x, int y);
|
||||
[DllImport("libX11", EntryPoint = "XMoveResizeWindow")]
|
||||
internal extern static int XMoveResizeWindow(IntPtr display, IntPtr window, int x, int y, int width, int height);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XResizeWindow")]
|
||||
internal extern static int XResizeWindow(IntPtr display, IntPtr window, int width, int height);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetWindowAttributes")]
|
||||
internal extern static int XGetWindowAttributes(IntPtr display, IntPtr window, ref XWindowAttributes attributes);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFlush")]
|
||||
internal extern static int XFlush(IntPtr display);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetWMName")]
|
||||
internal extern static int XSetWMName(IntPtr display, IntPtr window, ref XTextProperty text_prop);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XStoreName")]
|
||||
internal extern static int XStoreName(IntPtr display, IntPtr window, string window_name);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFetchName")]
|
||||
internal extern static int XFetchName(IntPtr display, IntPtr window, ref IntPtr window_name);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSendEvent")]
|
||||
internal extern static int XSendEvent(IntPtr display, IntPtr window, bool propagate, IntPtr event_mask, ref XEvent send_event);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XQueryTree")]
|
||||
internal extern static int XQueryTree(IntPtr display, IntPtr window, out IntPtr root_return, out IntPtr parent_return, out IntPtr children_return, out int nchildren_return);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFree")]
|
||||
internal extern static int XFree(IntPtr data);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XRaiseWindow")]
|
||||
internal extern static int XRaiseWindow(IntPtr display, IntPtr window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XLowerWindow")]
|
||||
internal extern static uint XLowerWindow(IntPtr display, IntPtr window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XConfigureWindow")]
|
||||
internal extern static uint XConfigureWindow(IntPtr display, IntPtr window, ChangeWindowFlags value_mask, ref XWindowChanges values);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XInternAtom")]
|
||||
internal extern static IntPtr XInternAtom(IntPtr display, string atom_name, bool only_if_exists);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XInternAtoms")]
|
||||
internal extern static int XInternAtoms(IntPtr display, string[] atom_names, int atom_count, bool only_if_exists, IntPtr[] atoms);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetWMProtocols")]
|
||||
internal extern static int XSetWMProtocols(IntPtr display, IntPtr window, IntPtr[] protocols, int count);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGrabPointer")]
|
||||
internal extern static int XGrabPointer(IntPtr display, IntPtr window, bool owner_events, EventMask event_mask, GrabMode pointer_mode, GrabMode keyboard_mode, IntPtr confine_to, IntPtr cursor, IntPtr timestamp);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XUngrabPointer")]
|
||||
internal extern static int XUngrabPointer(IntPtr display, IntPtr timestamp);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XQueryPointer")]
|
||||
internal extern static bool XQueryPointer(IntPtr display, IntPtr window, out IntPtr root, out IntPtr child, out int root_x, out int root_y, out int win_x, out int win_y, out int keys_buttons);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XTranslateCoordinates")]
|
||||
internal extern static bool XTranslateCoordinates(IntPtr display, IntPtr src_w, IntPtr dest_w, int src_x, int src_y, out int intdest_x_return, out int dest_y_return, out IntPtr child_return);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetGeometry")]
|
||||
internal extern static bool XGetGeometry(IntPtr display, IntPtr window, out IntPtr root, out int x, out int y, out int width, out int height, out int border_width, out int depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetGeometry")]
|
||||
internal extern static bool XGetGeometry(IntPtr display, IntPtr window, IntPtr root, out int x, out int y, out int width, out int height, IntPtr border_width, IntPtr depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetGeometry")]
|
||||
internal extern static bool XGetGeometry(IntPtr display, IntPtr window, IntPtr root, out int x, out int y, IntPtr width, IntPtr height, IntPtr border_width, IntPtr depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetGeometry")]
|
||||
internal extern static bool XGetGeometry(IntPtr display, IntPtr window, IntPtr root, IntPtr x, IntPtr y, out int width, out int height, IntPtr border_width, IntPtr depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XWarpPointer")]
|
||||
internal extern static uint XWarpPointer(IntPtr display, IntPtr src_w, IntPtr dest_w, int src_x, int src_y, uint src_width, uint src_height, int dest_x, int dest_y);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XClearWindow")]
|
||||
internal extern static int XClearWindow(IntPtr display, IntPtr window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XClearArea")]
|
||||
internal extern static int XClearArea(IntPtr display, IntPtr window, int x, int y, int width, int height, bool exposures);
|
||||
|
||||
// Colormaps
|
||||
[DllImport("libX11", EntryPoint = "XDefaultScreenOfDisplay")]
|
||||
internal extern static IntPtr XDefaultScreenOfDisplay(IntPtr display);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XScreenNumberOfScreen")]
|
||||
internal extern static int XScreenNumberOfScreen(IntPtr display, IntPtr Screen);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDefaultVisual")]
|
||||
internal extern static IntPtr XDefaultVisual(IntPtr display, int screen_number);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDefaultDepth")]
|
||||
internal extern static uint XDefaultDepth(IntPtr display, int screen_number);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDefaultScreen")]
|
||||
internal extern static int XDefaultScreen(IntPtr display);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDefaultColormap")]
|
||||
internal extern static IntPtr XDefaultColormap(IntPtr display, int screen_number);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XLookupColor")]
|
||||
internal extern static int XLookupColor(IntPtr display, IntPtr Colormap, string Coloranem, ref XColor exact_def_color, ref XColor screen_def_color);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XAllocColor")]
|
||||
internal extern static int XAllocColor(IntPtr display, IntPtr Colormap, ref XColor colorcell_def);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetTransientForHint")]
|
||||
internal extern static int XSetTransientForHint(IntPtr display, IntPtr window, IntPtr prop_window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref MotifWmHints data, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref uint value, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, ref IntPtr value, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, uint[] data, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, int[] data, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, IntPtr[] data, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty")]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, IntPtr atoms, int nelements);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeProperty", CharSet = CharSet.Ansi)]
|
||||
internal extern static int XChangeProperty(IntPtr display, IntPtr window, IntPtr property, IntPtr type, int format, PropertyMode mode, string text, int text_length);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDeleteProperty")]
|
||||
internal extern static int XDeleteProperty(IntPtr display, IntPtr window, IntPtr property);
|
||||
|
||||
// Drawing
|
||||
[DllImport("libX11", EntryPoint = "XCreateGC")]
|
||||
internal extern static IntPtr XCreateGC(IntPtr display, IntPtr window, IntPtr valuemask, ref XGCValues values);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFreeGC")]
|
||||
internal extern static int XFreeGC(IntPtr display, IntPtr gc);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetFunction")]
|
||||
internal extern static int XSetFunction(IntPtr display, IntPtr gc, GXFunction function);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetLineAttributes")]
|
||||
internal extern static int XSetLineAttributes(IntPtr display, IntPtr gc, int line_width, GCLineStyle line_style, GCCapStyle cap_style, GCJoinStyle join_style);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDrawLine")]
|
||||
internal extern static int XDrawLine(IntPtr display, IntPtr drawable, IntPtr gc, int x1, int y1, int x2, int y2);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDrawRectangle")]
|
||||
internal extern static int XDrawRectangle(IntPtr display, IntPtr drawable, IntPtr gc, int x1, int y1, int width, int height);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFillRectangle")]
|
||||
internal extern static int XFillRectangle(IntPtr display, IntPtr drawable, IntPtr gc, int x1, int y1, int width, int height);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetWindowBackground")]
|
||||
internal extern static int XSetWindowBackground(IntPtr display, IntPtr window, IntPtr background);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCopyArea")]
|
||||
internal extern static int XCopyArea(IntPtr display, IntPtr src, IntPtr dest, IntPtr gc, int src_x, int src_y, int width, int height, int dest_x, int dest_y);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetWindowProperty")]
|
||||
internal extern static int XGetWindowProperty(IntPtr display, IntPtr window, IntPtr atom, IntPtr long_offset, IntPtr long_length, bool delete, IntPtr req_type, out IntPtr actual_type, out int actual_format, out IntPtr nitems, out IntPtr bytes_after, ref IntPtr prop);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetInputFocus")]
|
||||
internal extern static int XSetInputFocus(IntPtr display, IntPtr window, RevertTo revert_to, IntPtr time);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XIconifyWindow")]
|
||||
internal extern static int XIconifyWindow(IntPtr display, IntPtr window, int screen_number);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XDefineCursor")]
|
||||
internal extern static int XDefineCursor(IntPtr display, IntPtr window, IntPtr cursor);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XUndefineCursor")]
|
||||
internal extern static int XUndefineCursor(IntPtr display, IntPtr window);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFreeCursor")]
|
||||
internal extern static int XFreeCursor(IntPtr display, IntPtr cursor);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCreateFontCursor")]
|
||||
internal extern static IntPtr XCreateFontCursor(IntPtr display, CursorFontShape shape);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCreatePixmapCursor")]
|
||||
internal extern static IntPtr XCreatePixmapCursor(IntPtr display, IntPtr source, IntPtr mask, ref XColor foreground_color, ref XColor background_color, int x_hot, int y_hot);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCreatePixmapFromBitmapData")]
|
||||
internal extern static IntPtr XCreatePixmapFromBitmapData(IntPtr display, IntPtr drawable, byte[] data, int width, int height, IntPtr fg, IntPtr bg, int depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XCreatePixmap")]
|
||||
internal extern static IntPtr XCreatePixmap(IntPtr display, IntPtr d, int width, int height, int depth);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFreePixmap")]
|
||||
internal extern static IntPtr XFreePixmap(IntPtr display, IntPtr pixmap);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XQueryBestCursor")]
|
||||
internal extern static int XQueryBestCursor(IntPtr display, IntPtr drawable, int width, int height, out int best_width, out int best_height);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XQueryExtension")]
|
||||
internal extern static int XQueryExtension(IntPtr display, string extension_name, ref int major, ref int first_event, ref int first_error);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XWhitePixel")]
|
||||
internal extern static IntPtr XWhitePixel(IntPtr display, int screen_no);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XBlackPixel")]
|
||||
internal extern static IntPtr XBlackPixel(IntPtr display, int screen_no);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGrabServer")]
|
||||
internal extern static void XGrabServer(IntPtr display);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XUngrabServer")]
|
||||
internal extern static void XUngrabServer(IntPtr display);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetWMNormalHints")]
|
||||
internal extern static void XGetWMNormalHints(IntPtr display, IntPtr window, ref XSizeHints hints, out IntPtr supplied_return);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetWMNormalHints")]
|
||||
internal extern static void XSetWMNormalHints(IntPtr display, IntPtr window, ref XSizeHints hints);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetZoomHints")]
|
||||
internal extern static void XSetZoomHints(IntPtr display, IntPtr window, ref XSizeHints hints);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetWMHints")]
|
||||
internal extern static void XSetWMHints(IntPtr display, IntPtr window, ref XWMHints wmhints);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetIconSizes")]
|
||||
internal extern static int XGetIconSizes(IntPtr display, IntPtr window, out IntPtr size_list, out int count);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetErrorHandler")]
|
||||
internal extern static IntPtr XSetErrorHandler(XErrorHandler error_handler);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetErrorText")]
|
||||
internal extern static IntPtr XGetErrorText(IntPtr display, byte code, StringBuilder buffer, int length);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XInitThreads")]
|
||||
internal extern static int XInitThreads();
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XConvertSelection")]
|
||||
internal extern static int XConvertSelection(IntPtr display, IntPtr selection, IntPtr target, IntPtr property, IntPtr requestor, IntPtr time);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XGetSelectionOwner")]
|
||||
internal extern static IntPtr XGetSelectionOwner(IntPtr display, IntPtr selection);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetSelectionOwner")]
|
||||
internal extern static int XSetSelectionOwner(IntPtr display, IntPtr selection, IntPtr owner, IntPtr time);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetPlaneMask")]
|
||||
internal extern static int XSetPlaneMask(IntPtr display, IntPtr gc, IntPtr mask);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetForeground")]
|
||||
internal extern static int XSetForeground(IntPtr display, IntPtr gc, UIntPtr foreground);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XSetBackground")]
|
||||
internal extern static int XSetBackground(IntPtr display, IntPtr gc, UIntPtr background);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XBell")]
|
||||
internal extern static int XBell(IntPtr display, int percent);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XChangeActivePointerGrab")]
|
||||
internal extern static int XChangeActivePointerGrab(IntPtr display, EventMask event_mask, IntPtr cursor, IntPtr time);
|
||||
|
||||
[DllImport("libX11", EntryPoint = "XFilterEvent")]
|
||||
internal extern static bool XFilterEvent(ref XEvent xevent, IntPtr window);
|
||||
|
||||
[DllImport("libX11")]
|
||||
internal extern static void XkbSetDetectableAutoRepeat(IntPtr display, bool detectable, IntPtr supported);
|
||||
|
||||
[DllImport("libX11")]
|
||||
internal extern static void XPeekEvent(IntPtr display, ref XEvent xevent);
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,53 @@
|
|||
#region License
|
||||
/*
|
||||
MIT License
|
||||
Copyright ©2003-2006 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
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.
|
||||
*/
|
||||
#endregion License
|
||||
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Security.Permissions;
|
||||
|
||||
[assembly: AllowPartiallyTrustedCallers]
|
||||
[assembly: AssemblyCompany("Tao Framework -- http://www.taoframework.com")]
|
||||
[assembly: AssemblyConfiguration("Retail")]
|
||||
[assembly: AssemblyCopyright("Copyright ©2003-2006 Tao Framework Team. All rights reserved.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: AssemblyDefaultAlias("Tao.Platform.X11")]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyDescription("Tao Framework X11 Platform API Binding For .NET")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyInformationalVersion("1.0.0.0")]
|
||||
[assembly: AssemblyKeyName("")]
|
||||
[assembly: AssemblyProduct("Tao.Platform.X11.dll")]
|
||||
[assembly: AssemblyTitle("Tao Framework X11 Platform API Binding For .NET")]
|
||||
[assembly: AssemblyTrademark("Tao Framework -- http://www.taoframework.com")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: CLSCompliant(true)]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.Execution)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.SkipVerification)]
|
||||
[assembly: SecurityPermission(SecurityAction.RequestMinimum, Flags = SecurityPermissionFlag.UnmanagedCode)]
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,22 @@
|
|||
MIT License
|
||||
Copyright ©2003-2006 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
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.
|
|
@ -0,0 +1,10 @@
|
|||
Tao.X11.Windows 1.0.0.0
|
||||
Copyright ©2003-2006 Tao Framework Team
|
||||
http://www.taoframework.com
|
||||
All rights reserved.
|
||||
|
||||
Tao.Platform.X11 is a X11 API binding for .NET.
|
||||
|
||||
|
||||
Change Log:
|
||||
|
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче