add support for GLFW3
This commit is contained in:
parent
d9acf89784
commit
be45bef9f1
8 changed files with 6241 additions and 3 deletions
|
@ -27,6 +27,7 @@ task:
|
||||||
- make -j8
|
- make -j8
|
||||||
- sudo make install
|
- sudo make install
|
||||||
build_script:
|
build_script:
|
||||||
|
- sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||||
- sudo cp physac/src/physac.h /usr/local/include/
|
- sudo cp physac/src/physac.h /usr/local/include/
|
||||||
- sudo cp raygui/src/raygui.h /usr/local/include/
|
- sudo cp raygui/src/raygui.h /usr/local/include/
|
||||||
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages --upgrade pip
|
- /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages --upgrade pip
|
||||||
|
|
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
|
@ -44,6 +44,7 @@ jobs:
|
||||||
|
|
||||||
- name: Copy extras
|
- name: Copy extras
|
||||||
run: |
|
run: |
|
||||||
|
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||||
sudo cp physac/src/physac.h /usr/local/include/
|
sudo cp physac/src/physac.h /usr/local/include/
|
||||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||||
|
|
||||||
|
@ -193,6 +194,7 @@ jobs:
|
||||||
sudo make install
|
sudo make install
|
||||||
- name: Copy extras
|
- name: Copy extras
|
||||||
run: |
|
run: |
|
||||||
|
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||||
sudo cp physac/src/physac.h /usr/local/include/
|
sudo cp physac/src/physac.h /usr/local/include/
|
||||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||||
- name: Build raylib-python-cffi
|
- name: Build raylib-python-cffi
|
||||||
|
@ -325,6 +327,7 @@ jobs:
|
||||||
sudo make install
|
sudo make install
|
||||||
- name: Copy extras
|
- name: Copy extras
|
||||||
run: |
|
run: |
|
||||||
|
sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
|
||||||
sudo cp physac/src/physac.h /usr/local/include/
|
sudo cp physac/src/physac.h /usr/local/include/
|
||||||
sudo cp raygui/src/raygui.h /usr/local/include/
|
sudo cp raygui/src/raygui.h /usr/local/include/
|
||||||
|
|
||||||
|
|
|
@ -33,4 +33,4 @@ print("""from enum import IntEnum
|
||||||
|
|
||||||
process("raylib.json")
|
process("raylib.json")
|
||||||
process("raygui.json")
|
process("raygui.json")
|
||||||
|
process("glfw3.json")
|
||||||
|
|
|
@ -19,7 +19,7 @@ import inflection, sys, json
|
||||||
|
|
||||||
known_functions = {}
|
known_functions = {}
|
||||||
known_structs = {}
|
known_structs = {}
|
||||||
for filename in (Path("raylib.json"), Path("raymath.json"), Path("rlgl.json"), Path("raygui.json"), Path("physac.json")):
|
for filename in (Path("raylib.json"), Path("raymath.json"), Path("rlgl.json"), Path("raygui.json"), Path("physac.json"), Path("glfw3.json")):
|
||||||
f = open(filename, "r")
|
f = open(filename, "r")
|
||||||
js = json.load(f)
|
js = json.load(f)
|
||||||
for fn in js["functions"]:
|
for fn in js["functions"]:
|
||||||
|
|
|
@ -2227,6 +2227,363 @@ def window_should_close() -> bool:
|
||||||
def wrap(value: float,min_1: float,max_2: float,) -> float:
|
def wrap(value: float,min_1: float,max_2: float,) -> float:
|
||||||
""""""
|
""""""
|
||||||
...
|
...
|
||||||
|
def glfw_create_cursor(image: Any,xhot: int,yhot: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_create_standard_cursor(shape: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_create_window(width: int,height: int,title: str,monitor: Any,share: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_default_window_hints() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_destroy_cursor(cursor: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_destroy_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_extension_supported(extension: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_focus_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_clipboard_string(window: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_current_context() -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_cursor_pos(window: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_error(description: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_framebuffer_size(window: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_gamepad_name(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_gamepad_state(jid: int,state: Any,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_gamma_ramp(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_input_mode(window: Any,mode: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_axes(jid: int,count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_buttons(jid: int,count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_guid(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_hats(jid: int,count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_name(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_joystick_user_pointer(jid: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_key(window: Any,key: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_key_name(key: int,scancode: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_key_scancode(key: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_content_scale(monitor: Any,xscale: Any,yscale: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_name(monitor: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_physical_size(monitor: Any,widthMM: Any,heightMM: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_pos(monitor: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_user_pointer(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitor_workarea(monitor: Any,xpos: Any,ypos: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_monitors(count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_mouse_button(window: Any,button: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_platform() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_primary_monitor() -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_proc_address(procname: str,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_required_instance_extensions(count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_time() -> float:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_timer_frequency() -> uint64_t:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_timer_value() -> uint64_t:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_version(major: Any,minor: Any,rev: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_version_string() -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_video_mode(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_video_modes(monitor: Any,count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_attrib(window: Any,attrib: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_content_scale(window: Any,xscale: Any,yscale: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_frame_size(window: Any,left: Any,top: Any,right: Any,bottom: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_monitor(window: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_opacity(window: Any,) -> float:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_pos(window: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_size(window: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_get_window_user_pointer(window: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_hide_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_iconify_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_init() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_init_allocator(allocator: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_init_hint(hint: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_joystick_is_gamepad(jid: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_joystick_present(jid: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_make_context_current(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_maximize_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_platform_supported(platform: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_poll_events() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_post_empty_event() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_raw_mouse_motion_supported() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_request_window_attention(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_restore_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_char_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_char_mods_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_clipboard_string(window: Any,string: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_cursor(window: Any,cursor: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_cursor_enter_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_cursor_pos(window: Any,xpos: float,ypos: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_cursor_pos_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_drop_callback(window: Any,callback: str,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_error_callback(callback: str,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_framebuffer_size_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_gamma(monitor: Any,gamma: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_gamma_ramp(monitor: Any,ramp: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_input_mode(window: Any,mode: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_joystick_callback(callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_joystick_user_pointer(jid: int,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_key_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_monitor_callback(callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_monitor_user_pointer(monitor: Any,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_mouse_button_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_scroll_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_time(time: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_aspect_ratio(window: Any,numer: int,denom: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_attrib(window: Any,attrib: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_close_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_content_scale_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_focus_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_icon(window: Any,count: int,images: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_iconify_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_maximize_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_monitor(window: Any,monitor: Any,xpos: int,ypos: int,width: int,height: int,refreshRate: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_opacity(window: Any,opacity: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_pos(window: Any,xpos: int,ypos: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_pos_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_refresh_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_should_close(window: Any,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_size(window: Any,width: int,height: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_size_callback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_size_limits(window: Any,minwidth: int,minheight: int,maxwidth: int,maxheight: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_title(window: Any,title: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_set_window_user_pointer(window: Any,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_show_window(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_swap_buffers(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_swap_interval(interval: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_terminate() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_update_gamepad_mappings(string: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_vulkan_supported() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_wait_events() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_wait_events_timeout(timeout: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_window_hint(hint: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_window_hint_string(hint: int,value: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfw_window_should_close(window: Any,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
def rl_active_draw_buffers(count: int,) -> None:
|
def rl_active_draw_buffers(count: int,) -> None:
|
||||||
"""Activate multiple draw color buffers"""
|
"""Activate multiple draw color buffers"""
|
||||||
...
|
...
|
||||||
|
|
|
@ -2976,6 +2976,363 @@ def WindowShouldClose() -> bool:
|
||||||
def Wrap(value: float,min_1: float,max_2: float,) -> float:
|
def Wrap(value: float,min_1: float,max_2: float,) -> float:
|
||||||
""""""
|
""""""
|
||||||
...
|
...
|
||||||
|
def glfwCreateCursor(image: Any,xhot: int,yhot: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwCreateStandardCursor(shape: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwCreateWindow(width: int,height: int,title: str,monitor: Any,share: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwDefaultWindowHints() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwDestroyCursor(cursor: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwDestroyWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwExtensionSupported(extension: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwFocusWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetClipboardString(window: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetCurrentContext() -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetCursorPos(window: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetError(description: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetFramebufferSize(window: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetGamepadName(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetGamepadState(jid: int,state: Any,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetGammaRamp(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetInputMode(window: Any,mode: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickAxes(jid: int,count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickButtons(jid: int,count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickGUID(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickHats(jid: int,count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickName(jid: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetJoystickUserPointer(jid: int,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetKey(window: Any,key: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetKeyName(key: int,scancode: int,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetKeyScancode(key: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorContentScale(monitor: Any,xscale: Any,yscale: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorName(monitor: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorPhysicalSize(monitor: Any,widthMM: Any,heightMM: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorPos(monitor: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorUserPointer(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitorWorkarea(monitor: Any,xpos: Any,ypos: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMonitors(count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetMouseButton(window: Any,button: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetPlatform() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetPrimaryMonitor() -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetProcAddress(procname: str,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetRequiredInstanceExtensions(count: Any,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetTime() -> float:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetTimerFrequency() -> uint64_t:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetTimerValue() -> uint64_t:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetVersion(major: Any,minor: Any,rev: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetVersionString() -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetVideoMode(monitor: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetVideoModes(monitor: Any,count: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowAttrib(window: Any,attrib: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowContentScale(window: Any,xscale: Any,yscale: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowFrameSize(window: Any,left: Any,top: Any,right: Any,bottom: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowMonitor(window: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowOpacity(window: Any,) -> float:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowPos(window: Any,xpos: Any,ypos: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowSize(window: Any,width: Any,height: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwGetWindowUserPointer(window: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwHideWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwIconifyWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwInit() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwInitAllocator(allocator: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwInitHint(hint: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwJoystickIsGamepad(jid: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwJoystickPresent(jid: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwMakeContextCurrent(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwMaximizeWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwPlatformSupported(platform: int,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwPollEvents() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwPostEmptyEvent() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwRawMouseMotionSupported() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwRequestWindowAttention(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwRestoreWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCharCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCharModsCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetClipboardString(window: Any,string: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCursor(window: Any,cursor: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCursorEnterCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCursorPos(window: Any,xpos: float,ypos: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetCursorPosCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetDropCallback(window: Any,callback: str,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetErrorCallback(callback: str,) -> str:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetFramebufferSizeCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetGamma(monitor: Any,gamma: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetGammaRamp(monitor: Any,ramp: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetInputMode(window: Any,mode: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetJoystickCallback(callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetJoystickUserPointer(jid: int,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetKeyCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetMonitorCallback(callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetMonitorUserPointer(monitor: Any,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetMouseButtonCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetScrollCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetTime(time: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowAspectRatio(window: Any,numer: int,denom: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowAttrib(window: Any,attrib: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowCloseCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowContentScaleCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowFocusCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowIcon(window: Any,count: int,images: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowIconifyCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowMaximizeCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowMonitor(window: Any,monitor: Any,xpos: int,ypos: int,width: int,height: int,refreshRate: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowOpacity(window: Any,opacity: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowPos(window: Any,xpos: int,ypos: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowPosCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowRefreshCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowShouldClose(window: Any,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowSize(window: Any,width: int,height: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowSizeCallback(window: Any,callback: Any,) -> Any:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowSizeLimits(window: Any,minwidth: int,minheight: int,maxwidth: int,maxheight: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowTitle(window: Any,title: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSetWindowUserPointer(window: Any,pointer: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwShowWindow(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSwapBuffers(window: Any,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwSwapInterval(interval: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwTerminate() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwUpdateGamepadMappings(string: str,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwVulkanSupported() -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwWaitEvents() -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwWaitEventsTimeout(timeout: float,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwWindowHint(hint: int,value: int,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwWindowHintString(hint: int,value: str,) -> None:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
|
def glfwWindowShouldClose(window: Any,) -> int:
|
||||||
|
""""""
|
||||||
|
...
|
||||||
def rlActiveDrawBuffers(count: int,) -> None:
|
def rlActiveDrawBuffers(count: int,) -> None:
|
||||||
"""Activate multiple draw color buffers"""
|
"""Activate multiple draw color buffers"""
|
||||||
...
|
...
|
||||||
|
@ -3434,6 +3791,14 @@ CubemapLayout: int
|
||||||
FilePathList: struct
|
FilePathList: struct
|
||||||
Font: struct
|
Font: struct
|
||||||
FontType: int
|
FontType: int
|
||||||
|
GLFWallocator: struct
|
||||||
|
GLFWcursor: struct
|
||||||
|
GLFWgamepadstate: struct
|
||||||
|
GLFWgammaramp: struct
|
||||||
|
GLFWimage: struct
|
||||||
|
GLFWmonitor: struct
|
||||||
|
GLFWvidmode: struct
|
||||||
|
GLFWwindow: struct
|
||||||
GamepadAxis: int
|
GamepadAxis: int
|
||||||
GamepadButton: int
|
GamepadButton: int
|
||||||
Gesture: int
|
Gesture: int
|
||||||
|
|
|
@ -125,6 +125,12 @@ def build_unix():
|
||||||
#include "raymath.h"
|
#include "raymath.h"
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
glfw3_h = get_the_include_path() + "/GLFW/glfw3.h"
|
||||||
|
if check_header_exists(glfw3_h):
|
||||||
|
ffi_includes += """
|
||||||
|
#include "GLFW/glfw3.h"
|
||||||
|
"""
|
||||||
|
|
||||||
raygui_h = get_the_include_path() + "/raygui.h"
|
raygui_h = get_the_include_path() + "/raygui.h"
|
||||||
if check_header_exists(raygui_h):
|
if check_header_exists(raygui_h):
|
||||||
ffi_includes += """
|
ffi_includes += """
|
||||||
|
@ -141,6 +147,7 @@ def build_unix():
|
||||||
"""
|
"""
|
||||||
|
|
||||||
ffibuilder.cdef(pre_process_header(raylib_h))
|
ffibuilder.cdef(pre_process_header(raylib_h))
|
||||||
|
ffibuilder.cdef(pre_process_header(glfw3_h))
|
||||||
ffibuilder.cdef(pre_process_header(rlgl_h))
|
ffibuilder.cdef(pre_process_header(rlgl_h))
|
||||||
ffibuilder.cdef(pre_process_header(raymath_h, True))
|
ffibuilder.cdef(pre_process_header(raymath_h, True))
|
||||||
|
|
||||||
|
@ -158,7 +165,7 @@ def build_unix():
|
||||||
else: #platform.system() == "Linux":
|
else: #platform.system() == "Linux":
|
||||||
print("BUILDING FOR LINUX")
|
print("BUILDING FOR LINUX")
|
||||||
extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL',
|
extra_link_args = get_lib_flags() + [ '-lm', '-lpthread', '-lGL',
|
||||||
'-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
|
'-lrt', '-lm', '-ldl', '-lX11', '-lpthread', '-latomic']
|
||||||
libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic']
|
libraries = ['GL', 'm', 'pthread', 'dl', 'rt', 'X11', 'atomic']
|
||||||
|
|
||||||
ffibuilder.set_source("raylib._raylib_cffi",
|
ffibuilder.set_source("raylib._raylib_cffi",
|
||||||
|
@ -171,6 +178,7 @@ def build_unix():
|
||||||
def build_windows():
|
def build_windows():
|
||||||
print("BUILDING FOR WINDOWS")
|
print("BUILDING FOR WINDOWS")
|
||||||
ffibuilder.cdef(open("raylib/raylib.h.modified").read())
|
ffibuilder.cdef(open("raylib/raylib.h.modified").read())
|
||||||
|
ffibuilder.cdef(open("raylib/glfw3.h.modified").read())
|
||||||
ffibuilder.cdef(open("raylib/rlgl.h.modified").read())
|
ffibuilder.cdef(open("raylib/rlgl.h.modified").read())
|
||||||
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
ffibuilder.cdef(open("raylib/raygui.h.modified").read())
|
||||||
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
ffibuilder.cdef(open("raylib/physac.h.modified").read())
|
||||||
|
@ -179,6 +187,7 @@ def build_windows():
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "rlgl.h"
|
#include "rlgl.h"
|
||||||
#include "raymath.h"
|
#include "raymath.h"
|
||||||
|
#include "GLFW/glfw3.h"
|
||||||
#define RAYGUI_IMPLEMENTATION
|
#define RAYGUI_IMPLEMENTATION
|
||||||
#define RAYGUI_SUPPORT_RICONS
|
#define RAYGUI_SUPPORT_RICONS
|
||||||
#include "raygui.h"
|
#include "raygui.h"
|
||||||
|
@ -188,6 +197,7 @@ def build_windows():
|
||||||
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
|
extra_link_args=['/NODEFAULTLIB:MSVCRTD'],
|
||||||
libraries=['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm'],
|
libraries=['raylib', 'gdi32', 'shell32', 'user32', 'OpenGL32', 'winmm'],
|
||||||
include_dirs=['D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src',
|
include_dirs=['D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src',
|
||||||
|
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raylib-c\\src\\external\\glfw\\include',
|
||||||
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raygui\\src',
|
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\raygui\\src',
|
||||||
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\physac\\src'],
|
'D:\\a\\raylib-python-cffi\\raylib-python-cffi\\physac\\src'],
|
||||||
)
|
)
|
||||||
|
|
5502
raylib/glfw3.h.modified
Normal file
5502
raylib/glfw3.h.modified
Normal file
File diff suppressed because it is too large
Load diff
Reference in a new issue