Example #1
0
 /// <summary>
 ///     Sets the tablet button callback for the current window.
 /// </summary>
 /// <param name="func">
 ///     The new tablet button callback function.  See
 ///     <see cref="TabletButtonCallback" />.
 /// </param>
 /// <remarks>
 ///     <para>
 ///         <b>glutTabletButtonFunc</b> sets the tablet button callback for the current
 ///         window.  The tablet button callback for a window is called when the window has
 ///         tablet input focus (normally, when the mouse is in the window) and the user
 ///         generates tablet button presses.  The <i>button</i> parameter will be the
 ///         button number (starting at one).  The number of available tablet buttons can
 ///         be determined with <c>Glut.glutDeviceGet(Glut.GLUT_NUM_TABLET_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.
 ///         The <i>x</i> and <i>y</i> callback parameters indicate the window relative
 ///         coordinates when the tablet button state changed.
 ///     </para>
 ///     <para>
 ///         Registering a tablet button callback when a tablet device is not available is
 ///         ineffectual and not an error.  In this case, no tablet button callbacks will
 ///         be generated.
 ///     </para>
 ///     <para>
 ///         Passing <c>null</c> to <b>glutTabletButtonFunc</b> disables the generation of
 ///         tablet button callbacks.  When a new window is created, no tablet button
 ///         callback is initially registered.
 ///     </para>
 /// </remarks>
 /// <seealso cref="TabletButtonCallback" />
 /// <seealso cref="glutDeviceGet" />
 // GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
 public static void glutTabletButtonFunc([In] TabletButtonCallback func) {
     tabletButtonCallback = func;
     __glutTabletButtonFunc(tabletButtonCallback);
 }
Example #2
0
 private static extern void __glutTabletButtonFunc(TabletButtonCallback func);