Exemplo n.º 1
0
 /// <summary>
 ///     Sets the dial and button box button callback for the current window.
 /// </summary>
 /// <param name="func">
 ///     The new button box callback function.  See <see cref="ButtonBoxCallback" />.
 /// </param>
 /// <remarks>
 ///     <para>
 ///         <b>glutButtonBoxFunc</b> sets the dial and button box button callback for the
 ///         current window.  The dial and button box button callback for a window is
 ///         called when the window has dial and button box input focus (normally, when the
 ///         mouse is in the window) and the user generates dial and button box button
 ///         presses.  The <i>button</i> parameter will be the button number (starting at
 ///         one).  The number of available dial and button box buttons can be determined
 ///         with <c>Glut.glutDeviceGet(Glut.GLUT_NUM_BUTTON_BOX_BUTTONS)</c>.  The
 ///         <i>state</i> is either <see cref="GLUT_UP" /> or <see cref="GLUT_DOWN" />
 ///         indicating whether the callback was due to a release or press respectively.
 ///     </para>
 ///     <para>
 ///         Registering a dial and button box button callback when a dial and button box
 ///         device is not available is ineffectual and not an error.  In this case, no
 ///         dial and button box button callbacks will be generated.
 ///     </para>
 ///     <para>
 ///         Passing <c>null</c> to <b>glutButtonBoxFunc</b> disables the generation of
 ///         dial and button box button callbacks.  When a new window is created, no dial
 ///         and button box button callback is initially registered.
 ///     </para>
 /// </remarks>
 /// <seealso cref="ButtonBoxCallback" />
 /// <seealso cref="glutDeviceGet" />
 // GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
 public static void glutButtonBoxFunc([In] ButtonBoxCallback func) {
     buttonBoxCallback = func;
     __glutButtonBoxFunc(buttonBoxCallback);
 }
Exemplo n.º 2
0
 private static extern void __glutButtonBoxFunc(ButtonBoxCallback func);