本文整理汇总了C#中IWindowInfo类的典型用法代码示例。如果您正苦于以下问题:C# IWindowInfo类的具体用法?C# IWindowInfo怎么用?C# IWindowInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IWindowInfo类属于命名空间,在下文中一共展示了IWindowInfo类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: NewTabEventArgs
bool ILifeSpanHandler.OnBeforePopup(IWebBrowser browserControl, IBrowser browser, IFrame frame, string targetUrl, string targetFrameName, WindowOpenDisposition targetDisposition, bool userGesture, IPopupFeatures popupFeatures, IWindowInfo windowInfo, IBrowserSettings browserSettings, ref bool noJavascriptAccess, out IWebBrowser newBrowser)
{
newBrowser = null;
//browserControl.Load(targetUrl);
OpenInNewTab?.Invoke(this, new NewTabEventArgs(targetUrl)); //this breaks when there are multiple window.open calls from JS.
return true;
}
开发者ID:joe-williams-cccu,项目名称:OSIRTv2,代码行数:7,代码来源:LifespanHandler.cs
示例2: SampleBrowser
public SampleBrowser(Context context, IGraphicsContext graphicsContext, IWindowInfo windowInfo)
{
// TODO: Complete member initialization
this.androidContext = context;
this.GLGraphicsContext = graphicsContext;
this.GlWindowInfo = windowInfo;
}
开发者ID:ryan-bunker,项目名称:axiom3d,代码行数:7,代码来源:SampleBrowser.Droid.cs
示例3: iPhoneOSGraphicsContext
internal iPhoneOSGraphicsContext(ContextHandle handle, IWindowInfo window, IGraphicsContext sharedContext, int major, int minor, GraphicsContextFlags flags)
{
// ignore mode, window
iPhoneOSGraphicsContext shared = sharedContext as iPhoneOSGraphicsContext;
EAGLRenderingAPI version = 0;
if (major == 1 && minor == 1)
version = EAGLRenderingAPI.OpenGLES1;
else if (major == 2 && minor == 0)
version = EAGLRenderingAPI.OpenGLES2;
else if (major == 3 && minor == 0)
version = EAGLRenderingAPI.OpenGLES3;
else
throw new ArgumentException (string.Format("Unsupported GLES version {0}.{1}.", major, minor));
if (handle.Handle == IntPtr.Zero) {
EAGLContext = shared != null && shared.EAGLContext != null
? new EAGLContext(version, shared.EAGLContext.ShareGroup)
: new EAGLContext(version);
contextHandle = new ContextHandle(EAGLContext.Handle);
} else {
EAGLContext = (EAGLContext) Runtime.GetNSObject (handle.Handle);
contextHandle = handle;
}
}
开发者ID:renanyoy,项目名称:mono-opentk,代码行数:26,代码来源:iPhoneOSGraphicsContext.cs
示例4: AglContext
public AglContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext)
{
Debug.Print("Context Type: {0}", shareContext);
Debug.Print("Window info: {0}", window);
this.graphics_mode = mode;
this.carbonWindow = (CarbonWindowInfo)window;
if (shareContext is AglContext)
shareContextRef = ((AglContext)shareContext).Handle.Handle;
if (shareContext is GraphicsContext)
{
ContextHandle shareHandle = shareContext != null ?
(shareContext as IGraphicsContextInternal).Context : (ContextHandle)IntPtr.Zero;
shareContextRef = shareHandle.Handle;
}
if (shareContextRef == IntPtr.Zero)
{
Debug.Print("No context sharing will take place.");
}
CreateContext(mode, carbonWindow, shareContextRef, true);
}
开发者ID:dakahler,项目名称:alloclave,代码行数:25,代码来源:AglContext.cs
示例5: X11Input
public X11Input(IWindowInfo attach)
{
if (attach == null)
throw new ArgumentException("A valid parent window must be defined, in order to create an X11Input driver.");
X11WindowInfo x11WindowInfo = (X11WindowInfo) attach;
this.mouse.Description = "Default X11 mouse";
this.mouse.DeviceID = IntPtr.Zero;
this.mouse.NumberOfButtons = 5;
this.mouse.NumberOfWheels = 1;
this.dummy_mice_list.Add(this.mouse);
using (new XLock(x11WindowInfo.Display))
{
API.DisplayKeycodes(x11WindowInfo.Display, ref this.firstKeyCode, ref this.lastKeyCode);
IntPtr keyboardMapping = API.GetKeyboardMapping(x11WindowInfo.Display, (byte) this.firstKeyCode, this.lastKeyCode - this.firstKeyCode + 1, ref this.keysyms_per_keycode);
this.keysyms = new IntPtr[(this.lastKeyCode - this.firstKeyCode + 1) * this.keysyms_per_keycode];
Marshal.PtrToStructure(keyboardMapping, (object) this.keysyms);
API.Free(keyboardMapping);
KeyboardDevice keyboardDevice = new KeyboardDevice();
this.keyboard.Description = "Default X11 keyboard";
this.keyboard.NumberOfKeys = this.lastKeyCode - this.firstKeyCode + 1;
this.keyboard.DeviceID = IntPtr.Zero;
this.dummy_keyboard_list.Add(this.keyboard);
bool supported;
Functions.XkbSetDetectableAutoRepeat(x11WindowInfo.Display, true, out supported);
}
}
开发者ID:tanis2000,项目名称:FEZ,代码行数:26,代码来源:X11Input.cs
示例6: CreateGLContext
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
WinWindowInfo winWindowInfo = (WinWindowInfo) window;
IntPtr display = this.GetDisplay(winWindowInfo.DeviceContext);
EglWindowInfo window1 = new EglWindowInfo(winWindowInfo.WindowHandle, display);
return (IGraphicsContext) new EglContext(handle, window1, shareContext, major, minor, flags);
}
开发者ID:Zeludon,项目名称:FEZ,代码行数:7,代码来源:EglWinPlatformFactory.cs
示例7: CreateGLContext
public override OpenTK.Graphics.IGraphicsContext CreateGLContext(
GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext, bool directRendering,
int major, int minor, GraphicsContextFlags flags)
{
flags |= GraphicsContextFlags.Embedded;
return base.CreateGLContext(mode, window, shareContext, directRendering, major, minor, flags);
}
开发者ID:PieterMarius,项目名称:PhysicsEngine,代码行数:7,代码来源:EglSdl2PlatformFactory.cs
示例8: CreateGLContext
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
X11WindowInfo x11_win = (X11WindowInfo)window;
//EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(x11_win.WindowHandle, Egl.GetDisplay(x11_win.Display));
EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(x11_win.WindowHandle, Egl.GetDisplay(new IntPtr(0)));
return new EglContext(handle, egl_win, shareContext, major, minor, flags);
}
开发者ID:dellis1972,项目名称:opentk,代码行数:7,代码来源:EglX11PlatformFactory.cs
示例9: Draw
public override void Draw( IWindowInfo info, Bitmap framebuffer )
{
using( FastBitmap bmp = new FastBitmap( framebuffer, true ) ) {
IntPtr scan0 = bmp.Scan0;
int size = bmp.Width * bmp.Height * 4;
IntPtr colorSpace = OSX.API.CGColorSpaceCreateDeviceRGB();
IntPtr provider = OSX.API.CGDataProviderCreateWithData( IntPtr.Zero, scan0, size, IntPtr.Zero );
const uint flags = 4 | (2 << 12);
IntPtr image = OSX.API.CGImageCreate( bmp.Width, bmp.Height, 8, 8 * 4, bmp.Stride,
colorSpace, flags, provider, IntPtr.Zero, 0, 0 );
IntPtr context = IntPtr.Zero;
OSStatus err = OSX.API.QDBeginCGContext( windowPort, ref context );
OSX.API.CheckReturn( err );
OSX.HIRect rect = new OSX.HIRect();
rect.Origin.X = 0; rect.Origin.Y = 0;
rect.Size.X = bmp.Width; rect.Size.Y = bmp.Height;
OSX.API.CGContextDrawImage( context, rect, image );
OSX.API.CGContextSynchronize( context );
err = OSX.API.QDEndCGContext( windowPort, ref context );
OSX.API.CheckReturn( err );
OSX.API.CGImageRelease( image );
OSX.API.CGDataProviderRelease( provider );
OSX.API.CGColorSpaceRelease( colorSpace );
}
}
开发者ID:andrewphorn,项目名称:ClassicalSharp,代码行数:29,代码来源:PlatformDrawer.cs
示例10: CreateGLContext
public override IGraphicsContext CreateGLContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, bool directRendering, int major, int minor, GraphicsContextFlags flags)
{
WinWindowInfo win_win = (WinWindowInfo)window;
IntPtr egl_display = GetDisplay(win_win.DeviceContext);
EglWindowInfo egl_win = new OpenTK.Platform.Egl.EglWindowInfo(win_win.WindowHandle, egl_display);
return new EglContext(handle, egl_win, shareContext, major, minor, flags);
}
开发者ID:challal,项目名称:scallion,代码行数:7,代码来源:EglWinPlatformFactory.cs
示例11: AglContext
public AglContext(GraphicsMode mode, IWindowInfo window, IGraphicsContext shareContext,
GetInt xoffset, GetInt yoffset)
{
Debug.Print("Share context: {0}", shareContext);
Debug.Print("Window info: {0}", window);
IntPtr shareContextRef = IntPtr.Zero;
XOffset = xoffset;
YOffset = yoffset;
carbonWindow = window;
if (shareContext is AglContext)
{
shareContextRef = ((AglContext)shareContext).Handle.Handle;
}
else if (shareContext is GraphicsContext)
{
ContextHandle shareHandle = shareContext != null ? (shareContext as IGraphicsContextInternal).Context : (ContextHandle)IntPtr.Zero;
shareContextRef = shareHandle.Handle;
}
if (shareContextRef == IntPtr.Zero)
{
Debug.Print("No context sharing will take place.");
}
CreateContext(mode, carbonWindow, shareContextRef, true);
}
开发者ID:nagyist,项目名称:opentk,代码行数:29,代码来源:AglContext.cs
示例12: CreateGraphicsContext
public static IGraphicsContext CreateGraphicsContext(GraphicsMode mode, IWindowInfo window, int major, int minor, GraphicsContextFlags flags)
{
GraphicsContext graphicsContext = new GraphicsContext(mode, window, major, minor, flags);
graphicsContext.MakeCurrent(window);
graphicsContext.LoadAll();
return (IGraphicsContext) graphicsContext;
}
开发者ID:tanis2000,项目名称:FEZ,代码行数:7,代码来源:Utilities.cs
示例13: OnBeforePopup
public bool OnBeforePopup(IWebBrowser rpBrowserControl, IBlinkBrowser rpBrowser, IFrame rpFrame, string rpTargetUrl, string rpTargetFrameName, WindowOpenDisposition rpTargetDisposition, bool rpUserGesture, IPopupFeatures rpPopupFeatures, IWindowInfo rpWindowInfo, IBrowserSettings rpBrowserSettings, ref bool rrpNoJavascriptAccess, out IWebBrowser ropNewBrowser)
{
rpBrowserControl.Load(rpTargetUrl);
ropNewBrowser = rpBrowserControl;
return true;
}
开发者ID:amatukaze,项目名称:HeavenlyWind.Browser.Blink,代码行数:7,代码来源:BlinkLifeSpanHandler.cs
示例14: X11GLContext
public X11GLContext(GraphicsMode mode, IWindowInfo window)
{
if (mode == null)
throw new ArgumentNullException("mode");
if (window == null)
throw new ArgumentNullException("window");
Debug.Print( "Creating X11GLContext context: " );
currentWindow = (X11WindowInfo)window;
Display = API.DefaultDisplay;
XVisualInfo info = currentWindow.VisualInfo;
Mode = GetGraphicsMode( info );
// Cannot pass a Property by reference.
ContextHandle = Glx.glXCreateContext(Display, ref info, IntPtr.Zero, true);
if (ContextHandle == IntPtr.Zero) {
Debug.Print("failed. Trying indirect... ");
ContextHandle = Glx.glXCreateContext(Display, ref info, IntPtr.Zero, false);
}
if (ContextHandle != IntPtr.Zero)
Debug.Print("Context created (id: {0}).", ContextHandle);
else
throw new GraphicsContextException("Failed to create OpenGL context. Glx.CreateContext call returned 0.");
if (!Glx.glXIsDirect(Display, ContextHandle))
Debug.Print("Warning: Context is not direct.");
}
开发者ID:Chameleonherman,项目名称:ClassicalSharp,代码行数:28,代码来源:X11GLContext.cs
示例15: AndroidGraphicsContext
public AndroidGraphicsContext (GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext,
int major, int minor, GraphicsContextFlags flags)
{
if (major < 1 || major > 3)
throw new ArgumentException (string.Format("Unsupported GLES version {0}.{1}.", major, minor));
Init (mode, window, sharedContext, major, minor, flags);
}
开发者ID:renanyoy,项目名称:mono-opentk,代码行数:8,代码来源:AndroidGraphicsContext.cs
示例16: AcquireContext
public static IDisposable AcquireContext(IWindowInfo windowInfo = null)
{
Monitor.Enter(Lock);
if (1 == ++ContextReferenceCount.Value)
GLGraphicsContext.MakeCurrent(windowInfo ?? GLControl.WindowInfo);
return new DisposableAction(FreeContext, true);
}
开发者ID:kidaa,项目名称:Pulse,代码行数:8,代码来源:GLService.cs
示例17: AglContext
public AglContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext)
{
if (handle == ContextHandle.Zero)
throw new ArgumentException("handle");
if (window == null)
throw new ArgumentNullException("window");
this.Handle = handle;
this.carbonWindow = (CarbonWindowInfo) window;
}
开发者ID:tanis2000,项目名称:FEZ,代码行数:9,代码来源:AglContext.cs
示例18: AglContext
public AglContext(GraphicsMode mode, IWindowInfo window)
{
Debug.Print("Window info: {0}", window);
Mode = mode;
this.carbonWindow = (CarbonWindowInfo)window;
CreateContext(mode, carbonWindow, true);
}
开发者ID:Chameleonherman,项目名称:ClassicalSharp,代码行数:9,代码来源:AglContext.cs
示例19: SDL2GLContext
public SDL2GLContext(IntPtr ctxhandle, IWindowInfo windowInfo)
{
Console.WriteLine("WARNING! Creating context in a way we don't quite understand.");
SDL2WindowInfo currentWindow = (SDL2WindowInfo)windowInfo;
window = currentWindow.WindowHandle;
context = ctxhandle;
Handle = new ContextHandle(context);
MakeCurrent(windowInfo);
}
开发者ID:sulix,项目名称:opentk-sdl2,代码行数:9,代码来源:SDL2GLContext.cs
示例20: CocoaContext
public CocoaContext(ContextHandle handle, IWindowInfo window, IGraphicsContext shareContext, int majorVersion, int minorVersion)
{
if (handle == ContextHandle.Zero)
throw new ArgumentException("handle");
if (window == null)
throw new ArgumentNullException("window");
Handle = handle;
cocoaWindow = (CocoaWindowInfo)window;
}
开发者ID:chantsunman,项目名称:opentk,代码行数:10,代码来源:CocoaContext.cs
注:本文中的IWindowInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论