• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // dear imgui: Platform Binding for FreeGLUT
2 // This needs to be used along with a Renderer (e.g. OpenGL2)
3 
4 // Issues:
5 //  [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I
6 //  [ ] Platform: Missing gamepad support.
7 
8 // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
9 // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
10 // https://github.com/ocornut/imgui
11 
12 #pragma once
13 
14 IMGUI_IMPL_API bool     ImGui_ImplFreeGLUT_Init();
15 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_InstallFuncs();
16 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_Shutdown();
17 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_NewFrame();
18 
19 // You can call ImGui_ImplFreeGLUT_InstallFuncs() to get all those functions installed automatically,
20 // or call them yourself from your own GLUT handlers. We are using the same weird names as GLUT for consistency..
21 //---------------------------------------- GLUT name --------------------------------------------- Decent Name ---------
22 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_ReshapeFunc(int w, int h);                           // ~ ResizeFunc
23 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_MotionFunc(int x, int y);                            // ~ MouseMoveFunc
24 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_MouseFunc(int button, int state, int x, int y);      // ~ MouseButtonFunc
25 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_MouseWheelFunc(int button, int dir, int x, int y);   // ~ MouseWheelFunc
26 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_KeyboardFunc(unsigned char c, int x, int y);         // ~ CharPressedFunc
27 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_KeyboardUpFunc(unsigned char c, int x, int y);       // ~ CharReleasedFunc
28 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_SpecialFunc(int key, int x, int y);                  // ~ KeyPressedFunc
29 IMGUI_IMPL_API void     ImGui_ImplFreeGLUT_SpecialUpFunc(int key, int x, int y);                // ~ KeyReleasedFunc
30