Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Remove GLFW.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Gnimuc committed Jun 5, 2021
1 parent 4029740 commit 5602bb1
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name = "ImGuiGLFWBackend"
uuid = "623d79b3-9695-4e60-bd7e-2a5aabaa6933"
authors = ["Yupei Qi <[email protected]>"]
version = "0.1.0"
version = "0.1.1"

[deps]
GLFW = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98"
GLFW_jll = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"
LibCImGui = "9be01004-c4f5-478b-abeb-cb32b114cf5e"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[compat]
GLFW = "3.4"
LibCImGui = "1.82.0"
GLFW_jll = "3.3"
julia = "1.6"

[extras]
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![CI](https://github.com/JuliaImGui/ImGuiGLFWBackend.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/JuliaImGui/ImGuiGLFWBackend.jl/actions/workflows/ci.yml)
[![TagBot](https://github.com/JuliaImGui/ImGuiGLFWBackend.jl/actions/workflows/TagBot.yml/badge.svg)](https://github.com/JuliaImGui/ImGuiGLFWBackend.jl/actions/workflows/TagBot.yml)
[![Coverage](https://codecov.io/gh/JuliaImGui/ImGuiGLFWBackend.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/JuliaImGui/ImGuiGLFWBackend.jl)
[![](https://img.shields.io/badge/design%20principle-KISS-orange)](https://en.wikipedia.org/wiki/KISS_principle)

Julia GLFW backend for ImGui.

Expand Down
10 changes: 2 additions & 8 deletions gen/Manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,11 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"

[[GLFW]]
deps = ["GLFW_jll"]
git-tree-sha1 = "35dbc482f0967d8dceaa7ce007d16f9064072166"
uuid = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98"
version = "3.4.1"

[[GLFW_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libXcursor_jll", "Xorg_libXi_jll", "Xorg_libXinerama_jll", "Xorg_libXrandr_jll"]
git-tree-sha1 = "a199aefead29c3c2638c3571a9993b564109d45a"
git-tree-sha1 = "dba1e8614e98949abfa60480b13653813d8f0157"
uuid = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"
version = "3.3.4+0"
version = "3.3.5+0"

[[InteractiveUtils]]
deps = ["Markdown"]
Expand Down
4 changes: 2 additions & 2 deletions gen/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[deps]
Clang = "40e3b903-d033-50b4-a0cc-940c62c95e31"
GLFW = "f7f18e0c-5ee9-5ccd-a5bf-e8befd85ed98"
GLFW_jll = "0656b61e-2033-5cc2-a64a-77c0f6c09b89"

[compat]
Clang = "0.14.0"
GLFW = "3.4"
GLFW_jll = "3.3"
2 changes: 1 addition & 1 deletion gen/generator.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Clang.Generators
using GLFW.GLFW_jll
using GLFW_jll

cd(@__DIR__)

Expand Down
2 changes: 1 addition & 1 deletion gen/prologue.jl
Original file line number Diff line number Diff line change
@@ -1 +1 @@
using GLFW.GLFW_jll
using GLFW_jll
7 changes: 4 additions & 3 deletions src/ImGuiGLFWBackend.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ImGuiGLFWBackend

using Libdl
using GLFW
using GLFW_jll
using LibCImGui

include("LibGLFW.jl")
Expand All @@ -11,8 +11,9 @@ const GLFW_GET_CLIPBOARD_TEXT_FUNCPTR = Ref{Ptr{Cvoid}}(C_NULL)
const GLFW_SET_CLIPBOARD_TEXT_FUNCPTR = Ref{Ptr{Cvoid}}(C_NULL)

function __init__()
GLFW_GET_CLIPBOARD_TEXT_FUNCPTR[] = dlsym(dlopen(GLFW.libglfw), :glfwGetClipboardString)
GLFW_SET_CLIPBOARD_TEXT_FUNCPTR[] = dlsym(dlopen(GLFW.libglfw), :glfwSetClipboardString)
glfwInit() == GLFW_TRUE && atexit(glfwTerminate)
GLFW_GET_CLIPBOARD_TEXT_FUNCPTR[] = dlsym(dlopen(libglfw), :glfwGetClipboardString)
GLFW_SET_CLIPBOARD_TEXT_FUNCPTR[] = dlsym(dlopen(libglfw), :glfwSetClipboardString)
end

function c_get(x::Ptr{NTuple{N,T}}, i) where {N,T}
Expand Down
2 changes: 1 addition & 1 deletion src/LibGLFW.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module LibGLFW

using GLFW.GLFW_jll
using GLFW_jll


# typedef void ( * GLFWglproc ) ( void )
Expand Down
2 changes: 1 addition & 1 deletion src/platform.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function ImGui_ImplGlfw_CreateWindow(viewport::Ptr{ImGuiViewport})
data_Window = glfwCreateWindow(wx, wy, "No Title Yet", C_NULL, share_window)
viewport.PlatformHandle = data_Window
if Sys.iswindows()
viewport.PlatformHandleRaw = ccall((:glfwGetWin32Window, GLFW.libglfw), Ptr{Cvoid}, (Ptr{GLFWwindow},), data_Window)
viewport.PlatformHandleRaw = ccall((:glfwGetWin32Window, libglfw), Ptr{Cvoid}, (Ptr{GLFWwindow},), data_Window)
end
data.Window = data_Window

Expand Down

2 comments on commit 5602bb1

@Gnimuc
Copy link
Member Author

@Gnimuc Gnimuc commented on 5602bb1 Jun 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/38211

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.1 -m "<description of version>" 5602bb1be223016e2eb6707fea6d555403970674
git push origin v0.1.1

Please sign in to comment.