diff --git a/application/enum.go b/application-enum.go similarity index 99% rename from application/enum.go rename to application-enum.go index e9b140a..405e274 100644 --- a/application/enum.go +++ b/application-enum.go @@ -1,4 +1,4 @@ -package application +package qamel // FontWeight is the weight for thickness of the font. // Qt uses a weighting scale from 0 to 99 similar to, diff --git a/application/application.cpp b/application.cpp similarity index 94% rename from application/application.cpp rename to application.cpp index b140dd6..827b895 100644 --- a/application/application.cpp +++ b/application.cpp @@ -56,6 +56,7 @@ void App_SetOrganizationDomain(void* ptr, char* domain) { app->setOrganizationDomain(QString(domain)); } -int App_Exec() { - return QGuiApplication::exec(); +int App_Exec(void* ptr) { + QGuiApplication *app = static_cast(ptr); + return app->exec(); } \ No newline at end of file diff --git a/application/application.go b/application.go similarity index 98% rename from application/application.go rename to application.go index aa8b212..6e022b0 100644 --- a/application/application.go +++ b/application.go @@ -1,4 +1,4 @@ -package application +package qamel // #include // #include @@ -122,7 +122,7 @@ func (app Application) SetOrganizationDomain(domain string) { // then returns the value that was set to exit() (which is 0 if exit() is // called via quit()). func (app Application) Exec() int { - return int(int32(C.App_Exec())) + return int(int32(C.App_Exec(app.ptr))) } func sliceToChars(src []string) **C.char { diff --git a/application/application.h b/application.h similarity index 96% rename from application/application.h rename to application.h index 6df5afa..b366ad5 100644 --- a/application/application.h +++ b/application.h @@ -22,7 +22,7 @@ void App_SetApplicationName(void* ptr, char* name); void App_SetApplicationVersion(void* ptr, char* version); void App_SetOrganizationName(void* ptr, char* name); void App_SetOrganizationDomain(void* ptr, char* domain); -int App_Exec(); +int App_Exec(void* ptr); #ifdef __cplusplus } diff --git a/engine/engine.cpp b/engine.cpp similarity index 100% rename from engine/engine.cpp rename to engine.cpp diff --git a/engine/engine.go b/engine.go similarity index 99% rename from engine/engine.go rename to engine.go index 6ca0555..5d6f730 100644 --- a/engine/engine.go +++ b/engine.go @@ -1,4 +1,4 @@ -package engine +package qamel // #include // #include diff --git a/engine/engine.h b/engine.h similarity index 100% rename from engine/engine.h rename to engine.h diff --git a/viewer/enum.go b/viewer-enum.go similarity index 99% rename from viewer/enum.go rename to viewer-enum.go index 5146a3e..7384c6d 100644 --- a/viewer/enum.go +++ b/viewer-enum.go @@ -1,4 +1,4 @@ -package viewer +package qamel // ResizeMode specifies how to resize the view. type ResizeMode int diff --git a/viewer/viewer.cpp b/viewer.cpp similarity index 99% rename from viewer/viewer.cpp rename to viewer.cpp index 3edf7f2..896d88f 100644 --- a/viewer/viewer.cpp +++ b/viewer.cpp @@ -138,3 +138,5 @@ void Viewer_ClearComponentCache(void* ptr) { void Viewer_Reload(void* ptr) { QMetaObject::invokeMethod(static_cast(ptr), "reload"); } + +#include "moc.h" \ No newline at end of file diff --git a/viewer/viewer.go b/viewer.go similarity index 99% rename from viewer/viewer.go rename to viewer.go index dc4e77b..1c146a0 100644 --- a/viewer/viewer.go +++ b/viewer.go @@ -1,4 +1,4 @@ -package viewer +package qamel // #include // #include diff --git a/viewer/viewer.h b/viewer.h similarity index 100% rename from viewer/viewer.h rename to viewer.h