Source

clutter-ocaml / src / clutterRectangle.ml

open OclutterProps
open ClutterProps
open Clutter

module Actor = ClutterActor
  
class rectangle_skel obj = object (self)
  inherit rectangle_props
  inherit ['a] Actor.actor_skel (as_actor obj)
  method obj : rectangle Clutter.obj = obj
end

class rectangle obj = object
  inherit rectangle_skel (obj : [> `rectangle] Clutter.obj)
  method connect = new Actor.actor_signals_impl obj
end

let make_rectangle ~create =
  Rectangle.make_params ~cont:
    (fun pl ->
       ClutterProps.Actor.make_params pl ~cont:
	 (fun pl () ->
	    let (e : #rectangle_skel) = create pl in
	    e)
    )

let create =
  make_rectangle [] ~create:
    (fun pl ->
       let t = Rectangle.create pl in
       new rectangle t)

let new_with_color color = create ~color