GithubHelp home page GithubHelp logo

interkosmos / fortran-xlib Goto Github PK

View Code? Open in Web Editor NEW
13.0 3.0 1.0 101 KB

Fortran 2003 interface bindings to Xlib

License: ISC License

Fortran 96.82% Makefile 3.18%
fortran xlib x11 fpm fortran-package-manager

fortran-xlib's Introduction

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:

[dependencies]
fortran-xlib = { git = "https://github.com/interkosmos/fortran-xlib.git" }

Examples

Screen Shot

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 <name> 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.