Skip to content

Commit

Permalink
Merge pull request ManasJayanth#3 from prometheansacrifice/value-array
Browse files Browse the repository at this point in the history
Adds Value array and some deps
  • Loading branch information
ManasJayanth committed Jan 26, 2019
2 parents 77b21f1 + 263c3e4 commit 1666c5a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
5 changes: 3 additions & 2 deletions gen/gen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ let files_suffix = "Raw"
(** Instead of generate all the data structures (and theirs related methods or
* constants), the idea is to choose what is needed. *)
let data_structures =
["TypeInterface"; "ParamSpec"; "Object";]
(* "Value"; "Binding"; "Closure" *)
["TypeInterface"; "TypeInstance"; "TypeClass"; "ParamSpec"; "Object"; "ValueArray";]
(* @ [ "Value"; ] *)
(* "Binding"; "Closure" *)

(** One can choose to skip the bindings of some constants because they are not
* needed or because you want to create manually the bindings in the "Core.ml"
Expand Down
1 change: 1 addition & 0 deletions gobject.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ depends: [
"base"
"stdio"
"configurator"
"gi-glib2"
]

8 changes: 4 additions & 4 deletions lib/Value.ml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let copy =
let dup_string =
foreign "g_value_dup_string" (ptr t_typ @-> returning (string_opt))
(* let dup_variant =
* foreign "g_value_dup_variant" (ptr t_typ @-> returning (ptr_opt Variant.t_typ)) *)
* foreign "g_value_dup_variant" (ptr t_typ @-> returning (ptr Variant.t_typ)) *)
let fits_pointer =
foreign "g_value_fits_pointer" (ptr t_typ @-> returning (bool))
let get_boolean =
Expand Down Expand Up @@ -56,10 +56,10 @@ let get_uint64 =
let get_ulong =
foreign "g_value_get_ulong" (ptr t_typ @-> returning (uint64_t))
(* let get_variant =
* foreign "g_value_get_variant" (ptr t_typ @-> returning (ptr_opt Variant.t_typ)) *)
* foreign "g_value_get_variant" (ptr t_typ @-> returning (ptr Variant.t_typ)) *)
(*Not implemented g_value_init type gType not implemented*)
(* let init_from_instance =
* foreign "g_value_init_from_instance" (ptr t_typ @-> ptr Type_instance.t_typ @-> returning (void)) *)
let init_from_instance =
foreign "g_value_init_from_instance" (ptr t_typ @-> ptr Type_instance.t_typ @-> returning (void))
let peek_pointer =
foreign "g_value_peek_pointer" (ptr t_typ @-> returning (ptr_opt void))
let reset =
Expand Down
8 changes: 4 additions & 4 deletions lib/Value.mli
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ val copy :
val dup_string :
t structure ptr -> string option
(* val dup_variant :
* t structure ptr -> Variant.t structure ptr option *)
* t structure ptr -> Variant.t structure ptr *)
val fits_pointer :
t structure ptr -> bool
val get_boolean :
Expand Down Expand Up @@ -55,10 +55,10 @@ val get_uint64 :
val get_ulong :
t structure ptr -> Unsigned.uint64
(* val get_variant :
* t structure ptr -> Variant.t structure ptr option *)
* t structure ptr -> Variant.t structure ptr *)
(*Not implemented g_value_init type gType not implemented*)
(* val init_from_instance :
* t structure ptr -> Type_instance.t structure ptr -> unit *)
val init_from_instance :
t structure ptr -> Type_instance.t structure ptr -> unit
val peek_pointer :
t structure ptr -> unit ptr option
val reset :
Expand Down
8 changes: 6 additions & 2 deletions lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
Binding_flags.mli Binding_flags.ml
Param_spec.mli Param_spec.ml
Type_interface.mli Type_interface.ml
Object.mli Object.ml)
Type_instance.mli Type_instance.ml
Type_class.mli Type_class.ml
Object.mli Object.ml
Value_array.mli Value_array.ml)
(deps ../gen/gen.exe)
(action (run %{deps} -o %{targets})))

Expand All @@ -18,8 +21,9 @@
(library
(name GObject)
(public_name gobject)
(libraries ctypes ctypes.foreign)
(libraries ctypes ctypes.foreign gi-glib2)
(c_names dyn_load_constants_stubs)
(c_flags (:include c_flags.sexp))
(c_library_flags (:include c_library_flags.sexp))
(flags -open GLib)
)

0 comments on commit 1666c5a

Please sign in to comment.