The Open Toolkit library  1.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
OpenTK.ContextHandle Struct Reference

Represents a handle to an OpenGL or OpenAL context. More...

Inherits IComparable< ContextHandle >, and IEquatable< ContextHandle >.

Public Member Functions

 ContextHandle (IntPtr h)
 Constructs a new instance with the specified handle. More...
 
override string ToString ()
 Converts this instance to its equivalent string representation. More...
 
override bool Equals (object obj)
 Compares this instance to the specified object. More...
 
override int GetHashCode ()
 Returns the hash code for this instance. More...
 
int CompareTo (ContextHandle other)
 Compares the numerical value of this instance to the specified ContextHandle and returns a value indicating their relative order. More...
 
bool Equals (ContextHandle other)
 Compares this instance to the specified ContextHandle for equality. More...
 

Static Public Member Functions

static operator IntPtr (ContextHandle c)
 Converts the specified ContextHandle to the equivalent IntPtr. More...
 
static operator ContextHandle (IntPtr p)
 Converts the specified IntPtr to the equivalent ContextHandle. More...
 
static bool operator== (ContextHandle left, ContextHandle right)
 Compares two ContextHandles for equality. More...
 
static bool operator!= (ContextHandle left, ContextHandle right)
 Compares two ContextHandles for inequality. More...
 

Public Attributes

IntPtr handle
 

Static Public Attributes

static readonly ContextHandle Zero = new ContextHandle(IntPtr.Zero)
 A read-only field that represents a handle that has been initialized to zero. More...
 

Properties

IntPtr Handle [get]
 Gets a System.IntPtr that represents the handle of this ContextHandle. More...
 

Detailed Description

Represents a handle to an OpenGL or OpenAL context.

Constructor & Destructor Documentation

OpenTK.ContextHandle.ContextHandle ( IntPtr  h)

Constructs a new instance with the specified handle.

Parameters
hA System.IntPtr containing the value for this instance.

Member Function Documentation

int OpenTK.ContextHandle.CompareTo ( ContextHandle  other)

Compares the numerical value of this instance to the specified ContextHandle and returns a value indicating their relative order.

Parameters
otherThe ContextHandle to compare to.
Returns
Less than 0, if this instance is less than other; 0 if both are equal; Greater than 0 if other is greater than this instance.
override bool OpenTK.ContextHandle.Equals ( object  obj)

Compares this instance to the specified object.

Parameters
objThe System.Object to compare to.
Returns
True if obj is a ContextHandle that is equal to this instance; false otherwise.
bool OpenTK.ContextHandle.Equals ( ContextHandle  other)

Compares this instance to the specified ContextHandle for equality.

Parameters
otherThe ContextHandle to compare to.
Returns
True if this instance is equal to other; false otherwise.
override int OpenTK.ContextHandle.GetHashCode ( )

Returns the hash code for this instance.

Returns
A System.Int32 with the hash code of this instance.
static OpenTK.ContextHandle.operator ContextHandle ( IntPtr  p)
explicitstatic

Converts the specified IntPtr to the equivalent ContextHandle.

Parameters
pThe System.IntPtr to convert.
Returns
A ContextHandle equivalent to the specified IntPtr.
static OpenTK.ContextHandle.operator IntPtr ( ContextHandle  c)
explicitstatic

Converts the specified ContextHandle to the equivalent IntPtr.

Parameters
cThe ContextHandle to convert.
Returns
A System.IntPtr equivalent to the specified ContextHandle.
static bool OpenTK.ContextHandle.operator!= ( ContextHandle  left,
ContextHandle  right 
)
static

Compares two ContextHandles for inequality.

Parameters
leftThe ContextHandle to compare.
rightThe ContextHandle to compare to.
Returns
True if left is not equal to right; false otherwise.
static bool OpenTK.ContextHandle.operator== ( ContextHandle  left,
ContextHandle  right 
)
static

Compares two ContextHandles for equality.

Parameters
leftThe ContextHandle to compare.
rightThe ContextHandle to compare to.
Returns
True if left is equal to right; false otherwise.
override string OpenTK.ContextHandle.ToString ( )

Converts this instance to its equivalent string representation.

Returns
A System.String that contains the string representation of this instance.

Member Data Documentation

readonly ContextHandle OpenTK.ContextHandle.Zero = new ContextHandle(IntPtr.Zero)
static

A read-only field that represents a handle that has been initialized to zero.

Property Documentation

IntPtr OpenTK.ContextHandle.Handle
get

Gets a System.IntPtr that represents the handle of this ContextHandle.