gui_init   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/gui.xtm

Implementation

(bind-func gui_init
  (lambda (width height)
    ;; (if (not (null? EXTEMPORE_GUI))
    ;;     (begin
    ;;       (println "Extempore GUI is already initialised, and cannot be re-initialised.")
    ;;       EXTEMPORE_GUI))
    (let ((ww:i32* (alloc))
          (wh:i32* (alloc))
          (fbw:i32* (alloc))
          (fbh:i32* (alloc))
          (window null)
          (vg null))
      ;; set up GLFW
      (glfwSetErrorCallback (convert (get_native_fptr glfw_error_callback)))
      (glfwInit)
      (set! window (glfw_init_and_create_interaction_window width height))
      (glfwSetWindowSizeCallback window (convert (get_native_fptr gui_window_size_callback)))
      ;; (glfwSetInputMode window GLFW_STICKY_KEYS 1)
      ;; (glfwSetInputMode window GLFW_STICKY_MOUSE_BUTTONS 1)
      ;; set up nanovg
      (set! vg (nvg_create_context))
      (glfwGetWindowSize window ww wh)
      (glfwGetFramebufferSize window fbw fbh)
      ;; create the new GUI data type
      (set! EXTEMPORE_GUI
            (GUI_h
             window
             vg
             null
             (convert (pref ww 0) float)
             (convert (pref wh 0) float)
             (/ (convert (pref fbw 0) float) (convert (pref ww 0) float)))))))


Back to Index

Similar Entries

  • GUI_context    xtlang
  • GUI_height    xtlang
  • GUI_pixel_ratio    xtlang
  • GUI_root    xtlang
  • GUI_set_root    xtlang
  • GUI_width    xtlang
  • GUI_window    xtlang
  • apr_init    xtlang
  • cef_init_app    xtlang
  • cef_init_base    xtlang
  • cef_init_browser    xtlang
  • cef_init_client    xtlang
  • cl:reduce-init    scheme
  • glew_init    xtlang
  • glfw_init    xtlang
  • glfw_init_and_create_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_compatibility_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_interaction_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_fullscreen_window    xtlang
  • glfw_init_and_create_interaction_compatibility_window    xtlang
  • glfw_init_and_create_interaction_window    xtlang
  • glfw_init_and_create_window    xtlang
  • gui_add_widget    xtlang
  • gui_add_widget    xtlang
  • gui_click_p    xtlang
  • gui_draw_circle    xtlang
  • gui_draw_rect    xtlang
  • gui_draw_text_in_bounds    xtlang
  • gui_enter_p    xtlang
  • gui_find_leaf_inorder    xtlang
  • gui_find_leaf_postorder    xtlang
  • gui_find_leaf_preorder    xtlang
  • gui_find_next_id    xtlang
  • gui_find_parent    xtlang
  • gui_find_widget_with_id    xtlang
  • gui_inbounds_p    xtlang
  • gui_keypress_p    xtlang
  • gui_keyrelease_p    xtlang
  • gui_leave_p    xtlang
  • gui_left_click_p    xtlang
  • gui_mouse_x    xtlang
  • gui_mouse_y    xtlang
  • gui_render    xtlang
  • gui_render_loop    xtlang
  • gui_render_subtree    xtlang
  • gui_reset    xtlang
  • gui_right_click_p    xtlang
  • gui_set_default_theme    xtlang
  • gui_set_monokai_color_theme    xtlang
  • gui_set_monokai_opensans_theme    xtlang
  • gui_shutdown    xtlang
  • gui_validate    xtlang
  • gui_window_size_callback    xtlang
  • guint64_alloc    xtlang
  • guint64_halloc    xtlang
  • guint64_zalloc    xtlang
  • guint_alloc    xtlang
  • guint_halloc    xtlang
  • guint_zalloc    xtlang
  • h3d_init    xtlang
  • h3d_init    xtlang
  • impc:compiler:print-no-redefinitions-error    scheme
  • impc:ti:initialize-closure-with-new-zone    scheme
  • init-gst    xtlang
  • init-osc-vars    xtlang
  • init-psys    xtlang
  • init-slides    scheme
  • init_bodies    xtlang
  • init_burners    xtlang
  • init_draw_quad    xtlang
  • init_env_map    xtlang
  • init_gl    xtlang
  • init_globals    xtlang
  • init_lv2_amp    xtlang
  • init_sample_data    xtlang
  • init_sample_data    xtlang
  • init_sky    xtlang
  • init_vao    xtlang
  • init_vg    xtlang
  • initalize    xtlang
  • initialize_walkers    xtlang
  • lilv_init_world    xtlang
  • node_reply_socket_init    xtlang
  • nvg_init    xtlang
  • pa_initialize    xtlang
  • pm_initialize    xtlang
  • pm_initialize    unknown
  • scheduler_init    xtlang
  • some_gl_init    xtlang
  • sys:compile-init-ll    scheme
  • sys:compile-init-ll-from-str    scheme
  • world_init    xtlang
  • xtm_envmap_init    xtlang
  • xtm_render_init    xtlang
  • xtm_render_init_dof_shader    xtlang
  • xtm_render_init_light_shader    xtlang
  • xtm_render_init_quad_shader    xtlang
  • xtm_render_init_simple_bone_shader    xtlang
  • xtm_render_init_simple_shader    xtlang
  • xtm_render_init_skybox_shader    xtlang
  • xtm_skybox_init    xtlang