Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/interkosmos/fortran-xlib
Fortran 2003 interface bindings to Xlib
https://github.com/interkosmos/fortran-xlib
fortran fortran-package-manager fpm x11 xlib
Last synced: 21 days ago
JSON representation
Fortran 2003 interface bindings to Xlib
- Host: GitHub
- URL: https://github.com/interkosmos/fortran-xlib
- Owner: interkosmos
- License: isc
- Created: 2018-02-01T16:28:54.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-26T22:21:06.000Z (over 1 year ago)
- Last Synced: 2024-11-08T03:09:44.736Z (2 months ago)
- Topics: fortran, fortran-package-manager, fpm, x11, xlib
- Language: Fortran
- Homepage:
- Size: 98.6 KB
- Stars: 13
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# fortran-xlib: Fortran 2003 Interfaces to Xlib
A collection of ISO C binding interfaces to Xlib for Fortran 2003. Currently,
only a subset of Xlib is implemented. In order to work with XPM files,
interfaces to `libxpm` are included.## Build
Build the interface bindings with:```
$ make
```Then, link your Fortran applications against `libfortran-xlib.a -lX11`.
Or, run *fpm* instead:```
$ fpm build --profile release
```The *fpm* script does not build any examples. You can add *fortran-xlib* as a
*fpm* dependency:```toml
[dependencies]
fortran-xlib = { git = "https://github.com/interkosmos/fortran-xlib.git" }
```## Examples
![Screen Shot](screenshot.png)Example programs utilising the interfaces can be found in the directory
`examples/`:* **drawing** draws some shapes on the window.
* **events** captures X11 events.
* **image** loads and displays an XPM image with transparency.
* **mandelbrot** draws a Mandelbrot set.
* **raycaster** projects a 2-D map into 3-D.
* **starfield** flys through a starfield.
* **text** outputs coloured text.
* **window** displays a simple window.
* **wireframe** renders a wire-frame model of a Tie Fighter.Build them with `make ` or compile them manually, for instance:
```
$ gfortran -I/usr/local/include/ -L/usr/local/lib/ -o window examples/window/window.f90 libfortran-xlib.a -lX11
```## Licence
ISC