Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
GH Action committed Oct 22, 2024
1 parent 2d0da34 commit 7a38268
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions src/sokol/c/sokol_imgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ SOKOL_IMGUI_API_DECL void simgui_render(void);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_make_image(const simgui_image_desc_t* desc);
SOKOL_IMGUI_API_DECL void simgui_destroy_image(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img);
SOKOL_IMGUI_API_DECL void* simgui_imtextureid(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id);
SOKOL_IMGUI_API_DECL uint64_t simgui_imtextureid(simgui_image_t img);
SOKOL_IMGUI_API_DECL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id);
SOKOL_IMGUI_API_DECL void simgui_add_focus_event(bool focus);
SOKOL_IMGUI_API_DECL void simgui_add_mouse_pos_event(float x, float y);
SOKOL_IMGUI_API_DECL void simgui_add_touch_pos_event(float x, float y);
Expand Down Expand Up @@ -2505,14 +2505,14 @@ SOKOL_API_IMPL simgui_image_desc_t simgui_query_image_desc(simgui_image_t img_id
return desc;
}

SOKOL_API_IMPL void* simgui_imtextureid(simgui_image_t img) {
SOKOL_API_IMPL uint64_t simgui_imtextureid(simgui_image_t img) {
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
return (void*)(uintptr_t)img.id;
return (uint64_t)(uintptr_t)img.id;
}

SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(void* im_texture_id) {
SOKOL_API_IMPL simgui_image_t simgui_image_from_imtextureid(uint64_t im_texture_id) {
SOKOL_ASSERT(_SIMGUI_INIT_COOKIE == _simgui.init_cookie);
simgui_image_t img = { (uint32_t)(uintptr_t) im_texture_id };
simgui_image_t img = { (uint32_t)im_texture_id };
return img;
}

Expand Down
8 changes: 4 additions & 4 deletions src/sokol/imgui.d
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ extern(C) ImageDesc simgui_query_image_desc(Image) @system @nogc nothrow;
ImageDesc queryImageDesc(Image img) @trusted @nogc nothrow {
return simgui_query_image_desc(img);
}
extern(C) void* simgui_imtextureid(Image) @system @nogc nothrow;
scope void* imtextureid(Image img) @trusted @nogc nothrow {
extern(C) ulong simgui_imtextureid(Image) @system @nogc nothrow;
ulong imtextureid(Image img) @trusted @nogc nothrow {
return simgui_imtextureid(img);
}
extern(C) Image simgui_image_from_imtextureid(void*) @system @nogc nothrow;
Image imageFromImtextureid(scope void* im_texture_id) @trusted @nogc nothrow {
extern(C) Image simgui_image_from_imtextureid(ulong) @system @nogc nothrow;
Image imageFromImtextureid(ulong im_texture_id) @trusted @nogc nothrow {
return simgui_image_from_imtextureid(im_texture_id);
}
extern(C) void simgui_add_focus_event(bool) @system @nogc nothrow;
Expand Down

0 comments on commit 7a38268

Please sign in to comment.