Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AE9RB committed Feb 25, 2016
0 parents commit 9ec9187
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 0 deletions.
19 changes: 19 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2015 David Turnbull

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Empty file added Package.swift
Empty file.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Swift C bindings for GLFW v3

[GLFW home page]
(http://www.glfw.org)

This is a package for the open source Swift. Usage:

- Install GLFW version 3.
- Include dependency in your `Package.swift`:
```swift
let package = Package(
dependencies: [
.Package(url: "https://github.com/SwiftGL/CGLFWLinux.git", majorVersion: 1)
]
)
```
- `import CGLFW3` in your swift file.
- Use as a C API. [Read the Apple docs to learn how.]
(https://developer.apple.com/library/mac/documentation/Swift/Conceptual/BuildingCocoaApps/InteractingWithCAPIs.html)
12 changes: 12 additions & 0 deletions module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module CGLFW3 [system] {
header "shim.h"
link "glfw"
export *

link "X11"
link "Xxf86vm"
link "Xrandr"
link "Xi"
link "Xinerama"
link "Xcursor"
}
5 changes: 5 additions & 0 deletions shim.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// Don't load OpenGL
#define GLFW_INCLUDE_NONE

// find GLFW using include path
#include "GLFW/glfw3.h"

0 comments on commit 9ec9187

Please sign in to comment.