Beispiel #1
0
 public static extern GLFWcharmodsfun setCharModsCallback(IntPtr win, GLFWcharmodsfun cbfun);
Beispiel #2
0
 public static GLFWcharmodsfun setCharModsCallback(GLFWwindow window, GLFWcharmodsfun cbfun)
 {
     return(Glfwint.setCharModsCallback(window.handle, cbfun));
 }
Beispiel #3
0
 internal OpenGLContext(string name)
 {
     if (GLFW.GlfwInit() == 0)
     {
         Console.Error.WriteLine("GLFW failed to initialize!");
         Environment.Exit(1);
     }
     Window = GLFW.GlfwCreateWindow(1920, 1080, name, null, null);
     if (Window == null)
     {
         Console.Error.WriteLine("GLFW failed to open window!");
         GLFW.GlfwTerminate();
         Environment.Exit(1);
     }
     Input = new InputSource();
     GLFW.GlfwMakeContextCurrent(Window);
     StrongReferences = new List <Delegate>();
     {
         GLFWkeyfun cb = KeyCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetKeyCallback(Window, cb);
     }
     {
         GLFWcharfun cb = CharCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetCharCallback(Window, cb);
     }
     {
         GLFWerrorfun cb = ErrorCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetErrorCallback(cb);
     }
     {
         GLFWscrollfun cb = ScrollCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetScrollCallback(Window, cb);
     }
     {
         GLFWcharmodsfun cb = CharModsCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetCharModsCallback(Window, cb);
     }
     {
         GLFWcursorposfun cb = CursorPosCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetCursorPosCallback(Window, cb);
     }
     {
         GLFWwindowposfun cb = WindowPosCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetWindowPosCallback(Window, cb);
     }
     {
         GLFWwindowsizefun cb = WindowSizeCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetWindowSizeCallback(Window, cb);
     }
     {
         GLFWcursorenterfun cb = CursorEnterCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetCursorEnterCallback(Window, cb);
     }
     {
         GLFWmousebuttonfun cb = MouseButtonCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetMouseButtonCallback(Window, cb);
     }
     {
         GLFWwindowfocusfun cb = WindowFocusCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetWindowFocusCallback(Window, cb);
     }
     {
         GLFWwindowiconifyfun cb = WindowIconifyCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetWindowIconifyCallback(Window, cb);
     }
     {
         GLFWframebuffersizefun cb = FrameBufferSizeCallback;
         StrongReferences.Add(cb);
         GLFW.GlfwSetFramebufferSizeCallback(Window, cb);
     }
 }
Beispiel #4
0
 public static extern GLFWcharmodsfun glfwSetCharModsCallback(IntPtr window, GLFWcharmodsfun cbfun);
Beispiel #5
0
 /*! @brief Sets the Unicode character with modifiers callback.
  *
  *  This function sets the character with modifiers callback of the specified
  *  window, which is called when a Unicode character is input regardless of what
  *  modifier keys are used.
  *
  *  The character with modifiers callback is intended for implementing custom
  *  Unicode character input.  For regular Unicode text input, see the
  *  [character callback](@ref glfwSetCharCallback).  Like the character
  *  callback, the character with modifiers callback deals with characters and is
  *  keyboard layout dependent.  Characters do not map 1:1 to physical keys, as
  *  a key may produce zero, one or more characters.  If you want to know whether
  *  a specific physical key was pressed or released, see the
  *  [key callback](@ref glfwSetKeyCallback) instead.
  *
  *  @param[in] window The window whose callback to set.
  *  @param[in] cbfun The new callback, or `NULL` to remove the currently set
  *  callback.
  *  @return The previously set callback, or `NULL` if no callback was set or an
  *  error occurred.
  *
  *  @par Thread Safety
  *  This function may only be called from the main thread.
  *
  *  @sa @ref input_char
  *
  *  @since Added in GLFW 3.1.
  *
  *  @ingroup input
  */
 internal static extern GLFWcharmodsfun glfwSetCharModsCallback(GLFWwindow* window, GLFWcharmodsfun cbfun);