Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Dlang
gtkd
Commits
4f62b29b
Commit
4f62b29b
authored
Mar 24, 2021
by
Mike Wey
Browse files
Use the correct class name in ImplementClass.
and add the needed import for ObjectG. Fixes: #325
parent
81ddb591
Changes
1
Hide whitespace changes
Inline
Side-by-side
generated/gtkd/gtkd/Implement.d
View file @
4f62b29b
...
...
@@ -87,6 +87,7 @@ template ImplementClassImpl(Klass, Impl)
string
result
;
result
~=
"import glib.Str;\n"
~
"import gobject.ObjectG;\n"
~
"import gobject.Type : Type;\n"
~
"import gobject.c.functions : g_type_class_peek_parent, g_object_get_data;\n"
;
...
...
@@ -174,7 +175,10 @@ template ImplementClassImpl(Klass, Impl)
!
implements
!
Impl
(
toCamelCase
!
Impl
()
~
names
[
i
].
capitalizeFirst
)
)
//TODO: __traits(isOverrideFunction, Foo.foo) ?
{
result
~=
"\t"
~
toCamelCase
!
GtkClass
()
~
"."
~
names
[
i
]
~
" = &"
~
toCamelCase
!
Impl
()
~
names
[
i
].
capitalizeFirst
~
";\n"
;
static
if
(
is
(
GtkClass
==
getClass
!
Klass
)
)
result
~=
"\tparentClass."
~
names
[
i
]
~
" = &"
~
toCamelCase
!
Impl
()
~
names
[
i
].
capitalizeFirst
~
";\n"
;
else
result
~=
"\t"
~
toCamelCase
!
GtkClass
()
~
"."
~
names
[
i
]
~
" = &"
~
toCamelCase
!
Impl
()
~
names
[
i
].
capitalizeFirst
~
";\n"
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment