-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
@@ -50,6 +50,16 @@ static void GenerateImport (this ICallable callable, IGeneratable parent, Indent | |||
var retType = GetReturnCSharpType (callable, writer); | |||
|
|||
var (typesAndNames, names) = BuildParameters (callable, writer.Options, appendInstanceParameters: true); | |||
|
|||
// TODO: Better than using the constant string, insert a custom generatable which contains the import string as a constant. | |||
// Also, glib-2.0.gir is problematic, it contains 2 library names :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually everything is in the first specified library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I even talked about that issue with the gi devs and they said the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, we can do that.
src/Gir/Generation/Callback.cs
Outdated
// Public API delegate which uses managed types. | ||
writer.WriteLine ("[UnmanagedFunctionPointer (CallingConvention.Cdecl)]"); | ||
writer.WriteLine ($"public delegate {returnType} {Name} PARAMS"); | ||
writer.WriteLine (); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote this for now, need to hack out the import
definition out of ICallable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And a callback is not really a member, it's a type.
Should be better now. |
No description provided.