Ejemplo n.º 1
0
 public static void GlutSpecialFunc([In] SpecialCallback func)
 {
     _specialCallback = func;
     glutSpecialFunc(_specialCallback);
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Sets the special keyboard callback for the current window.
 /// </summary>
 /// <param name="func">
 ///     The new special callback function.  See <see cref="SpecialCallback" />.
 /// </param>
 /// <remarks>
 ///     <para>
 ///         <b>glutSpecialFunc</b> sets the special keyboard callback for the current
 ///         window.  The special keyboard callback is triggered when keyboard function or
 ///         directional keys are pressed.  The <i>key</i> callback parameter is a
 ///         GLUT_KEY_* constant for the special key pressed.  The <i>x</i> and <i>y</i>
 ///         callback parameters indicate the mouse in window relative coordinates when the
 ///         key was pressed.  When a new window is created, no special callback is
 ///         initially registered and special key strokes in the window are ignored.
 ///         Passing <c>null</c> to <b>glutSpecialFunc</b> disables the generation of
 ///         special callbacks.
 ///     </para>
 ///     <para>
 ///         During a special callback, <see cref="glutGetModifiers" /> may be called to
 ///         determine the state of modifier keys when the keystroke generating the
 ///         callback occurred.
 ///     </para>
 ///     <para>
 ///         An implementation should do its best to provide ways to generate all the
 ///         GLUT_KEY_* special keys.  The available GLUT_KEY_* values are:
 ///     </para>
 ///     <para>
 ///         <list type="table">
 ///             <listheader>
 ///                 <term>Value</term>
 ///                 <description>Description</description>
 ///             </listheader>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F1" /></term>
 ///                 <description>F1 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F2" /></term>
 ///                 <description>F2 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F3" /></term>
 ///                 <description>F3 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F4" /></term>
 ///                 <description>F4 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F5" /></term>
 ///                 <description>F5 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F6" /></term>
 ///                 <description>F6 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F7" /></term>
 ///                 <description>F7 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F8" /></term>
 ///                 <description>F8 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F9" /></term>
 ///                 <description>F9 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F10" /></term>
 ///                 <description>F10 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F11" /></term>
 ///                 <description>F11 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_F12" /></term>
 ///                 <description>F12 function key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_LEFT" /></term>
 ///                 <description>Left directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_UP" /></term>
 ///                 <description>Up directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_RIGHT" /></term>
 ///                 <description>Right directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_DOWN" /></term>
 ///                 <description>Down directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_PAGE_UP" /></term>
 ///                 <description>Page up directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_PAGE_DOWN" /></term>
 ///                 <description>Page down directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_HOME" /></term>
 ///                 <description>Home directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_END" /></term>
 ///                 <description>End directional key.</description>
 ///             </item>
 ///             <item>
 ///                 <term><see cref="GLUT_KEY_INSERT" /></term>
 ///                 <description>Insert directional key.</description>
 ///             </item>
 ///         </list>
 ///     </para>
 ///     <para>
 ///         Note that the escape, backspace, and delete keys are generated as an ASCII
 ///         character.
 ///     </para>
 /// </remarks>
 /// <seealso cref="SpecialCallback" />
 /// <seealso cref="glutGetModifiers" />
 // GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
 public static void glutSpecialFunc([In] SpecialCallback func) {
     specialCallback = func;
     __glutSpecialFunc(specialCallback);
 }
Ejemplo n.º 3
0
 private static extern void glutSpecialFunc(SpecialCallback func);
Ejemplo n.º 4
0
 private static extern void __glutSpecialFunc(SpecialCallback func);