-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cf7211
commit 217235c
Showing
12 changed files
with
326 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
version=0.25.1 | ||
assignment-operator=end-line | ||
break-cases=fit | ||
break-fun-decl=wrap | ||
break-fun-sig=wrap | ||
break-infix=wrap | ||
break-infix-before-func=false | ||
break-separators=before | ||
break-sequences=true | ||
cases-exp-indent=2 | ||
cases-matching-exp-indent=normal | ||
doc-comments=before | ||
doc-comments-padding=2 | ||
doc-comments-tag-only=default | ||
dock-collection-brackets=false | ||
exp-grouping=preserve | ||
field-space=loose | ||
if-then-else=compact | ||
indicate-multiline-delimiters=space | ||
indicate-nested-or-patterns=unsafe-no | ||
infix-precedence=indent | ||
leading-nested-match-parens=false | ||
let-and=sparse | ||
let-binding-spacing=compact | ||
let-module=compact | ||
margin=80 | ||
max-indent=2 | ||
module-item-spacing=sparse | ||
ocaml-version=4.14.0 | ||
ocp-indent-compat=false | ||
parens-ite=false | ||
parens-tuple=always | ||
parse-docstrings=true | ||
sequence-blank-line=preserve-one | ||
sequence-style=terminator | ||
single-case=compact | ||
space-around-arrays=true | ||
space-around-lists=true | ||
space-around-records=true | ||
space-around-variants=true | ||
type-decl=sparse | ||
wrap-comments=false | ||
wrap-fun-args=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,63 @@ | ||
module Base_dirs () : sig | ||
val home_dir : string option | ||
|
||
val cache_dir : string option | ||
|
||
val config_dir : string option | ||
|
||
val data_dir : string option | ||
|
||
val data_local_dir : string option | ||
|
||
val preference_dir : string option | ||
|
||
val runtime_dir : string option | ||
|
||
val state_dir : string option | ||
|
||
val executable_dir : string option | ||
end | ||
|
||
module User_dirs () : sig | ||
val home_dir : string option | ||
|
||
val audio_dir : string option | ||
|
||
val desktop_dir : string option | ||
|
||
val document_dir : string option | ||
|
||
val download_dir : string option | ||
|
||
val font_dir : string option | ||
|
||
val picture_dir : string option | ||
|
||
val public_dir : string option | ||
|
||
val template_dir : string option | ||
|
||
val video_dir : string option | ||
end | ||
|
||
module Project_dirs (App_id : sig | ||
val qualifier : string | ||
|
||
val organization : string | ||
|
||
val application : string | ||
end) : sig | ||
val cache_dir : string option | ||
|
||
val config_dir : string option | ||
|
||
val data_dir : string option | ||
|
||
val data_local_dir : string option | ||
|
||
val preference_dir : string option | ||
|
||
val runtime_dir : string option | ||
|
||
val state_dir : string option | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,24 @@ | ||
|
||
let print_defines fmt = | ||
List.iter (fun (d, v) -> Format.fprintf fmt "#define %s (%s)@\n" d v) | ||
|
||
let print_headers fmt = | ||
List.iter (Format.fprintf fmt "#include <%s>@\n") | ||
let print_headers fmt = List.iter (Format.fprintf fmt "#include <%s>@\n") | ||
|
||
let make_functions_stubs | ||
(c_defines : (string * string) list) | ||
(c_headers : string list) | ||
(functions_functor : (module Cstubs.BINDINGS)) = | ||
let make_functions_stubs (c_defines : (string * string) list) | ||
(c_headers : string list) (functions_functor : (module Cstubs.BINDINGS)) = | ||
let fmt = Format.std_formatter in | ||
begin | ||
match Sys.argv.(1) with | ||
| "c" -> | ||
print_defines fmt c_defines; | ||
print_headers fmt c_headers; | ||
Cstubs.write_c ~prefix:"win_stub" fmt functions_functor | ||
| "ml" -> | ||
Cstubs.write_ml ~prefix:"win_stub" fmt functions_functor | ||
print_defines fmt c_defines; | ||
print_headers fmt c_headers; | ||
Cstubs.write_c ~prefix:"win_stub" fmt functions_functor | ||
| "ml" -> Cstubs.write_ml ~prefix:"win_stub" fmt functions_functor | ||
| s -> failwith ("unknown functions " ^ s) | ||
end; | ||
Format.pp_print_flush fmt () | ||
|
||
let () = | ||
make_functions_stubs | ||
[ "NTDDI_VERSION", "NTDDI_VISTA" ] | ||
[ ("NTDDI_VERSION", "NTDDI_VISTA") ] | ||
[ "windows.h"; "shlobj.h" ] | ||
(module Win_functions_functor.Apply) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
include Win_functions_functor.Apply(Win_functions_stubs) | ||
include Win_functions_functor.Apply (Win_functions_stubs) |
Oops, something went wrong.