Commits

Reid van Melle  committed 404e4fa

Changed the type declarations for boxed objects

  • Participants
  • Parent commits d09778d

Comments (0)

Files changed (1)

File clutter/clutter.ml

 
 external boom : unit -> 'a = "ml_abort"
 
-type obj = Gobject.obj
+type 'a obj = 'a Gobject.obj
 type actor
 type rectangle = [`gtk|`rectangle]
 type texture =   [`gtk|`texture]
   
-type alpha =     [`alpha] Gobject.obj
-type stage =     [`container|`stage|`actor|`group] Gobject.obj
-type group =     [`container|`group|`actor] Gobject.obj
+type alpha =     [`alpha] 
+type stage =     [`container|`stage|`actor|`group] 
+type group =     [`container|`group|`actor] 
     
-type ellipse =   [`behaviour|`ellipse] Gobject.obj
-type opacity =   [`behaviour|`opacity] Gobject.obj
-type rotate =    [`behaviour|`rotate] Gobject.obj
-type bspline =   [`behaviour|`bspline] Gobject.obj
-type depth =     [`behaviour|`depth] Gobject.obj
-type path =      [`behaviour|`path] Gobject.obj
-type scale =     [`behaviour|`scale] Gobject.obj
+type ellipse =   [`behaviour|`ellipse] 
+type opacity =   [`behaviour|`opacity] 
+type rotate =    [`behaviour|`rotate] 
+type bspline =   [`behaviour|`bspline] 
+type depth =     [`behaviour|`depth] 
+type path =      [`behaviour|`path] 
+type scale =     [`behaviour|`scale] 
 	
-type timeline =  [`timeline] Gobject.obj
+type timeline =  [`timeline] 
 type pixbuf =    GdkPixbuf.pixbuf
 
 external main : unit -> unit = "clutter_main"
     
 module Actor = struct
   module E = ClutterEnums
-  external set_position : [> `actor] Gobject.obj -> int -> int -> unit
+  external set_position : [> `actor] obj -> int -> int -> unit
     = "ml_clutter_actor_set_position"
-  external set_rotation : [> `actor] Gobject.obj -> E.rotate_axis_type ->
+  external set_rotation : [> `actor] obj -> E.rotate_axis_type ->
     float -> int -> int -> int -> unit =
     "ml_clutter_actor_set_rotation_bc" "ml_clutter_actor_set_rotation"
-  external show_all : [> `actor] Gobject.obj -> unit = "ml_clutter_actor_show_all"
-  external get_width : [> `actor] Gobject.obj -> int = "ml_clutter_actor_get_width"
-  external get_height : [> `actor] Gobject.obj -> int = "ml_clutter_actor_get_height"    
+  external show_all : [> `actor] obj -> unit = "ml_clutter_actor_show_all"
+  external get_width : [> `actor] obj -> int = "ml_clutter_actor_get_width"
+  external get_height : [> `actor] obj -> int = "ml_clutter_actor_get_height"    
 end;;
 
 module Group = struct
-  external create : unit -> group = "ml_clutter_group_new"
+  external create : unit -> group obj = "ml_clutter_group_new"
 end;;
 
 module Alpha = struct
   
   type effect_type = [`ALPHA_SINE]
-  external _create_full : timeline -> int -> alpha = "ml_clutter_alpha_new_full"
+  external _create_full : timeline obj -> int -> alpha obj = "ml_clutter_alpha_new_full"
   let create_full a (b:effect_type) = _create_full a (Hashtbl.hash b)
 end;;
 
 (*module Effect = struct
   external template_new : timeline -> int -> template -> effect_template
-  external scale : effect_template -> [> actor] Gobject.obj -> xend:float -> yend:float -> complete_fn:int -> 
+  external scale : effect_template -> [> actor] obj -> xend:float -> yend:float -> complete_fn:int -> 
 end;;*)
 
 
 module Texture = struct
-  external from_pixbuf : pixbuf -> [> `actor] Gobject.obj
+  external from_pixbuf : pixbuf -> [> `actor] obj
     = "ml_clutter_texture_new_from_pixbuf"    
 end;;
 
 module Behaviour = struct
   module E = ClutterEnums
   (* ellipse operations *)
-  external ellipse : alpha -> cx:int -> cy:int -> width:int -> height:int -> dir:E.rotate_direction_type -> start:float -> finish:float -> ellipse = "ml_clutter_behaviour_ellipse_new_bc"
+  external ellipse : alpha obj -> cx:int -> cy:int -> width:int -> height:int -> dir:E.rotate_direction_type -> start:float -> finish:float -> ellipse obj = "ml_clutter_behaviour_ellipse_new_bc"
     "ml_clutter_behaviour_ellipse_new"
 
   (* opacity operations *)
-  external opacity : alpha -> start:int -> finish:int -> opacity = "ml_clutter_behaviour_opacity_new"
+  external opacity : alpha obj -> start:int -> finish:int -> opacity obj = "ml_clutter_behaviour_opacity_new"
 
   (* general behaviour operations *)
-  external apply : [> `behaviour] Gobject.obj -> [> `actor] Gobject.obj -> unit = "ml_clutter_behaviour_apply"
+  external apply : [> `behaviour] obj -> [> `actor] obj -> unit = "ml_clutter_behaviour_apply"
 
   module P = struct
     let opacity_end : ([>`opacity],_) Gobject.property =
 end;;
 
 module Container = struct
-  external add_actor : [> `container] Gobject.obj -> [> `actor] Gobject.obj -> unit
+  external add_actor : [> `container] obj -> [> `actor] obj -> unit
     = "ml_clutter_container_add_actor"
   let add c actors =
     List.iter (add_actor c) actors
 
 module Timeline = struct
 	
-  external create : n:int -> fps:int -> timeline = "ml_clutter_timeline_new"
-  external start : timeline -> unit = "ml_clutter_timeline_start"
+  external create : n:int -> fps:int -> timeline obj = "ml_clutter_timeline_new"
+  external start : timeline obj -> unit = "ml_clutter_timeline_start"
   
   module P = struct
     let loop : ([>`timeline],_) Gobject.property =
 end;;
 
 module Stage = struct
-  external get_default : unit -> stage = "ml_clutter_stage_get_default"
+  external get_default : unit -> stage obj = "ml_clutter_stage_get_default"
 end;;