objc_meta ~main
Objective-C base for creating D bindings.
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
D-objective-c
Repository used to keep a compatible Objective-C bindings generation with D.
Objective-C strings
NSLog("abcd".ns);
Objective-C Number
5.ns
Objective-C Blocks
Thanks to @jacob-carlborg, we now have support to passing D delegates to Objective-C code. For further information, this was supposed to be located in the D runtime, but it didn't made unfortunately. Nevertheless, it was a great project and further makes this binding possible!
extern(C) void foo(Block!()* block);
void main()
{
// The `block` function is used to initialize an instance of `Block`.
// A delegate will be passed to the `block` function which will be the
// body of the block.
auto b = block({ writeln("foo"); });
foo(&b);
}
Creating Objective-C dictionaries in D
NSMutableDictionaryD a = ["hello": 5].ns;
- Registered by Marcelo Silva Nascimento Mancini
- ~main released 8 months ago
- MrcSnm/D-objective-c
- proprietary
- Copyright © 2023, Hipreme
- Authors:
- Dependencies:
- none
- Versions:
-
1.1.0 2024-Mar-17 1.0.16 2024-Mar-10 1.0.15 2024-Feb-12 1.0.14 2024-Feb-12 1.0.13 2024-Jan-14 - Download Stats:
-
-
2 downloads today
-
11 downloads this week
-
21 downloads this month
-
280 downloads total
-
- Score:
- 1.2
- Short URL:
- objc_meta.dub.pm