caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Satoshi Ogasawara <ogasawara@itpl.co.jp>
To: caml-list@inria.fr
Subject: [ANN]Amthing - a multi-threaded GUI library
Date: Tue, 14 Apr 2009 14:11:10 +0900	[thread overview]
Message-ID: <0710E27F-A4AD-4EFE-A11A-C86B915560FE@itpl.co.jp> (raw)

Hello list,

I'm please to announce the  first public release of Amthing, a multi-threaded 
GUI library for OCaml.

Features are:

- Multi-threaded design using Concurrent ML style message passing.
- Time-line animation and functional reactive sprite system.
- X11 Binding.
- 2D vector rendering by cairo.

Here's a "Hello world" example of Amthing.

  open Ccell 
  open Event
  open Amthing.Util.Persavatives

  module W = Amthing.Core.Window ( Amthing.XWindow )
  module K = Amthing.KeyCode
  module E = Amthing.WinEvent
  module S = Amthing.Sprite
  module C = Amthing.Component
  let wh = W.make  (Amthing.XWindow.default_parameter ()) 
  let tc = lazy (W.make_text_context wh)

  let _ =
    W.resize wh {| x = 0; y = 0; w = 200; h = 200 |};
    let hello =
      new S.label !$tc "hello world!"
        +> S.set (`X 55.)
        +> S.set (`Y 90.)
        +> S.set (`Color Amthing.Color.blue)
        +> C.make
    in
    W.add_visible wh hello;
    W.set_title wh "amthing hello world!";
    W.show wh;
    let main_loop () =
      match select [ Bcast.receive (W.event wh) ] with
        `KEY_PRESS input when E.key_code input = Some K._q ->
	      W.close wh;
	      exit 0
      | #E.t -> ()
    in
    forever main_loop ()


you can clone the repository from OCamlForge subversion :

  svn checkout svn://svn.forge.ocamlcore.org/svnroot/amthing

or view souce code on the web.

  http://forge.ocamlcore.org/plugins/scmsvn/viewcvs.php/trunk/?root=amthing


have fun,

---
 Ogasawara Satoshi
    | - Email:  ogasawara@itpl.co.jp


             reply	other threads:[~2009-04-14  5:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14  5:11 Satoshi Ogasawara [this message]
2009-04-14  7:58 ` [Caml-list] " David MENTRE
2009-04-14  8:54   ` Satoshi Ogasawara
2009-04-14  9:11     ` Alp Mestan
2009-04-14 10:29       ` Satoshi Ogasawara
2009-04-14 11:04         ` Alp Mestan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0710E27F-A4AD-4EFE-A11A-C86B915560FE@itpl.co.jp \
    --to=ogasawara@itpl.co.jp \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).