Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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