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

https://github.com/ivanperez-keera/gloss-gtk

Embed gloss in Gtk+ programs using gtkglext
https://github.com/ivanperez-keera/gloss-gtk

Last synced: 6 months ago
JSON representation

Embed gloss in Gtk+ programs using gtkglext

Awesome Lists containing this project

README

          

This project adds a new backend to gloss that can be used to embed
gloss images/animations/simulations in GTK+ applications. It uses
the gtkglext package available in Hackage.

Current status is: not finished, still under development. Do not use
(I'm not joking here) in production just yet.

How this works: in the arguments to 'display', use the InWidget
constructor, and pass a Gtk container as first argument. The canvas
will be added to the container using Graphics.UI.Gtk.containerAdd.

QUICK STATUS OVERVIEW

| Feature | Status |
|----------------------+------------------------|
| Animations | Working |
| Simulations | Working |
| Games | Working |
| Mouse interaction | Working |
| Fonts | Working |
| Keyboard interaction | Not tested, might work |
| Background colours | Not working |

The contents of the original README file follows.

-- 8 Coats of GLOSS -----------------------------------------------------------

Gloss hides the pain of drawing simple vector graphics behind a nice
data type and a few display functions.

EXAMPLE
Getting something on the screen is as easy as:

import Graphics.Gloss
main = display (InWindow "Nice Window" (200, 200) (10, 10)) white (Circle 80)

USAGE
Once the window is open you can use the following:
* Quit - esc-key.
* Move Viewport - left-click drag, arrow keys.
* Rotate Viewport - right-click drag, control-left-click drag,
or home/end-keys.
* Zoom Viewport - mouse wheel, or page up/down-keys.

OTHER THINGS
Animations and simulations can be constructed similarly using the
'animate' and 'simulate' functions. Games with user input can be
constructed with the 'play' function.

See the gloss-examples package for more.

-------------------------------------------------------------------------------
Release Notes:

For 1.7.0:
* Tweaked circle level-of-detail reduction code.
* Increased frame rate cap to 100hz.
Thanks to Doug Burke
* Primitives for drawing arcs and sectors.
Thanks to Thomas DuBuisson
* IO versions of animate, simplate and play.

For 1.6.0:
Thanks to Anthony Cowley
* Full screen mode display mode.

For 1.5.0:
* O(1) Conversion of ForeignPtrs to bitmaps.
* An extra flag on the Bitmap constructor allows bitmaps to be cached
in texture memory between frames.

For 1.4.0:
* Added texture caching.
Thanks to Christiaan Baaij:
* Refactoring of Gloss internals to support multiple window manager backends.
* Support for using GLFW as the window library instead of GLUT.
GLUT is still the default, but to use GLFW install gloss with:
cabal install gloss --flags=\"GLFW -GLUT\"

For 1.3.0:
* Various wibbles for GHC 7.1
Thanks to Ben Lambert-Smith:
* New support for displaying bitmap files.

For 1.2.0:
* Cleaned up module hierarchy.
* Added line-line intersection utils.
* Enabled -Wall and fixed all warnings.
* Various wibbles for GHC 7.0
Thanks to Thomas DuBuisson:
* Fixed a bug causing motion events to give the wrong position.
Thanks to Stephan Maka:
* Fixed a space leak in simulate mode when the window was hidden.

For 1.1.0:
* Added game mode.
* Added QuadTree and Extent structures.
* Added simple ray casting.