module WinMD
Defined in:
winmd.crwinmd/cli/download.cr
winmd/cli/generate.cr
winmd/cli/libc.cr
winmd/fun_override.cr
winmd/fun_param.cr
Constant Summary
-
DEFAULT_TYPE_ALIASES =
{"Char" => "UInt16", "Single" => "Float32", "Double" => "Float64", "SByte" => "Int8", "Byte" => "UInt8", "Guid" => "LibC::GUID", "UIntPtr" => "LibC::UIntPtrT", "IntPtr" => "LibC::IntPtrT", "Boolean" => "Bool", "HANDLE" => "LibC::HANDLE"} -
Built-in mapping from the .NET-style names used by win32json (and by the winmd importer) to Crystal types.
data_type_aliases.jsonin the working directory adds to or overrides these, so a generator run without any override files still renders every file. -
INT_TYPES =
{{ Int.subclasses.map do |x| x.stringify end }} -
VERSION =
{{ (`shards version /srv/crystaldoc.info/github-mjblack-winmd-v1.5.0/src`).chomp.stringify }}
Class Method Summary
- .add_file(file : File)
- .apply_overrides
- .check_keyword(name : String)
-
.crystal_executable : String
Compiler used to discover the LibC functions that must not be redeclared.
-
.crystal_executable=(crystal_executable : String)
Compiler used to discover the LibC functions that must not be redeclared.
- .crystal_keywords
- .crystal_keywords=(crystal_keywords)
- .data_type_aliases_file : Path
- .data_type_aliases_file=(data_type_aliases_file : Path)
- .dll_exception?(name : String)
- .dll_exceptions_file : Path
- .dll_exceptions_file=(dll_exceptions_file : Path)
- .files
- .files=(files)
- .find_file_by_ns(name : String)
- .fix_namespace(name : String) : Tuple(String, String)
- .fix_param_name(name : String)
- .fix_type_name(name : String)
- .fun_aliases=(fun_aliases : Bool)
- .fun_aliases? : Bool
- .fun_exceptions_file : Path
- .fun_exceptions_file=(fun_exceptions_file : Path)
- .fun_handle : String
- .fun_handle=(fun_handle : String)
- .get_alias(name : String)
- .has_alias?(name : String)
- .init
-
.libc_funs_file : Path | Nil
Optional list of LibC function names that replaces discovery.
-
.libc_funs_file=(libc_funs_file : Path | Nil)
Optional list of LibC function names that replaces discovery.
-
.log_file : Bool
Runtime configuration parameters
-
.log_file=(log_file : Bool)
Runtime configuration parameters
- .log_file_name : Path
- .log_file_name=(log_file_name : Path)
- .log_level : Log::Severity
- .log_level=(log_level : Log::Severity)
- .output_dir : Path
- .output_dir=(output_dir : Path)
- .overrides_file : Path
- .overrides_file=(overrides_file : Path)
- .process_json_files(path : Path)
- .process_winmd_file(path : Path, dump_dir : Path | Nil = nil, associated_enums : Bool = false)
- .rename_type(name : String)
- .resolve_com_interfaces
- .top_level_namespace : String
- .top_level_namespace=(top_level_namespace : String)
-
.write_files(dir : Path)
Renders every namespace file plus the library entry points into
dir.
Class Method Detail
Compiler used to discover the LibC functions that must not be redeclared.
Compiler used to discover the LibC functions that must not be redeclared.
Optional list of LibC function names that replaces discovery.
Optional list of LibC function names that replaces discovery.
Renders every namespace file plus the library entry points into dir.
Failures are reported per file with the path involved; the process exits
with status 1 when any file could not be written so callers and CI notice.