Represents a handle to an OpenGL or OpenAL context. More...
Public Member Functions | |
| ContextHandle (IntPtr h) | |
| Constructs a new instance with the specified handle. | |
| override string | ToString () |
| Converts this instance to its equivalent string representation. | |
| override bool | Equals (object obj) |
| Compares this instance to the specified object. | |
| override int | GetHashCode () |
| Returns the hash code for this instance. | |
| int | CompareTo (ContextHandle other) |
| Compares the numerical value of this instance to the specified ContextHandle and returns a value indicating their relative order. | |
| bool | Equals (ContextHandle other) |
| Compares this instance to the specified ContextHandle for equality. | |
Static Public Member Functions | |
| static | operator IntPtr (ContextHandle c) |
| Converts the specified ContextHandle to the equivalent IntPtr. | |
| static | operator ContextHandle (IntPtr p) |
| Converts the specified IntPtr to the equivalent ContextHandle. | |
| static bool | operator== (ContextHandle left, ContextHandle right) |
| Compares two ContextHandles for equality. | |
| static bool | operator!= (ContextHandle left, ContextHandle right) |
| Compares two ContextHandles for inequality. | |
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. | |
Properties | |
| IntPtr | Handle [get] |
| Gets a System.IntPtr that represents the handle of this ContextHandle. | |
Represents a handle to an OpenGL or OpenAL context.
Definition at line 18 of file ContextHandle.cs.
| OpenTK.ContextHandle.ContextHandle | ( | IntPtr | h | ) |
Constructs a new instance with the specified handle.
| h | A System.IntPtr containing the value for this instance. |
Definition at line 40 of file ContextHandle.cs.
| 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.
| other | The ContextHandle to compare to. |
Definition at line 156 of file ContextHandle.cs.
| bool OpenTK.ContextHandle.Equals | ( | ContextHandle | other | ) |
Compares this instance to the specified ContextHandle for equality.
| other | The ContextHandle to compare to. |
Definition at line 170 of file ContextHandle.cs.
00171 { 00172 return Handle == other.Handle; 00173 }
| override bool OpenTK.ContextHandle.Equals | ( | object | obj | ) |
Compares this instance to the specified object.
| obj | The System.Object to compare to. |
Definition at line 66 of file ContextHandle.cs.
00067 { 00068 if (obj is ContextHandle) 00069 return this.Equals((ContextHandle)obj); 00070 return false; 00071 }
| override int OpenTK.ContextHandle.GetHashCode | ( | ) |
Returns the hash code for this instance.
Definition at line 81 of file ContextHandle.cs.
00082 { 00083 return Handle.GetHashCode(); 00084 }
| static OpenTK.ContextHandle.operator ContextHandle | ( | IntPtr | p | ) | [explicit, static] |
Converts the specified IntPtr to the equivalent ContextHandle.
| p | The System.IntPtr to convert. |
Definition at line 109 of file ContextHandle.cs.
00110 { 00111 return new ContextHandle(p); 00112 }
| static OpenTK.ContextHandle.operator IntPtr | ( | ContextHandle | c | ) | [explicit, static] |
Converts the specified ContextHandle to the equivalent IntPtr.
| c | The ContextHandle to convert. |
Definition at line 95 of file ContextHandle.cs.
00096 { 00097 return c != ContextHandle.Zero ? c.handle : IntPtr.Zero; 00098 }
| static bool OpenTK.ContextHandle.operator!= | ( | ContextHandle | left, | |
| ContextHandle | right | |||
| ) | [static] |
Compares two ContextHandles for inequality.
| left | The ContextHandle to compare. | |
| right | The ContextHandle to compare to. |
Definition at line 139 of file ContextHandle.cs.
| static bool OpenTK.ContextHandle.operator== | ( | ContextHandle | left, | |
| ContextHandle | right | |||
| ) | [static] |
Compares two ContextHandles for equality.
| left | The ContextHandle to compare. | |
| right | The ContextHandle to compare to. |
Definition at line 124 of file ContextHandle.cs.
| override string OpenTK.ContextHandle.ToString | ( | ) |
Converts this instance to its equivalent string representation.
Definition at line 52 of file ContextHandle.cs.
00053 { 00054 return Handle.ToString(); 00055 }
readonly ContextHandle OpenTK.ContextHandle.Zero = new ContextHandle(IntPtr.Zero) [static] |
A read-only field that represents a handle that has been initialized to zero.
Definition at line 30 of file ContextHandle.cs.
IntPtr OpenTK.ContextHandle.Handle [get] |
Gets a System.IntPtr that represents the handle of this ContextHandle.
Definition at line 27 of file ContextHandle.cs.
1.6.1